"""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: ...