chywang commited on
Commit
8a8b21d
1 Parent(s): 034660a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ from PIL import Image
6
  model_id = "alibaba-pai/pai-diffusion-artist-large-zh"
7
  pipe = StableDiffusionPipeline.from_pretrained(model_id)
8
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
9
- pipe = pipe.to("cuda")
10
 
11
  def infer_text2img(prompt, guide, steps):
12
  image = pipe([prompt], guidance_scale=guide, num_inference_steps=steps).images[0]
 
6
  model_id = "alibaba-pai/pai-diffusion-artist-large-zh"
7
  pipe = StableDiffusionPipeline.from_pretrained(model_id)
8
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
9
+ pipe = pipe.to("cpu")
10
 
11
  def infer_text2img(prompt, guide, steps):
12
  image = pipe([prompt], guidance_scale=guide, num_inference_steps=steps).images[0]