Contact Us
Apps Page Background Image
Learn/Blog/How to Add LoRA in ComfyUI SD1.5/SDXL/FLUX

RecommendHow to Add LoRA in ComfyUI SD1.5/SDXL/FLUX

1
1
0
Mimic PC
10/03/2024
ComfyUI
flux
Learn how to seamlessly integrate LoRA into ComfyUI for SD1.5, SDXL, and Flux using MimicPC. Discover step-by-step instructions on downloading, uploading, and configuring LoRA files to enhance your image generation workflows, including special tips for Flux integration.

loraLoRA is a fantastic way to customize and fine-tune image generation in ComfyUI, whether you're using SD1.5, SDXL, or Flux. With LoRAs, you can easily personalize characters, outfits, or objects in your creations. In this post, I'll walk you through how to add LoRAs to ComfyUI using MimicPC, making the whole process a breeze.

 add LoRAs to ComfyUI

Run This Workflow Now

  • All nodes and models are ready to go.
  • No manual setup required.
  • Error-free—just click and run!

Step 1: Download LoRA

Before incorporating LoRA into your workflow, you’ll need to download the file:

  1. Locate LoRA Files: Download LoRA files from sources like Hugging Face or copy the download link.
  2. Prepare for Upload: In MimicPC, uploading LoRA files is simple and efficient.

Download LoRA

Step 2: Upload LoRA to MimicPC

Once you have your LoRA file or URL, follow these steps to upload it into MimicPC:

  1. Navigate to Storage Manager: In MimicPC, go to Storage Manage and navigate to storage > model > loras.
  2. Upload the File: You can either upload the LoRA file from your device or use the URL upload option to link the file from an external source.
  3. Restart the Application: After the upload, restart ComfyUI within MimicPC to ensure it detects the new LoRA files. If the application is already running, a simple restart will suffice.

Upload LoRA to MimicPC

Step 3: Load the Default Workflow in ComfyUI

Once inside the ComfyUI environment, start by loading the default workflow. This step sets the foundational framework for incorporating LoRA. MimicPC simplifies this by providing a ready-to-use workflow, so manual setup is minimized.

Step 4: Add the LoRA Node for SD1.5/SDXL

Now it’s time to incorporate the LoRA node into your workflow for SD1.5/SDXL:

  1. Load LoRA Node: In ComfyUI, double-click on the workspace or right-click to choose Add Node > Loaders > Load LoRA. This will allow you to add the LoRA node.
  2. Configure LoRA Settings: Once the node is added, set the lora_name to reference the LoRA file you uploaded in the MimicPC > storage > model > loras directory. Adjust the strength_model and strength_clip values to determine how strongly LoRA impacts the diffusion and CLIP models.

Add the LoRA Node for SD1.5/SDXL

Step 5: Connect the LoRA Node

Next, integrate the LoRA node into your workflow:

  1. Position the Node: Place the LoRA node between the diffusion model and the CLIP nodes in your workflow.
  2. Link the Nodes: Connect the input/output of the LoRA node to the corresponding parts of your workflow to complete the setup.

Step 6: Test Your Workflow

After setting up the node, perform a test run:

  1. Generate an Image: This will help ensure that LoRA is correctly integrated into your workflow.
  2. Adjust the Strength: If needed, tweak the strength_model and strength_clip values for optimal results. You can also incorporate trigger words into your prompts for finer control.

Step 7 (Optional): LoRA Stacking

If one LoRA isn’t sufficient, you can combine multiple LoRAs for more advanced outputs:

  1. Use LoRA Stacker: In the Efficiency Nodes custom node, you can load multiple LoRAs.
  2. Individual Strength Adjustment: Fine-tune the strength of each LoRA for the desired effect.

LoRA Stacking

Run This Workflow Now

  • All nodes and models are ready to go.
  • No manual setup required.
  • Error-free—just click and run!




Additional Step for Flux: Adding LoRA in Flux

Flux has its own dedicated nodes, so the process for adding LoRA requires an additional step:

  1. Reload Flux Nodes: Before adding LoRA to Flux workflows, you need to reload the Flux-specific nodes. This ensures that the Flux environment is properly set up.
  2. Add LoRA Node to Flux Workflow: Once the Flux nodes are loaded, you can follow the same steps as above to incorporate the LoRA node. Place the LoRA node between the diffusion model and CLIP nodes in your Flux workflow.
  3. Test and Adjust: As with SD1.5/SDXL, generate an image and adjust the strength settings for the LoRA to ensure optimal results.

Adding LoRA in Flux

Test and Adjust

Conclusion

Wrapping it all up, using LoRA with ComfyUI in MimicPC really makes the whole workflow smooth, whether you're working with SD1.5, SDXL, or Flux. Adding a single LoRA or even stacking multiple ones is super easy and straightforward. For Flux, you’ll just need to reload its specific nodes, but after that, it’s basically the same as with SD1.5/SDXL. With these simple steps, you’ll be opening up a world of creative possibilities for your image generation projects!




Catalogue
Tutorial companion templates
ComfyUI
Image of ComfyUI - flux-lora image
Image of ComfyUI - flux-lora
Updated by 09/10/20240 GB