MCPcopy
hub / github.com/lightningpixel/modly / generate

Method generate

api/services/generators/base.py:108–121  ·  view source on GitHub ↗

Starts 3D generation from an image. Returns the path to the generated .glb file. progress_cb(percent: int, step_label: str) cancel_event: set this to interrupt generation between steps.

(
        self,
        image_bytes: bytes,
        params: dict,
        progress_cb: Optional[Callable[[int, str], None]] = None,
        cancel_event: Optional[threading.Event] = None,
    )

Source from the content-addressed store, hash-verified

106
107 @abstractmethod
108 def generate(
109 self,
110 image_bytes: bytes,
111 params: dict,
112 progress_cb: Optional[Callable[[int, str], None]] = None,
113 cancel_event: Optional[threading.Event] = None,
114 ) -> Path:
115 """
116 Starts 3D generation from an image.
117 Returns the path to the generated .glb file.
118 progress_cb(percent: int, step_label: str)
119 cancel_event: set this to interrupt generation between steps.
120 """
121 ...
122
123 def _check_cancelled(self, cancel_event: Optional[threading.Event]) -> None:
124 """Raises GenerationCancelled if cancel_event is set."""

Callers 2

mainFunction · 0.45
_run_generationFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected