MCPcopy
hub / github.com/htdt/godogen / create_image_to_model_task

Function create_image_to_model_task

asset-gen/tools/tripo3d.py:49–73  ·  view source on GitHub ↗

image_to_model on v3.1. face_limit=None omits the cap (HD preset).

(
    image_path: Path,
    *,
    face_limit: int | None = 30000,
    pbr: bool = True,
    geometry_quality: str = "standard",
    texture_quality: str = "standard",
)

Source from the content-addressed store, hash-verified

47
48
49def create_image_to_model_task(
50 image_path: Path,
51 *,
52 face_limit: int | None = 30000,
53 pbr: bool = True,
54 geometry_quality: str = "standard",
55 texture_quality: str = "standard",
56) -> str:
57 """image_to_model on v3.1. face_limit=None omits the cap (HD preset)."""
58 image_token = upload_image(image_path)
59 payload = {
60 "type": "image_to_model",
61 "model_version": MODEL_V31,
62 "file": {"type": "png", "file_token": image_token},
63 "texture": True,
64 "pbr": pbr,
65 "auto_size": True,
66 "orientation": "default",
67 "enable_image_autofix": True,
68 "geometry_quality": geometry_quality,
69 "texture_quality": texture_quality,
70 }
71 if face_limit is not None:
72 payload["face_limit"] = face_limit
73 return _submit_task(payload)
74
75
76def create_prerigcheck_task(model_task_id: str) -> str:

Callers 3

cmd_glbFunction · 0.90
cmd_rigFunction · 0.90
image_to_glbFunction · 0.85

Calls 2

upload_imageFunction · 0.85
_submit_taskFunction · 0.85

Tested by

no test coverage detected