Merge branch 'master' into feat/load3d-model-info-output
Some checks are pending
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Build package / Build Test (3.10) (push) Waiting to run
Build package / Build Test (3.11) (push) Waiting to run
Build package / Build Test (3.12) (push) Waiting to run
Build package / Build Test (3.13) (push) Waiting to run
Build package / Build Test (3.14) (push) Waiting to run

This commit is contained in:
Alexis Rolland 2026-05-28 18:19:00 -07:00 committed by GitHub
commit d9caddfcfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 62 additions and 20 deletions

View File

@ -0,0 +1,24 @@
name: Detect Unreviewed Merge
# SOC 2 compliance — reusable workflow lives in Comfy-Org/github-workflows,
# tracking issues are filed in Comfy-Org/unreviewed-merges.
on:
push:
branches: [master]
concurrency:
group: detect-unreviewed-merge-${{ github.sha }}
cancel-in-progress: false
permissions:
contents: read
pull-requests: read
jobs:
detect:
uses: Comfy-Org/github-workflows/.github/workflows/detect-unreviewed-merge.yml@4d9cb6b87f953bb7cd69954280e1465fb9bd2040 # v1
with:
approval-mode: latest-per-reviewer
secrets:
UNREVIEWED_MERGES_TOKEN: ${{ secrets.UNREVIEWED_MERGES_TOKEN }}

View File

@ -762,17 +762,17 @@ class Accumulation(ComfyTypeIO):
@comfytype(io_type="LOAD3D_CAMERA") @comfytype(io_type="LOAD3D_CAMERA")
class Load3DCamera(ComfyTypeIO): class Load3DCamera(ComfyTypeIO):
class CameraInfo(TypedDict): class CameraInfo(TypedDict):
position: dict[str, float | int] # Coordinate system: right-handed, Y-up, camera looks down -Z
target: dict[str, float | int] position: dict[str, float | int] # scene units
zoom: int target: dict[str, float | int] # scene units; OrbitControls focus point
cameraType: str zoom: float | int # dimensionless, 1 = 100%
quaternion: NotRequired[dict[str, float | int]] cameraType: str # 'perspective' | 'orthographic'
rotation: NotRequired[dict[str, float | int | str]] quaternion: NotRequired[dict[str, float | int]] # normalized, dimensionless; camera world rotation
fov: NotRequired[float | int] fov: NotRequired[float | int] # degrees, vertical FOV (perspective only)
aspect: NotRequired[float | int] aspect: NotRequired[float | int] # width / height (perspective only)
near: NotRequired[float | int] near: NotRequired[float | int] # scene units
far: NotRequired[float | int] far: NotRequired[float | int] # scene units
frustum: NotRequired[dict[str, float | int]] frustum: NotRequired[dict[str, float | int]] # orthographic only: {left, right, top, bottom} in scene units
Type = CameraInfo Type = CameraInfo

View File

@ -206,7 +206,7 @@ class BeebleSwitchXVideoEdit(IO.ComfyNode):
return IO.Schema( return IO.Schema(
node_id="BeebleSwitchXVideoEdit", node_id="BeebleSwitchXVideoEdit",
display_name="Beeble SwitchX Video Edit", display_name="Beeble SwitchX Video Edit",
category="api node/video/Beeble", category="video/partner/Beeble",
description=( description=(
"Edit a video with Beeble SwitchX. Switches anything in the scene (background, " "Edit a video with Beeble SwitchX. Switches anything in the scene (background, "
"lighting, costume) while preserving the original subject's pixels and motion. " "lighting, costume) while preserving the original subject's pixels and motion. "
@ -302,7 +302,7 @@ class BeebleSwitchXImageEdit(IO.ComfyNode):
return IO.Schema( return IO.Schema(
node_id="BeebleSwitchXImageEdit", node_id="BeebleSwitchXImageEdit",
display_name="Beeble SwitchX Image Edit", display_name="Beeble SwitchX Image Edit",
category="api node/image/Beeble", category="image/partner/Beeble",
description=( description=(
"Edit a single image with Beeble SwitchX. Switches anything in the scene " "Edit a single image with Beeble SwitchX. Switches anything in the scene "
"(background, lighting, costume) while preserving the original subject's pixels. " "(background, lighting, costume) while preserving the original subject's pixels. "

View File

@ -157,7 +157,7 @@ class LoadImageTextDataSetFromFolderNode(io.ComfyNode):
return io.NodeOutput(output_tensor, captions) return io.NodeOutput(output_tensor, captions)
def save_images_to_folder(image_list, output_dir, prefix="image"): def save_images_to_folder(image_list, output_dir, prefix="image", overwrite=True):
"""Utility function to save a list of image tensors to disk. """Utility function to save a list of image tensors to disk.
Args: Args:
@ -197,7 +197,11 @@ def save_images_to_folder(image_list, output_dir, prefix="image"):
raise ValueError(f"Expected torch.Tensor, got {type(img_tensor)}") raise ValueError(f"Expected torch.Tensor, got {type(img_tensor)}")
# Save image # Save image
if overwrite:
filename = f"{prefix}_{idx:05d}.png" filename = f"{prefix}_{idx:05d}.png"
else:
_, _, counter, _, resolved_prefix = folder_paths.get_save_image_path(prefix, output_dir)
filename = f"{resolved_prefix}_{counter:05}_{idx:05d}.png"
filepath = os.path.join(output_dir, filename) filepath = os.path.join(output_dir, filename)
img.save(filepath) img.save(filepath)
saved_files.append(filename) saved_files.append(filename)
@ -230,19 +234,26 @@ class SaveImageDataSetToFolderNode(io.ComfyNode):
tooltip="Prefix for saved image filenames.", tooltip="Prefix for saved image filenames.",
advanced=True, advanced=True,
), ),
io.Combo.Input(
"mode",
default="overwrite",
options=["overwrite", "increment"],
tooltip="Whether to overwrite existing files or increment filenames to avoid overwriting."
),
], ],
outputs=[], outputs=[],
is_deprecated=True, # This node is redundant and superseded by existing Save Image nodes where the target folder can be specified in the filename_prefix is_deprecated=True, # This node is redundant and superseded by existing Save Image nodes where the target folder can be specified in the filename_prefix
) )
@classmethod @classmethod
def execute(cls, images, folder_name, filename_prefix): def execute(cls, images, folder_name, filename_prefix, mode):
# Extract scalar values # Extract scalar values
folder_name = folder_name[0] folder_name = folder_name[0]
filename_prefix = filename_prefix[0] filename_prefix = filename_prefix[0]
mode = mode[0]
output_dir = os.path.join(folder_paths.get_output_directory(), folder_name) output_dir = os.path.join(folder_paths.get_output_directory(), folder_name)
saved_files = save_images_to_folder(images, output_dir, filename_prefix) saved_files = save_images_to_folder(images, output_dir, filename_prefix, mode=='overwrite')
logging.info(f"Saved {len(saved_files)} images to {output_dir}.") logging.info(f"Saved {len(saved_files)} images to {output_dir}.")
return io.NodeOutput() return io.NodeOutput()
@ -278,18 +289,25 @@ class SaveImageTextDataSetToFolderNode(io.ComfyNode):
tooltip="Prefix for saved image filenames.", tooltip="Prefix for saved image filenames.",
advanced=True, advanced=True,
), ),
io.Combo.Input(
"mode",
default="overwrite",
options=["overwrite", "increment"],
tooltip="Whether to overwrite existing files or increment filenames to avoid overwriting."
),
], ],
outputs=[], outputs=[],
) )
@classmethod @classmethod
def execute(cls, images, folder_name, filename_prefix, texts=None): def execute(cls, images, folder_name, filename_prefix, mode, texts=None):
# Extract scalar values # Extract scalar values
folder_name = folder_name[0] folder_name = folder_name[0]
filename_prefix = filename_prefix[0] filename_prefix = filename_prefix[0]
mode = mode[0]
output_dir = os.path.join(folder_paths.get_output_directory(), folder_name) output_dir = os.path.join(folder_paths.get_output_directory(), folder_name)
saved_files = save_images_to_folder(images, output_dir, filename_prefix) saved_files = save_images_to_folder(images, output_dir, filename_prefix, mode=='overwrite')
# Save captions # Save captions
if texts: if texts:

View File

@ -21,7 +21,7 @@ psutil
alembic alembic
SQLAlchemy>=2.0.0 SQLAlchemy>=2.0.0
filelock filelock
av>=14.2.0 av>=16.0.0
comfy-kitchen>=0.2.8 comfy-kitchen>=0.2.8
comfy-aimdo==0.4.5 comfy-aimdo==0.4.5
requests requests