Yasunori Ozaki commited on
Commit
8824cd5
1 Parent(s): 13d52d5

Add diffusers model

Browse files
Files changed (1) hide show
  1. README.md +6 -3
README.md CHANGED
@@ -92,13 +92,16 @@ import torch
92
 
93
  model_id = "aipicasso/cool-japan-diffusion-2-1-0"
94
 
95
- pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
 
96
  pipe = pipe.to("cuda")
97
 
98
- prompt = "anime, a beautuful girl with black hair and red eyes, kimono, 4k, detailed"
99
- image = pipe(prompt, height=512, width=512).images[0]
 
100
 
101
  image.save("girl.png")
 
102
  ```
103
 
104
  **注意**:
 
92
 
93
  model_id = "aipicasso/cool-japan-diffusion-2-1-0"
94
 
95
+ scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
96
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)
97
  pipe = pipe.to("cuda")
98
 
99
+ prompt = "anime, a portrait of a girl with black short hair and red eyes, full color illustration, official art, 4k, detailed"
100
+ negative_prompt="low quality, bad face, bad anatomy, bad hand, lowres, jpeg artifacts, 2d, 3d, cg, text"
101
+ image = pipe(prompt,negative_prompt=negative_prompt).images[0]
102
 
103
  image.save("girl.png")
104
+
105
  ```
106
 
107
  **注意**: