ComfyUI Extension
Comfyui-Condition-Utils
A tool to manage condition
lrzjason/Comfyui-Condition-Utils
Nodes3
On cloudLocal install
Categoryconditioning/utils
Stars13
Updatedabout a year ago
Nodes (3)
Readme
Comfyui-Condition-Utils
A collection of utility nodes for handling condition tensors in ComfyUI.
Nodes

Save Condition
This node allows you to save a condition tensor to a file with a specified filename. The tensor will be saved in the ComfyUI/models/conditions folder.
Inputs
- condition: The
CONDITIONINGtensor to save. - filename: The name to use for the saved file (e.g.,
my_condition). The.ckptextension will be added automatically if not provided.
Behavior
- This is an output node, meaning it doesn't pass any data to subsequent nodes in the workflow.
- It ensures the
ComfyUI/models/conditionsdirectory exists, creating it if necessary. - Filenames are sanitized to prevent path traversal issues.
- The condition tensor, which is typically a list of tuples
(tensor, conditioning_info), is saved.
Load Condition
This node allows you to load a previously saved condition tensor from a file.
Inputs
- filename: A dropdown list of available
.ckptfiles (displayed without the extension) found in theComfyUI/models/conditionsdirectory. Select the desired condition file to load.
Outputs
- CONDITIONING: The loaded condition tensor.
Behavior
- It ensures the
ComfyUI/models/conditionsdirectory exists. - Filenames are sanitized.
- If the selected file is not found, an error is printed, and an empty conditioning is returned as a fallback.
Key Changes & Features
- Centralized Condition Storage: Conditions are now stored in
ComfyUI/models/conditions, managed via ComfyUI'sfolder_pathssystem. This makes it easier to manage and locate saved conditions. - Dynamic File Loading: The
Load Conditionnode now dynamically lists available condition files from theconditionsdirectory, providing a user-friendly dropdown menu. - Automatic Directory Creation: Both nodes automatically create the
conditionsdirectory if it doesn't exist. - Filename Sanitization: Ensures safe file handling.
- Automatic
.ckptExtension: The.ckptextension is handled automatically for both saving and loading.
Installation
- Clone or download this repository into your ComfyUI's
custom_nodesdirectory. - Restart ComfyUI.
- The nodes will be available in the "conditioning/utils" category.
Usage
- To Save: Connect a condition tensor to the
Save Conditionnode's input, specify a filename, and the tensor will be saved to theComfyUI/models/conditionsfolder. - To Load: Select a previously saved condition file from the dropdown menu in the
Load Conditionnode. The node will output the loaded condition tensor for use in your workflow.
Contact
- Twitter: @Lrzjason
- Email: [email protected]
- QQ Group: 866612947
- Civitai: xiaozhijason