frame count

This commit is contained in:
RyanOnTheInside
2025-05-03 17:51:37 -04:00
parent e502120cc1
commit ecee3022f6
+4 -3
View File
@@ -69,7 +69,8 @@ class FastWebcamCapture:
}
}
RETURN_TYPES = ("IMAGE",)
RETURN_TYPES = ("IMAGE", "INT")
RETURN_NAMES = ("image", "frame_count")
FUNCTION = "process_capture"
CATEGORY = "image"
@@ -110,7 +111,7 @@ class FastWebcamCapture:
# ComfyUI expects BHWC format
image_tensor = torch.from_numpy(image_np)[None, ...]
return (image_tensor,)
return (image_tensor, 1)
# JSON frames data from sequence capture
elif image.startswith("{") and "frames" in image:
@@ -164,7 +165,7 @@ class FastWebcamCapture:
print(f"Final video tensor shape: {video_tensor.shape}")
return (video_tensor,)
return (video_tensor, len(frames))
except Exception as e:
import traceback