Spaces:
Sleeping
Sleeping
staswrs
commited on
Commit
·
144fa82
1
Parent(s):
89b815b
add octree depth controls fix 5
Browse files- app.py +0 -3
- inference_triposg.py +1 -0
app.py
CHANGED
@@ -70,7 +70,6 @@ rmbg_net.eval()
|
|
70 |
# def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25):
|
71 |
def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25, octree_depth=9):
|
72 |
print(f"[INPUT] face_number={face_number}, guidance_scale={guidance_scale}, num_steps={num_steps}, octree_depth={octree_depth}")# 👈 добавлено_et
|
73 |
-
# print(f"[INPUT] face_number={face_number}, guidance_scale={guidance_scale}, num_steps={num_steps}")# 👈 добавлено_et
|
74 |
print("[API CALL] image_path received:", image_path)
|
75 |
print("[API CALL] File exists:", os.path.exists(image_path))
|
76 |
|
@@ -84,10 +83,8 @@ def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25, oc
|
|
84 |
image_input=image_path,
|
85 |
rmbg_net=rmbg_net,
|
86 |
seed=42,
|
87 |
-
# num_inference_steps=int(num_steps),
|
88 |
num_inference_steps = round(float(num_steps)), # 👈 исправлено_et
|
89 |
guidance_scale=float(guidance_scale),
|
90 |
-
# faces=int(face_number),
|
91 |
faces=round(float(face_number)), # 👈 исправлено_et
|
92 |
octree_depth=int(octree_depth), # 👈 добавлено_et
|
93 |
)
|
|
|
70 |
# def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25):
|
71 |
def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25, octree_depth=9):
|
72 |
print(f"[INPUT] face_number={face_number}, guidance_scale={guidance_scale}, num_steps={num_steps}, octree_depth={octree_depth}")# 👈 добавлено_et
|
|
|
73 |
print("[API CALL] image_path received:", image_path)
|
74 |
print("[API CALL] File exists:", os.path.exists(image_path))
|
75 |
|
|
|
83 |
image_input=image_path,
|
84 |
rmbg_net=rmbg_net,
|
85 |
seed=42,
|
|
|
86 |
num_inference_steps = round(float(num_steps)), # 👈 исправлено_et
|
87 |
guidance_scale=float(guidance_scale),
|
|
|
88 |
faces=round(float(face_number)), # 👈 исправлено_et
|
89 |
octree_depth=int(octree_depth), # 👈 добавлено_et
|
90 |
)
|
inference_triposg.py
CHANGED
@@ -142,5 +142,6 @@ if __name__ == "__main__":
|
|
142 |
num_inference_steps=args.num_inference_steps,
|
143 |
guidance_scale=args.guidance_scale,
|
144 |
faces=args.faces,
|
|
|
145 |
).export(args.output_path)
|
146 |
print(f"Mesh saved to {args.output_path}")
|
|
|
142 |
num_inference_steps=args.num_inference_steps,
|
143 |
guidance_scale=args.guidance_scale,
|
144 |
faces=args.faces,
|
145 |
+
octree_depth=octree_depth,
|
146 |
).export(args.output_path)
|
147 |
print(f"Mesh saved to {args.output_path}")
|