Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def generate_image(prompt, ckpt):
|
|
37 |
num_inference_steps = checkpoints[ckpt][1]
|
38 |
|
39 |
if loaded != num_inference_steps:
|
40 |
-
unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoint)
|
41 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample" if num_inference_steps==1 else "epsilon")
|
42 |
loaded = num_inference_steps
|
43 |
|
|
|
37 |
num_inference_steps = checkpoints[ckpt][1]
|
38 |
|
39 |
if loaded != num_inference_steps:
|
40 |
+
unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoint), map_location="cuda"))
|
41 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample" if num_inference_steps==1 else "epsilon")
|
42 |
loaded = num_inference_steps
|
43 |
|