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",
)
| 47 | |
| 48 | |
| 49 | def 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 | |
| 76 | def create_prerigcheck_task(model_task_id: str) -> str: |
no test coverage detected