mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-30 19:07:25 +08:00
feat: add model_info output to Load3D node
This commit is contained in:
parent
987a937658
commit
f29e27f8f9
@ -770,6 +770,23 @@ class Load3DCamera(ComfyTypeIO):
|
|||||||
Type = CameraInfo
|
Type = CameraInfo
|
||||||
|
|
||||||
|
|
||||||
|
@comfytype(io_type="LOAD3D_MODEL_INFO")
|
||||||
|
class Load3DModelInfo(ComfyTypeIO):
|
||||||
|
class ModelTransform(TypedDict):
|
||||||
|
uuid: str
|
||||||
|
name: str
|
||||||
|
type: str
|
||||||
|
position: dict[str, float | int]
|
||||||
|
rotation: dict[str, float | int | str]
|
||||||
|
quaternion: dict[str, float | int]
|
||||||
|
scale: dict[str, float | int]
|
||||||
|
up: dict[str, float | int]
|
||||||
|
visible: bool
|
||||||
|
matrix: list[float]
|
||||||
|
|
||||||
|
Type = list[ModelTransform]
|
||||||
|
|
||||||
|
|
||||||
@comfytype(io_type="LOAD_3D")
|
@comfytype(io_type="LOAD_3D")
|
||||||
class Load3D(ComfyTypeIO):
|
class Load3D(ComfyTypeIO):
|
||||||
"""3D models are stored as a dictionary."""
|
"""3D models are stored as a dictionary."""
|
||||||
@ -779,6 +796,7 @@ class Load3D(ComfyTypeIO):
|
|||||||
normal: str
|
normal: str
|
||||||
camera_info: Load3DCamera.CameraInfo
|
camera_info: Load3DCamera.CameraInfo
|
||||||
recording: NotRequired[str]
|
recording: NotRequired[str]
|
||||||
|
model_info: NotRequired[list[Load3DModelInfo.ModelTransform]]
|
||||||
|
|
||||||
Type = Model3DDict
|
Type = Model3DDict
|
||||||
|
|
||||||
@ -2291,6 +2309,7 @@ __all__ = [
|
|||||||
"FlowControl",
|
"FlowControl",
|
||||||
"Accumulation",
|
"Accumulation",
|
||||||
"Load3DCamera",
|
"Load3DCamera",
|
||||||
|
"Load3DModelInfo",
|
||||||
"Load3D",
|
"Load3D",
|
||||||
"Load3DAnimation",
|
"Load3DAnimation",
|
||||||
"Photomaker",
|
"Photomaker",
|
||||||
|
|||||||
@ -47,6 +47,7 @@ class Load3D(IO.ComfyNode):
|
|||||||
IO.Load3DCamera.Output(display_name="camera_info"),
|
IO.Load3DCamera.Output(display_name="camera_info"),
|
||||||
IO.Video.Output(display_name="recording_video"),
|
IO.Video.Output(display_name="recording_video"),
|
||||||
IO.File3DAny.Output(display_name="model_3d"),
|
IO.File3DAny.Output(display_name="model_3d"),
|
||||||
|
IO.Load3DModelInfo.Output(display_name="model_info"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -69,7 +70,8 @@ class Load3D(IO.ComfyNode):
|
|||||||
video = InputImpl.VideoFromFile(recording_video_path)
|
video = InputImpl.VideoFromFile(recording_video_path)
|
||||||
|
|
||||||
file_3d = Types.File3D(folder_paths.get_annotated_filepath(model_file))
|
file_3d = Types.File3D(folder_paths.get_annotated_filepath(model_file))
|
||||||
return IO.NodeOutput(output_image, output_mask, model_file, normal_image, image['camera_info'], video, file_3d)
|
model_info = image.get('model_info', [])
|
||||||
|
return IO.NodeOutput(output_image, output_mask, model_file, normal_image, image['camera_info'], video, file_3d, model_info)
|
||||||
|
|
||||||
process = execute # TODO: remove
|
process = execute # TODO: remove
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user