Furkan12 commited on
Commit
0fb8242
·
verified ·
1 Parent(s): f4848ed

![f92493e8-775e-4d74-9c10-1b9fc86944d1.png](https://cdn-uploads.huggingface.co/production/uploads/65803c63bc91d2ab5d68fd99/dfNZbMBAv2BCu-VSDXKrL.png)

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,9 +17,9 @@ from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
17
 
18
  model_id = "stabilityai/stable-diffusion-2-1"
19
 
20
- device = "cuda" if torch.cuda.is_available() else "cpu"
21
- # Use the DPMSolverMultistepScheduler (DPM-Solver++) scheduler here instead
22
- pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
23
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
24
  pipe = pipe.to(device)
25
 
 
17
 
18
  model_id = "stabilityai/stable-diffusion-2-1"
19
 
20
+ device = "cpu"
21
+ # DPM-Solver++ scheduler'ını kullan, torch_dtype belirtme
22
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
23
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
24
  pipe = pipe.to(device)
25