ComfyUI Warper Nodes
NODES: DWPose Scaler (Warper), Mouth Mask from Pose (Warper), Facial Part Mask from Pose (Warper), Smart Video Batcher (Warper), Get Batch By Index (Warper), Smart…
Nodes (17)
ComfyUI Warper Nodes
A collection of general-purpose nodes for ComfyUI.
Current Nodes
-
DWPose Scaler (Warper): Provides advanced scaling and adjustment options for DWPose keypoints. (Category:
Warper Tools)
-
Flow Visualizer (Warper): Calculates optical flow between image sequences using the RAFT model and provides visual representations (color-coded flow images) for both forward and backward flow. Ideal for understanding motion in your generations. (Category:
Warper Tools/Flow)- Model Requirement: This node requires a RAFT model checkpoint.
-
Smart Video Batcher (Warper): Splits image sequences into smaller batches with special padding for the final batch. (Category:
Warper Tools/Looping) -
Get Batch By Index (Warper): Selects a single image batch from a list of batches by its index. (Category:
Warper Tools/Looping) -
Smart Overlapping Batcher (Warper): Creates overlapping batches from an image sequence to help maintain temporal consistency. (Category:
Warper Tools/Looping) -
Mouth Mask from Pose (Warper): Generates a circular mask around the mouth area based on facial keypoints. (Category:
Warper Tools/DWMasking) -
Facial Part Mask from Pose (Warper): Creates masks for various facial parts (entire face, mouth, eyes) using different shapes (convex hull, ellipse, etc.) based on facial keypoints. (Category:
Warper Tools/DWMasking)
Prompt Loading Nodes (Category: Warper Tools/Prompts)
-
Load Prompts from Directory (Warper): Loads text prompts from
.txtfiles in a specified directory with options for batch processing.- Inputs:
directory_path: Path to directory containing.txtfilesskip_first_files: Number of files to skip from the beginning (useful with incremental integer nodes for sequential access)load_cap: Maximum number of prompts to load at once
- Outputs:
prompts: List of loaded prompt textstotal_loaded: Number of prompts successfully loadedfile_names: List of filenames that were loaded
- Use Case: Perfect for batch processing multiple prompts or iterating through a prompt library with an incremental counter node.
- Inputs:
-
Load Single Prompt by Index (Warper): Loads a single prompt from a directory by its index position.
- Inputs:
directory_path: Path to directory containing.txtfilesfile_index: Index of the file to load (0-based)
- Outputs:
prompt: The loaded prompt textfile_name: Name of the loaded filetotal_files: Total number of.txtfiles in the directoryis_valid: Boolean indicating if the load was successful
- Use Case: Ideal for workflows that need to process prompts one at a time with precise index control.
- Inputs:
-
Combine Prompts (Warper): Combines multiple prompts with customizable separators and formatting.
- Inputs:
prompt1-4: Up to 4 prompt inputs (all optional)separator: Text to insert between prompts (default: ", ")prefix: Text to add before the combined resultsuffix: Text to add after the combined result
- Outputs:
combined_prompt: The final combined prompt string
- Use Case: Useful for building complex prompts from multiple sources or adding consistent formatting.
- Inputs:
Text File Iterator Nodes (Category: Warper Tools/Text)
-
Text File Iterator (Warper): Loads text files from a directory with different iteration modes.
- Inputs:
directory_path: Path to directory containing.txtfilesindex: Index number (behavior depends on mode)mode: Iteration mode selectionfixed: Always loads the file at the specified indexincremental: Cycles through files sequentially, remembering position between runsrandomized: Randomly selects a file using the index as a seed for reproducible results
- Outputs:
text_content: The content of the loaded text file
- Use Case: Perfect for iterating through prompt files with different access patterns - fixed for specific prompts, incremental for sequential workflows, or randomized for variety.
- Inputs:
-
Text File Iterator with Info (Warper): Enhanced version that provides additional file information.
- Inputs: Same as Text File Iterator
- Outputs:
text_content: The content of the loaded text filefile_name: Name of the loaded filefile_index: Index of the loaded file in the directorytotal_files: Total number of.txtfiles in the directory
- Use Case: Ideal when you need to track which file is being used or display progress information.
Installation
-
Navigate to your ComfyUI
custom_nodesdirectory. -
Clone this repository:
git clone https://github.com/AIWarper/ComfyUI-WarperNodes -
Install RAFT Model (Required for Flow Visualizer Node):
- Download the RAFT model checkpoint:
Tartan-C-T-TSKH-spring540x960-M.pth- Download Link: Google Drive Folder (Look for the specified
.pthfile within this folder.)
- Download Link: Google Drive Folder (Look for the specified
- Create a
raftfolder inside your ComfyUImodelsdirectory if it doesn't already exist:ComfyUI/models/raft/ - Place the downloaded
Tartan-C-T-TSKH-spring540x960-M.pthfile into thisComfyUI/models/raft/directory.
- Download the RAFT model checkpoint:
-
Install any Python package dependencies (if listed in
requirements.txt):cd ComfyUI-WarperNodes pip install -r requirements.txt(If you use ComfyUI's portable version, you might need to use its embedded Python, e.g.,
path/to/ComfyUI/python_embeded/python.exe -m pip install -r requirements.txt. If arequirements.txtfile is not present, this step may not be needed.) -
Restart ComfyUI.
Usage Notes
- Ensure the RAFT model is correctly placed as described above for the Flow Visualizer (Warper) node to function.
- The nodes will appear under the "Warper Tools" category in the ComfyUI "Add Node" menu.
TODO:
- Add example images/gifs for other nodes.
- More detailed usage instructions for each node.