Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def generate_image(prompt, ckpt):
|
|
37 |
|
38 |
if loaded != num_inference_steps:
|
39 |
unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
|
40 |
-
unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoints)), 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 |
|
|
|
37 |
|
38 |
if loaded != num_inference_steps:
|
39 |
unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
|
40 |
+
unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoints)), 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 |
|