Extensions/ComfyUI-FeiHou-Toolbox
ComfyUI Extension

ComfyUI-FeiHou-Toolbox

FeiHou Toolbox: API image/video generation, standalone multimodal media loading, reference-image, mask, seed-noise, and one-file VHS video saving tools.

By FX-FeiHou·Created 3 months ago·Updated 4 days ago· 136
FX-FeiHou/ComfyUI-FeiHou-Toolbox
Nodes13
On cloudLocal install
Categoryimage/compositing, utilities/logic
Stars136
Updated4 days ago
Readme

ComfyUI-FeiHou-Toolbox

花果山Ai灵境坊

  • Website / API service: api.fei-hou.net
  • Windows client download: GitHub releases · Quark. First-time users should select FeiHou-Ai-Studio-Win-1.1.4-full.zip, not the update ZIP or GitHub's Source code archives. Existing users should use the client updater.

FeiHou API media nodes

FeiHou-API Images and FeiHou-API Video use https://api.fei-hou.net. The separate FeiHou-API Media uses Easy-H3's gallery styles for 9 images, 3 videos and 3 audio files, including replacement, deletion, same-type drag reordering and audio trimming. Connect its media output to an API node, then type @ in that node's prompt to choose a loaded reference. Gallery records and prompt references survive node duplication and workflow saves; the actual files remain in the ComfyUI input directory.

The media socket also accepts native IMAGE batches, VIDEO or AUDIO; use the Media Loader for the visual reference menu. Provider limits still apply: choose a Seedance -multi model for mixed references; image models cannot consume audio/video. Clear the API key before sharing a workflow. The combined example is FeiHou_API_Image&Video_example.json. Its optional text display and group bypass controls require ComfyUI-Custom-Scripts and rgthree-comfy; the API nodes themselves do not depend on them.

A ComfyUI custom node toolbox focused on multi-image references, SAM3/SAM3.1 person cutouts, SCAIL-2 mask workflows, image batch utilities, boolean routing, and group-based workflow switching.

Current version: v2.10.1. The latest version of ManualRefCollage is v2.2.2.

<p align="right"> <a href="README_CN.md">中文说明</a> </p>

Installation

ComfyUI Manager

Search for ComfyUI-FeiHou-Toolbox in ComfyUI Manager, install it, then restart ComfyUI.

Manual Install

Open your ComfyUI custom_nodes directory and run:

git clone https://github.com/FX-FeiHou/ComfyUI-FeiHou-Toolbox.git

After installing or updating, restart ComfyUI and hard-refresh the browser page.


Nodes Overview

Node display titles follow the current ComfyUI language setting. This English README shows the English titles.

| Display Title | Node ID | Version | | --- | --- | --- | | Create SCAIL-2 Colored Mask V2 | SCAIL2ColoredMaskV2 | v2.6 | | Auto Ref Collage | AutoRefCollage | v1.0 | | Manual Ref Collage | ManualRefCollage | v2.2.2 | | Switch V2 | ComfySwitchNodeV2 | v2.0 | | Invert Boolean | InvertBoolean | v2.3 | | Image Batch Multi V2 | ImageBatchMultiV2 | v2.4 | | Fast Groups Bypass Switch | FastGroupsBypassSwitch | v2.0 | | Random Seed Noise | RandomSeedNoise | v2.8 | | Video Combine 🎥🅥🅗🅢 V2 | VideoCombineV2 | v2.9 | | FeiHou-Video Preview | FeiHouVideoPreview | v2.9.5 | | FeiHou-API Images | FeiHouApiImage | v2.10.0 | | FeiHou-API Video | FeiHouApiVideo | v2.10.0 | | FeiHou-API Media | FeiHouApiMediaLoader | v2.10.0 |

  • FeiHou-Video Preview: preview generated or uploaded videos with looping playback and preview controls.
  • FeiHou-API Images: API image generation with model selection, resolution, aspect ratio and media references.
  • FeiHou-API Video: API video generation with model-specific parameters; outputs VIDEO, a video URL and a last-frame IMAGE.
  • FeiHou-API Media: standalone gallery for up to 9 images, 3 videos and 3 audio files, with linked prompt @ references.

Create SCAIL-2 Colored Mask V2

An enhanced version of ComfyUI's original SCAIL-2 colored mask node, built for mask routing, separation, and batch handling in multi-reference workflows.

prefix_mask_mode supports:

  • Multi Image Single Color: each output batch image is single-color, matching the current reference_image_mask foreground color.
  • Multi Image Multi Color: each output batch image uses the node's object color palette rule.
  • Single Image Multi Color: output batch images use batch-order colors: blue, red, green, magenta, cyan, then loop after 5 images.

render_device supports:

  • gpu: renders masks on the graphics card for speed, using VRAM.
  • cpu: offloads mask rendering to system memory to reduce VRAM use, at a slower speed.

Auto Ref Collage

Automatically uses SAM3/SAM3.1 to cut people out from multiple reference images and compose them into a single multi-person reference collage.

Manual Ref Collage (v2.2.2)

A manual collage node that loads SAM3/SAM3.1 cutouts onto an editable canvas, allowing users to adjust position and scale before outputting the final composed image.

Switch V2

A revised switch node for toggling between two workflow paths while reducing issues caused by inactive branches.

Invert Boolean

An input-only boolean node that inverts true to false and false to true. It is compatible with PrimitiveBoolean output chains.

Image Batch Multi V2

A copy-style variant of KJNodes ImageBatchMulti for creating a batch from multiple image inputs. It keeps the dynamic input-count workflow, but skips missing or bypassed image inputs instead of adding black placeholder frames. If no image input is available, it returns no image output.

Fast Groups Bypass Switch (v2.0)

