Spaces:
Runtime error
Runtime error
tokenid
commited on
Commit
·
3b4754e
1
Parent(s):
7103ae4
update
Browse files
app.py
CHANGED
|
@@ -127,9 +127,6 @@ state_dict = {k[14:]: v for k, v in state_dict.items() if k.startswith('lrm_gene
|
|
| 127 |
model.load_state_dict(state_dict, strict=True)
|
| 128 |
|
| 129 |
model = model.to(device)
|
| 130 |
-
if IS_FLEXICUBES:
|
| 131 |
-
model.init_flexicubes_geometry(device, use_renderer=False)
|
| 132 |
-
model = model.eval()
|
| 133 |
|
| 134 |
print('Loading Finished!')
|
| 135 |
|
|
@@ -178,6 +175,11 @@ def make3d(input_image, sample_steps, sample_seed):
|
|
| 178 |
else:
|
| 179 |
print("CUDA installation not found")
|
| 180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
images, show_images = generate_mvs(input_image, sample_steps, sample_seed)
|
| 182 |
|
| 183 |
images = np.asarray(images, dtype=np.float32) / 255.0
|
|
|
|
| 127 |
model.load_state_dict(state_dict, strict=True)
|
| 128 |
|
| 129 |
model = model.to(device)
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
print('Loading Finished!')
|
| 132 |
|
|
|
|
| 175 |
else:
|
| 176 |
print("CUDA installation not found")
|
| 177 |
|
| 178 |
+
global model
|
| 179 |
+
if IS_FLEXICUBES:
|
| 180 |
+
model.init_flexicubes_geometry(device, use_renderer=False)
|
| 181 |
+
model = model.eval()
|
| 182 |
+
|
| 183 |
images, show_images = generate_mvs(input_image, sample_steps, sample_seed)
|
| 184 |
|
| 185 |
images = np.asarray(images, dtype=np.float32) / 255.0
|