Commit
•
bfddad0
1
Parent(s):
ff442ed
Update app.py
Browse files
app.py
CHANGED
@@ -8,9 +8,10 @@ def generate_image(prompt):
|
|
8 |
model_id = "runwayml/stable-diffusion-v1-5"
|
9 |
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
10 |
pipeline = pipeline.to("cuda")
|
|
|
11 |
|
12 |
generator = torch.Generator("cuda").manual_seed(0)
|
13 |
-
image = pipeline(prompt, generator=generator).images[0]
|
14 |
|
15 |
return image
|
16 |
|
|
|
8 |
model_id = "runwayml/stable-diffusion-v1-5"
|
9 |
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
10 |
pipeline = pipeline.to("cuda")
|
11 |
+
num_inference_steps = 20
|
12 |
|
13 |
generator = torch.Generator("cuda").manual_seed(0)
|
14 |
+
image = pipeline(prompt, generator=generator, , num_inference_steps=20).images[0]
|
15 |
|
16 |
return image
|
17 |
|