ComfyUI > Nodes > ComfyUI > Extract and Save Lora

ComfyUI Node: Extract and Save Lora

Class Name

LoraSave

Category
_for_testing
Author
ComfyAnonymous (Account age: 872days)
Extension
ComfyUI
Latest Updated
2025-05-13
Github Stars
76.71K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Extract and Save Lora Description

Facilitates extraction and saving of Lora models for AI art customization and fine-tuning.

Extract and Save Lora:

The LoraSave node is designed to facilitate the extraction and saving of Lora models, which are specialized components used in AI art generation to enhance and modify model outputs. This node allows you to convert differences in model and text encoder outputs into a Lora format, which can then be saved for future use. By doing so, it enables the customization and fine-tuning of AI models, allowing for more personalized and varied artistic outputs. The primary function of this node is to take the differences between models or text encoders and transform them into a Lora model, which is then saved as a .safetensors file. This process is crucial for artists who wish to experiment with different model configurations and save their unique settings for later use, thus enhancing the creative possibilities in AI art generation.

Extract and Save Lora Input Parameters:

filename_prefix

The filename_prefix parameter specifies the initial part of the filename for the saved Lora model. It helps in organizing and identifying the saved files by providing a custom prefix. The default value is "loras/ComfyUI_extracted_lora", and it is a string type parameter.

rank

The rank parameter determines the dimensionality of the Lora model being saved. It affects the complexity and size of the model, with higher values leading to more detailed models. The default value is 8, with a minimum of 1 and a maximum of 4096, allowing for fine-tuning based on the desired model complexity.

lora_type

The lora_type parameter specifies the type of Lora model to be saved. It is a selection from predefined Lora types, which dictate the model's structure and behavior. This parameter is crucial for ensuring compatibility with the intended use case and model architecture.

bias_diff

The bias_diff parameter is a boolean that indicates whether to include bias differences in the Lora model. When set to True, it ensures that any bias differences between models are captured and saved, which can be important for maintaining the fidelity of the model's output. The default value is True.

model_diff

The model_diff parameter is optional and represents the differences in the model output that are to be converted into a Lora model. It is of type MODEL and is used when you want to save changes specific to the model's output.

text_encoder_diff

The text_encoder_diff parameter is optional and represents the differences in the text encoder output that are to be converted into a Lora model. It is of type CLIP and is used when you want to save changes specific to the text encoder's output.

Extract and Save Lora Output Parameters:

This node does not produce any direct output parameters. Instead, its primary function is to save the Lora model to a specified location, which can then be used in other processes or applications.

Extract and Save Lora Usage Tips:

  • Ensure that either model_diff or text_encoder_diff is provided; otherwise, the node will not perform any action.
  • Use a descriptive filename_prefix to easily identify and organize your saved Lora models, especially when working with multiple configurations.

Extract and Save Lora Common Errors and Solutions:

No model_diff or text_encoder_diff provided

  • Explanation: The node requires at least one of the model_diff or text_encoder_diff parameters to be provided to perform its function.
  • Solution: Ensure that you provide either a model_diff or text_encoder_diff input to the node before execution.

Invalid lora_type

  • Explanation: The lora_type provided does not match any of the predefined Lora types.
  • Solution: Verify that the lora_type is selected from the available options and corresponds to a valid Lora type.

Output directory not found

  • Explanation: The specified output directory for saving the Lora model does not exist.
  • Solution: Check the output directory path and ensure it is correctly set up and accessible.

Extract and Save Lora Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.