Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def load_models(config_name, ckpt_path, vae_path, device):
|
|
31 |
|
32 |
# Load main U-Net model
|
33 |
unet = MaskDiT(**params['model']).to(device)
|
34 |
-
unet.load_state_dict(torch.load(ckpt_path)['model'])
|
35 |
unet.eval()
|
36 |
|
37 |
accelerator = Accelerator(mixed_precision="fp16")
|
|
|
31 |
|
32 |
# Load main U-Net model
|
33 |
unet = MaskDiT(**params['model']).to(device)
|
34 |
+
unet.load_state_dict(torch.load(ckpt_path, map_location='cpu')['model'])
|
35 |
unet.eval()
|
36 |
|
37 |
accelerator = Accelerator(mixed_precision="fp16")
|