HelloSun commited on
Commit
1f8dd09
·
verified ·
1 Parent(s): 17f7bc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -36,7 +36,7 @@ def generate_image(prompt, ckpt):
36
  # Ensure sampler uses "trailing" timesteps.
37
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
38
 
39
- pipe.unet.load_state_dict(load_file(hf_hub_download(repo, checkpoint), device="cuda"))
40
  image = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0).images[0]
41
  return image
42
 
 
36
  # Ensure sampler uses "trailing" timesteps.
37
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
38
 
39
+ pipe.unet.load_state_dict(load_file(hf_hub_download(repo, checkpoint), device="cpu"))
40
  image = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0).images[0]
41
  return image
42