Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,9 +5,9 @@ from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
|
5 |
model_id = "stabilityai/stable-diffusion-2-1"
|
6 |
|
7 |
# Use the DPMSolverMultistepScheduler (DPM-Solver++) scheduler here instead
|
8 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.
|
9 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
10 |
-
|
11 |
def diffusion(text,num_inference_steps,guidance_scale):
|
12 |
prompt = text
|
13 |
image = pipe(prompt,guidance_scale=guidance_scale, num_inference_steps=num_inference_steps).images[0]
|
|
|
5 |
model_id = "stabilityai/stable-diffusion-2-1"
|
6 |
|
7 |
# Use the DPMSolverMultistepScheduler (DPM-Solver++) scheduler here instead
|
8 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
|
9 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
10 |
+
|
11 |
def diffusion(text,num_inference_steps,guidance_scale):
|
12 |
prompt = text
|
13 |
image = pipe(prompt,guidance_scale=guidance_scale, num_inference_steps=num_inference_steps).images[0]
|