视频上传
The boring video helper that saves the whole pack
- video_path
- video_info
Here's the thing nobody tells you about the video mosaic nodes in this pack: their video_path input is a plain text field, and ComfyUI - for all its power - has no native video file picker. You'd be typing absolute paths into a box like it's 2004. This node is the fix: it's the pack's little upload/drag-and-drop helper that hands you back a ready-to-wire path string. In the menu it's 视频上传 (video upload), right at the top of YZZ_Face_Mosaic.
What it actually does
Three inputs, all boring and all useful:
- video_file - a file path you type or paste. Fine if you know it.
- upload_video - the real feature. ComfyUI can hand this node a file dragged onto the canvas or uploaded through the widget, and the node handles both a raw path and a base64 data-URI payload (it sniffs the MIME type to pick
.mp4,.avi,.mov,.mkv, or.webm). - copy_to_input - default on. When it's on, the video gets copied into ComfyUI's
input/directory (with a_1,_2suffix if the name's taken) so the workflow is self-contained. Turn it off to use the file in place and skip the copy.
The node then opens the video with OpenCV to sanity-check it and pulls out fps, dimensions, frame count and duration. If the file can't be opened it raises a clear error, which beats discovering a bad path three nodes later.
The outputs and what they wire into
- video_path (STRING) - the resolved path, which is the one you actually care about. Wire it straight into the
video_pathinput ofFaceMosaicNode,GPUFaceMosaicNode,OptimizedFaceMosaicNode, the Selective or Torch video nodes, or the unified ones. STRING plugs into STRING - no converters needed. - video_info (STRING) - a JSON blob with fps, width, height, total frames, duration and file size. Drop it into a text display node if you want a "source: 1920×1080, 24fps" readout before you commit to processing.
Installing it
Comes with the whole pack, so it's ComfyUI Manager → search yzz_face_mosaic, or:
cd ComfyUI/custom_nodes
git clone https://github.com/yzzky/yzz_face_mosaic
pip install -r requirements.txt
Restart and it's under YZZ_Face_Mosaic. Dependencies are just OpenCV and numpy - nothing special.
Gotchas worth knowing
The video_file path input and the upload_video input are alternatives; if both are filled, the uploaded file wins. copy_to_input doubles your disk usage on big clips (it physically copies the file), so on a 4GB video you might prefer it off if you trust the original path to stay put. And if you're feeding this from the URL-a-png workflow crowd: it's a local-file node, no network anything. Keep it, it's the quiet workhorse of the pack.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| video_file | STRING | — | |
| upload_video | STRING | — | |
| copy_to_input | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video_path | STRING | — |
| video_info | STRING | — |