d3c83053f2
- CMakeLists.txt - app.md - appicon.ico - backend/ - main.cpp Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
18 lines
502 B
Python
18 lines
502 B
Python
"""Interfaz comun para backends image-to-3D.
|
|
|
|
Cada backend (triposr, hunyuan3d_2, trellis) expone:
|
|
load() -> Handle
|
|
donde Handle tiene metodo infer(image: PIL.Image, cfg: dict) -> bytes (GLB).
|
|
|
|
`cfg` recibe: seed, mc_resolution, foreground_ratio, texture.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
from typing import Protocol, Any, Dict
|
|
from PIL import Image
|
|
|
|
|
|
class BackendHandle(Protocol):
|
|
def infer(self, image: Image.Image, cfg: Dict[str, Any]) -> bytes: ...
|
|
def close(self) -> None: ...
|