Skip to content

Another comfy-ui compatible FLUX1.dev LoRA fails to load #10954

Open
@AmericanPresidentJimmyCarter

Description

Describe the bug

https://civitai.com/models/631986/xlabs-flux-realism-lora

This LoRA fails to load. Specifically, I get a ValueError: Incompatible keys detected.

Reproduction

import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to('cuda')

pipe.load_lora_weights('/data/models/flux_realism_lora.safetensors', adapter_name="wow_details")

prompt = "a tiny astronaut hatching from an egg on the moon"
out = pipe(
    prompt=prompt,
    guidance_scale=3.5,
    height=1024,
    width=1024,
    num_inference_steps=25,
).images[0]
out.save("image.png")

Logs

ValueError: Incompatible keys detected

System Info

Latest commit on main

Who can help?

@sayakpaul

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglorastaleIssues that haven't received updates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions