ComfyUI-AdvancedLivePortrait
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
SaveExpData
SaveExpData Node Documentation
Overview
The SaveExpData node is a component within the ComfyUI-AdvancedLivePortrait project, designed to facilitate the storage of expression data. This node is part of the broader functionality of manipulating and inserting facial expressions into images and videos using ComfyUI workflows. It enables users to save the state of expressions, which can later be loaded and reused through the LoadExpData node, aiding in the creation of consistent and repeatable workflows.
Functionality
1. Purpose
The SaveExpData node allows users to save expression data into a file. This feature is particularly useful when you want to preserve specific facial expressions derived or modified during a workflow session for future reference or reuse.
2. Inputs
This node accepts the following inputs:
-
file_name: A string representing the desired name for the saved expression file. This name should be a valid filename, as it will be used to create a file in the designated output directory.
-
save_exp: Expression data to be saved. This input is optional and is expected to be of type
EXP_DATA, which contains the expression set to be stored.
3. Outputs
The node produces the following output:
- file_name: A string indicating the name of the file where the expression data has been saved. This serves as confirmation of the operation.
4. Usage in ComfyUI Workflows
In a ComfyUI workflow, the SaveExpData node can be strategically used to capture and save expressions at any point in the process. Here's a typical use case:
-
Inserting and Modifying Expressions: At various stages of your workflow, you might use nodes to insert or modify facial expressions on source images or videos.
-
Saving Expressions: Before finalizing the workflow or when a particular expression configuration is desired, use the
SaveExpDatanode to save this specific state. You provide theEXP_DATAfrom preceding nodes and specify afile_nameto save the state. -
Retrieving Expressions: Later, in the same or different workflows, use the corresponding
LoadExpDatanode to retrieve these saved expressions, allowing for consistent application of previously configured expressions.
5. Special Features and Considerations
-
File Naming: Ensure that the
file_nameprovided is unique and descriptive to avoid overwriting existing files unintentionally. -
Output Directory: The node saves files to a predefined directory
\ComfyUI\output\exp_data\, where all expression data files are stored. Users should ensure they have access to this directory and manage the files appropriately. -
Optional Expression Data: If the
save_expinput is not provided, the node will not perform the save operation. Ensure that valid expression data is being passed when the node is triggered; otherwise, only the file name will be returned without any associated data. -
Integration with LoadExpData: For seamless workflows, complement the
SaveExpDatanode with theLoadExpDatanode to make the best use of saved expressions. By saving and then later loading expressions, users can build workflows that reproduce past results with precision.
In summary, the SaveExpData node adds robustness and flexibility to workflows involving facial expressions by enabling users to save and organize expression states effectively. It is a key node for users who need to reuse or iterate on expression configurations within ComfyUI.