Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def generate_image(prompt, ckpt):
|
|
36 |
|
37 |
if loaded != num_inference_steps:
|
38 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample" if num_inference_steps==1 else "epsilon")
|
39 |
-
pipe.unet.load_state_dict(torch.load(hf_hub_download(
|
40 |
loaded = num_inference_steps
|
41 |
|
42 |
results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0)
|
|
|
36 |
|
37 |
if loaded != num_inference_steps:
|
38 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample" if num_inference_steps==1 else "epsilon")
|
39 |
+
pipe.unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoint), map_location="cuda"))
|
40 |
loaded = num_inference_steps
|
41 |
|
42 |
results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0)
|