Spaces:
Runtime error
Runtime error
osanseviero
commited on
Commit
β’
2d5e602
1
Parent(s):
4c18494
Fix output of pipeline
Browse files
app.py
CHANGED
@@ -120,7 +120,7 @@ def stable_diffusion_compose(prompt, scale, steps, weights, seed):
|
|
120 |
generator = th.Generator("cuda").manual_seed(int(seed))
|
121 |
with autocast('cpu' if not th.cuda.is_available() else 'cuda'):
|
122 |
image = pipe(prompt, guidance_scale=scale, num_inference_steps=steps,
|
123 |
-
weights=weights, generator=generator)[
|
124 |
image.save(f'{"_".join(prompt.split())}.png')
|
125 |
return image
|
126 |
|
|
|
120 |
generator = th.Generator("cuda").manual_seed(int(seed))
|
121 |
with autocast('cpu' if not th.cuda.is_available() else 'cuda'):
|
122 |
image = pipe(prompt, guidance_scale=scale, num_inference_steps=steps,
|
123 |
+
weights=weights, generator=generator).images[0]
|
124 |
image.save(f'{"_".join(prompt.split())}.png')
|
125 |
return image
|
126 |
|