Bartusito commited on
Commit
5cfd1ca
1 Parent(s): 302eb17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
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.float16)
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