ComfyUI > Nodes > Comfyui-LoraUtils > Create Lora Mapping Json

ComfyUI Node: Create Lora Mapping Json

Class Name

CreateLoraMappingJson

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

Create Lora Mapping Json Description

Generates a JSON to map and align keys between different LoRA models for compatibility.

Create Lora Mapping Json:

The CreateLoraMappingJson node is designed to facilitate the conversion of LoRA (Low-Rank Adaptation) model keys by generating a mapping JSON that aligns the keys from one LoRA model (LoRA A) to another (LoRA B). This node is particularly useful when you need to ensure compatibility between different LoRA models by identifying and mapping common layer structures. It intelligently analyzes the keys from both models, directly mapping those that are common and employing pattern recognition to align keys with similar core structures. This process helps in maintaining the integrity of model layers while adapting to new naming conventions, making it an essential tool for AI artists who work with multiple LoRA models and need to streamline their workflows.

Create Lora Mapping Json Input Parameters:

loraA

loraA is the source LoRA model from which the keys will be mapped. It serves as the reference point for creating the mapping JSON. The node examines the keys in loraA to identify commonalities and structural patterns that can be aligned with loraB. This parameter is crucial as it determines the starting point for the mapping process, and any inaccuracies in loraA can affect the resulting mapping.

loraB

loraB is the target LoRA model to which the keys from loraA will be mapped. This parameter is used to identify the corresponding keys in loraB that match or align with those in loraA. The node uses loraB to ensure that the mapping JSON accurately reflects the target model's structure, facilitating seamless conversion and integration of LoRA models.

Create Lora Mapping Json Output Parameters:

mapping_json

mapping_json is the output parameter that contains the JSON string representing the mapping of keys from loraA to loraB. This JSON is formatted with indentation for readability and provides a clear blueprint for converting the keys of one model to match the other. The output is essential for users who need to apply the mapping to convert LoRA models, ensuring that the models can be used interchangeably without manual key adjustments.

Create Lora Mapping Json Usage Tips:

  • Ensure that both loraA and loraB are correctly loaded and contain the necessary keys before running the node to avoid incomplete mappings.
  • Use the mapping JSON output to convert LoRA models using the ConvertLoraKeys node, which can apply the generated mapping to update model keys efficiently.

Create Lora Mapping Json Common Errors and Solutions:

KeyError: 'key_name'

  • Explanation: This error occurs when a key expected in loraA or loraB is missing, possibly due to an incorrect model loading or a mismatch in model versions.
  • Solution: Verify that both LoRA models are correctly loaded and contain all necessary keys. Ensure that the models are compatible and up-to-date.

JSONDecodeError

  • Explanation: This error might occur if the mapping JSON is malformed or if there is an issue during the conversion process.
  • Solution: Check the integrity of the mapping JSON output. Ensure that the node has completed its execution without interruptions and that the JSON is correctly formatted.

Create Lora Mapping Json 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.