ComfyUI > Nodes > Comfyui-LoraUtils > Save LoRA

ComfyUI Node: Save LoRA

Class Name

SaveLora

Category
LoraUtils
Author
lrzjason (Account age: 4210days)
Extension
Comfyui-LoraUtils
Latest Updated
2025-11-13
Github Stars
0.03K

How to Install Comfyui-LoraUtils

Install this extension via the ComfyUI Manager by searching for Comfyui-LoraUtils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Comfyui-LoraUtils 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

Save LoRA Description

SaveLora efficiently saves LoRA models by reducing file size and appending `.safetensors` extension.

Save LoRA:

The SaveLora node is designed to efficiently save a LoRA (Low-Rank Adaptation) model to a specified directory, ensuring that only the necessary components are retained. This node is particularly useful for AI artists who work with large models and need to manage storage efficiently. By filtering out layers where all values are zero, SaveLora reduces the file size and optimizes the storage of LoRA models. This process not only conserves disk space but also enhances the performance of loading and using these models in future tasks. The node automatically appends a .safetensors extension to the filename if it is not already present, ensuring compatibility with systems that utilize this format. Overall, SaveLora provides a streamlined and user-friendly approach to managing LoRA models, making it an essential tool for those looking to maintain an organized and efficient workflow.

Save LoRA Input Parameters:

lora

The lora parameter represents the LoRA model that you wish to save. It is a dictionary-like structure containing various layers and their corresponding tensor values. The node processes this input to filter out any layers where all values are zero, thereby optimizing the model for storage. This parameter is crucial as it directly influences the content and size of the saved file.

filename

The filename parameter specifies the name of the file to which the LoRA model will be saved. It is important to choose a descriptive and unique filename to easily identify the model later. If the filename does not include the .safetensors extension, the node will automatically append it to ensure the file is saved in the correct format.

output_dir

The output_dir parameter determines the directory where the LoRA model will be saved. If not provided, the node uses a default directory specified within its configuration. This parameter allows you to organize your saved models in a structured manner, making it easier to locate and manage them in the future.

Save LoRA Output Parameters:

{}

The SaveLora node does not produce any direct output parameters that are returned to the user. Instead, its primary function is to save the processed LoRA model to the specified directory. The successful execution of this node is indicated by a console message confirming the location and size reduction of the saved model.

Save LoRA Usage Tips:

  • Ensure that the filename parameter is unique and descriptive to avoid overwriting existing files and to facilitate easy identification of the model later.
  • Regularly check the output_dir to ensure it is correctly set to your desired location, especially if you are working with multiple projects or models.
  • Use the node's filtering capability to manage storage efficiently by removing unnecessary zero-value layers, which can significantly reduce file size.

Save LoRA Common Errors and Solutions:

Directory not found

  • Explanation: This error occurs when the specified output_dir does not exist and cannot be created.
  • Solution: Ensure that the path provided in output_dir is correct and that you have the necessary permissions to create directories in the specified location.

File extension missing

  • Explanation: If the filename does not include the .safetensors extension, the node will append it automatically, but this might cause confusion if not anticipated.
  • Solution: Always include the .safetensors extension in your filename to avoid unexpected changes and ensure compatibility with other systems.

Zero layers removed

  • Explanation: A message indicating that zero-only layers have been removed might appear, which is part of the node's optimization process.
  • Solution: This is not an error but a feature. If you need to retain all layers, ensure that they contain non-zero values or adjust your model accordingly.

Save LoRA Related Nodes

Go back to the extension to check out more related nodes.
Comfyui-LoraUtils
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 Models, enabling artists to harness the latest AI tools to create incredible art.