Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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="
|
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 |
|