Update app.py
Browse files
app.py
CHANGED
|
@@ -84,7 +84,6 @@ def get_seed(randomize_seed: bool, seed: int) -> int:
|
|
| 84 |
@spaces.GPU
|
| 85 |
def image_to_3d(
|
| 86 |
multiimages: List[Tuple[Image.Image, str]],
|
| 87 |
-
is_multiimage: bool,
|
| 88 |
seed: int,
|
| 89 |
ss_guidance_strength: float,
|
| 90 |
ss_sampling_steps: int,
|
|
@@ -94,22 +93,6 @@ def image_to_3d(
|
|
| 94 |
req: gr.Request,
|
| 95 |
) -> Tuple[dict, str]:
|
| 96 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
| 97 |
-
if not is_multiimage:
|
| 98 |
-
outputs = pipeline.run(
|
| 99 |
-
image,
|
| 100 |
-
seed=seed,
|
| 101 |
-
formats=["gaussian", "mesh"],
|
| 102 |
-
preprocess_image=False,
|
| 103 |
-
sparse_structure_sampler_params={
|
| 104 |
-
"steps": ss_sampling_steps,
|
| 105 |
-
"cfg_strength": ss_guidance_strength,
|
| 106 |
-
},
|
| 107 |
-
slat_sampler_params={
|
| 108 |
-
"steps": slat_sampling_steps,
|
| 109 |
-
"cfg_strength": slat_guidance_strength,
|
| 110 |
-
},
|
| 111 |
-
)
|
| 112 |
-
else:
|
| 113 |
outputs = pipeline.run_multi_image(
|
| 114 |
[image[0] for image in multiimages],
|
| 115 |
seed=seed,
|
|
|
|
| 84 |
@spaces.GPU
|
| 85 |
def image_to_3d(
|
| 86 |
multiimages: List[Tuple[Image.Image, str]],
|
|
|
|
| 87 |
seed: int,
|
| 88 |
ss_guidance_strength: float,
|
| 89 |
ss_sampling_steps: int,
|
|
|
|
| 93 |
req: gr.Request,
|
| 94 |
) -> Tuple[dict, str]:
|
| 95 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
outputs = pipeline.run_multi_image(
|
| 97 |
[image[0] for image in multiimages],
|
| 98 |
seed=seed,
|