Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,11 +17,8 @@ def modelo2(text):
|
|
| 17 |
model_id = "stabilityai/stable-diffusion-2-1"
|
| 18 |
|
| 19 |
# Use the DPMSolverMultistepScheduler (DPM-Solver++) scheduler here instead
|
| 20 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.
|
| 21 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
| 22 |
-
pipe = pipe.to("cpu")
|
| 23 |
-
print(text)
|
| 24 |
-
# Conversión a float32
|
| 25 |
image = pipe(text).images[0]
|
| 26 |
|
| 27 |
return image
|
|
|
|
| 17 |
model_id = "stabilityai/stable-diffusion-2-1"
|
| 18 |
|
| 19 |
# Use the DPMSolverMultistepScheduler (DPM-Solver++) scheduler here instead
|
| 20 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
|
| 21 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
|
|
|
|
|
|
|
|
|
| 22 |
image = pipe(text).images[0]
|
| 23 |
|
| 24 |
return image
|