Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -112,7 +112,7 @@ pipeline.scheduler = EulerAncestralDiscreteScheduler.from_config(
|
|
112 |
)
|
113 |
|
114 |
# load custom white-background UNet
|
115 |
-
unet_ckpt_path = hf_hub_download(repo_id="
|
116 |
state_dict = torch.load(unet_ckpt_path, map_location='cpu')
|
117 |
pipeline.unet.load_state_dict(state_dict, strict=True)
|
118 |
|
@@ -120,7 +120,7 @@ pipeline = pipeline.to(device)
|
|
120 |
|
121 |
# load reconstruction model
|
122 |
print('Loading reconstruction model ...')
|
123 |
-
model_ckpt_path = hf_hub_download(repo_id="
|
124 |
model = instantiate_from_config(model_config)
|
125 |
state_dict = torch.load(model_ckpt_path, map_location='cpu')['state_dict']
|
126 |
state_dict = {k[14:]: v for k, v in state_dict.items() if k.startswith('lrm_generator.') and 'source_camera' not in k}
|
|
|
112 |
)
|
113 |
|
114 |
# load custom white-background UNet
|
115 |
+
unet_ckpt_path = hf_hub_download(repo_id="jkorstad/InstantMesh", filename="diffusion_pytorch_model.bin", repo_type="model")
|
116 |
state_dict = torch.load(unet_ckpt_path, map_location='cpu')
|
117 |
pipeline.unet.load_state_dict(state_dict, strict=True)
|
118 |
|
|
|
120 |
|
121 |
# load reconstruction model
|
122 |
print('Loading reconstruction model ...')
|
123 |
+
model_ckpt_path = hf_hub_download(repo_id="jkorstad/InstantMesh", filename="instant_mesh_large.ckpt", repo_type="model")
|
124 |
model = instantiate_from_config(model_config)
|
125 |
state_dict = torch.load(model_ckpt_path, map_location='cpu')['state_dict']
|
126 |
state_dict = {k[14:]: v for k, v in state_dict.items() if k.startswith('lrm_generator.') and 'source_camera' not in k}
|