A group bypass and switch node that binds two ComfyUI Groups, switches which group is active, bypasses the inactive group, and outputs the corresponding input.


Changelog

v2.10.1

  • Fixed toolbox import failure on ComfyUI 0.33.1 by bundling API video preview handling instead of importing the newer core helper. The fallback uses the older save interface without preset.
  • Seven local tests passed; the user's cloud instance has not yet been tested.

v2.10.0

  • API Video now outputs a last-frame IMAGE, preferring the API tail image and falling back to the final decoded video frame. No extra PNG is saved. This output also works with Request last frame disabled.

  • Added FeiHou-API Images, FeiHou-API Video and the standalone FeiHou-API Media for api.fei-hou.net.

  • Model discovery, model parameters, 9-image/3-video/3-audio loading, native prompt @ references and audio trimming.

  • Easy-H3 gallery styles with balanced responsive spacing, hidden record serialization, lower-corner resizing and legacy workflow migration.

  • Updated English/Chinese i18n and example workflows.

v2.9.4

  • Made every Video Combine V2 widget input optional with a backend default. A frontend that omits a widget value can no longer fail prompt validation with Required input is missing: loop_count.

v2.9.3

  • Bundled the original VHS numeric widgets in Video Combine V2. frame_rate and loop_count now remain normal widgets when VideoHelperSuite is not installed, instead of becoming required sockets.

v2.9.2

  • Fixed Video Combine V2 widget inputs being incorrectly treated as required connections (including loop_count).
  • Vendored the complete VideoHelperSuite Video Combine backend, so Video Combine V2 works without a separate ComfyUI-VideoHelperSuite installation.
  • Kept the original full format, batching, VAE, audio, and preview logic; video output embeds workflow metadata, while audio output leaves only one final video and no first-frame PNG.

v2.9.1

  • Restored the original VideoHelperSuite Video Combine execution, preview-state restoration, batch support, and VHS filename output in Video Combine V2.
  • Video Combine V2 keeps only one final audio video, embeds ComfyUI metadata, and does not save the original first-frame PNG sidecar.

v2.9.0

  • Added Video Combine 🎥🅥🅗🅢 V2, based on VideoHelperSuite's Video Combine interface, format presets, VAE/LATENT handling, date-prefix handling, and preview behavior.
  • When audio is connected, Video Combine V2 writes one final video file containing the video stream, audio stream, and ComfyUI prompt/workflow metadata.
  • Restored the complete VideoHelperSuite format list and per-format dynamic widgets. The preview auto-plays muted and enables audio while hovered.

v2.8

  • Added RandomSeedNoise, a rgthree-style random seed controller that outputs standard NOISE for SamplerCustomAdvanced.

v2.6

  • Changed the render device to gpu and cpu options. gpu is the default; if a long video runs out of VRAM, manually switch to cpu.

v2.5

  • Optimized SAM3/SAM3.1 cutout memory usage in AutoRefCollage and ManualRefCollage.
  • Wrapped CLIP prompt encoding and SAM3 inference in torch.no_grad() to avoid retaining inference graphs during preview loading and workflow execution.
  • Reduced the matched-object refinement peak by keeping only the best mask/box before refinement and avoiding a full original-image GPU copy before cropping.

v2.4

  • Added ImageBatchMultiV2 (Image Batch Multi V2 / 图像组合批次(多重)V2), based on KJNodes ImageBatchMulti.
  • Kept the original dynamic inputcount and Update inputs workflow.
  • Changed missing-input handling: unconnected or bypassed image inputs are skipped instead of being replaced by black frames.
  • If no image inputs are available, the node returns no image output.

v2.3

  • Added InvertBoolean (Invert Boolean / 反转布尔值), a single-input single-output boolean inverter.
  • The node is compatible with PrimitiveBoolean output chains and flips true to false, false to true.

v2.2.2

  • Changed ManualRefCollage size handling so the manual canvas reads and applies current width / height inputs only when 应用尺寸 is clicked.
  • ManualRefCollage no longer auto-applies linked width/height during node creation, connection changes, or 载入图片, avoiding early reads before KJNodes Set / Get variable chains are ready.
  • Added compatibility for KJNodes-style Set_variable / Get_variable width and height routing; clicking 应用尺寸 now attempts to resolve the matching Set node and read the value from its input chain.

v2.2.1

  • Fixed ManualRefCollage not correctly reading externally connected width / height inputs in both the frontend manual canvas and backend execution.
  • Manual collage now prioritizes linked width/height inputs and falls back to the node's own width/height widgets only when linked values cannot be resolved.

v2.2

  • Updated Create SCAIL-2 Colored Mask V2 prefix_mask_mode behavior.
  • Multi Image Single Color renders every output batch image as a single color matching the current reference_image_mask foreground color.
  • Added Multi Image Multi Color for rendering every output batch image with the node's object color palette rule.
  • Single Image Multi Color renders output batch images with batch-order colors: blue, red, green, magenta, cyan, then loops after 5 images.

v2.1

  • Fixed ManualRefCollage preview loading images from ignored/bypassed inputs.
  • Fixed ignored/bypassed image inputs still being included during manual collage execution.
  • Fixed externally connected width / height being overridden by stale layout_json dimensions.

v2.0

  • Added FastGroupsBypassSwitch (多框忽略并切换).
  • Supports enabling, bypassing, and output switching between two ComfyUI Groups.
  • UI follows the rgthree Fast Groups Bypasser style for large grouped workflows.

v1.5

  • Finalized ManualRefCollage (多参图像手动拼接).
  • Supports SAM3/SAM3.1 cutouts and manual layout for up to 5 reference images.
  • Supports using the first video frame as a composition reference while keeping the final output on a black or white background.

v1.0

  • Initial release.
  • Added Create SCAIL-2 Colored Mask V2.
  • Added AutoRefCollage.