Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
9c70317
1
Parent(s):
1aa888c
update
Browse files
app.py
CHANGED
|
@@ -76,7 +76,7 @@ def get_seed(randomize_seed: bool, seed: int) -> int:
|
|
| 76 |
return np.random.randint(0, MAX_SEED) if randomize_seed else seed
|
| 77 |
|
| 78 |
|
| 79 |
-
@spaces.GPU(duration=
|
| 80 |
def image_to_3d(
|
| 81 |
image: Image.Image,
|
| 82 |
seed: int,
|
|
@@ -143,6 +143,7 @@ def image_to_3d(
|
|
| 143 |
}[resolution],
|
| 144 |
return_latent=True,
|
| 145 |
)
|
|
|
|
| 146 |
images = render_utils.make_pbr_vis_frames(
|
| 147 |
render_utils.render_snapshot(outputs[0], resolution=1024, r=2, fov=36, envmap=envmap),
|
| 148 |
resolution=1024
|
|
@@ -152,7 +153,7 @@ def image_to_3d(
|
|
| 152 |
return state, [Image.fromarray(image) for image in images]
|
| 153 |
|
| 154 |
|
| 155 |
-
@spaces.GPU(duration=
|
| 156 |
def extract_glb(
|
| 157 |
state: dict,
|
| 158 |
decimation_target: int,
|
|
|
|
| 76 |
return np.random.randint(0, MAX_SEED) if randomize_seed else seed
|
| 77 |
|
| 78 |
|
| 79 |
+
@spaces.GPU(duration=60)
|
| 80 |
def image_to_3d(
|
| 81 |
image: Image.Image,
|
| 82 |
seed: int,
|
|
|
|
| 143 |
}[resolution],
|
| 144 |
return_latent=True,
|
| 145 |
)
|
| 146 |
+
print('DONE')
|
| 147 |
images = render_utils.make_pbr_vis_frames(
|
| 148 |
render_utils.render_snapshot(outputs[0], resolution=1024, r=2, fov=36, envmap=envmap),
|
| 149 |
resolution=1024
|
|
|
|
| 153 |
return state, [Image.fromarray(image) for image in images]
|
| 154 |
|
| 155 |
|
| 156 |
+
@spaces.GPU(duration=60)
|
| 157 |
def extract_glb(
|
| 158 |
state: dict,
|
| 159 |
decimation_target: int,
|