Spaces:
Running
on
Zero
Running
on
Zero
fix:Update app
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def generate_3d(image, seed=-1,
|
|
42 |
seed = np.random.randint(0, MAX_SEED)
|
43 |
|
44 |
image = pipeline.preprocess_image(image, resolution=1024)
|
45 |
-
|
46 |
-
|
47 |
outputs = pipeline.run(
|
48 |
normal_image,
|
49 |
seed=seed,
|
@@ -222,9 +222,9 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
|
|
222 |
|
223 |
if __name__ == "__main__":
|
224 |
# Initialize pipeline
|
225 |
-
pipeline = TrellisImageTo3DPipeline.from_pretrained("
|
226 |
pipeline.cuda()
|
227 |
-
|
228 |
# Initialize normal predictor
|
229 |
normal_predictor = torch.hub.load("hugoycj/StableNormal", "StableNormal_turbo", trust_repo=True, yoso_version='yoso-normal-v1-8-1')
|
230 |
|
|
|
42 |
seed = np.random.randint(0, MAX_SEED)
|
43 |
|
44 |
image = pipeline.preprocess_image(image, resolution=1024)
|
45 |
+
normal_image = normal_predictor(image, resolution=768, match_input_resolution=True, data_type='object')
|
46 |
+
|
47 |
outputs = pipeline.run(
|
48 |
normal_image,
|
49 |
seed=seed,
|
|
|
222 |
|
223 |
if __name__ == "__main__":
|
224 |
# Initialize pipeline
|
225 |
+
pipeline = TrellisImageTo3DPipeline.from_pretrained("Stable-X/trellis-normal-v0-1")
|
226 |
pipeline.cuda()
|
227 |
+
|
228 |
# Initialize normal predictor
|
229 |
normal_predictor = torch.hub.load("hugoycj/StableNormal", "StableNormal_turbo", trust_repo=True, yoso_version='yoso-normal-v1-8-1')
|
230 |
|