huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
23.93k stars 4.93k forks source link

[LCM-LoRA] unexpected keys while loading LCM LoRA with `peft` #7157

Open sayakpaul opened 4 months ago

sayakpaul commented 4 months ago

Code to reproduce:

from diffusers import LCMScheduler, StableDiffusionXLPipeline
import torch

pipeline = StableDiffusionXLPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16).to("cuda")
pipeline.load_lora_weights("latent-consistency/lcm-lora-sdxl")
pipeline.fuse_lora()
pipeline.scheduler = LCMScheduler.from_config(pipeline.scheduler.config)

_ = pipe(
    prompt="a dog",
    num_inference_steps=4,
    guidance_scale=1.0,
)

Unexpected keys can be found here: https://github.com/huggingface/diffusers/actions/runs/8105285148/job/22153378360#step:8:45.

Cc: @younesbelkada @pacman100

younesbelkada commented 4 months ago

thanks for reproting @sayakpaul what are the unexpected keys you get?

sayakpaul commented 4 months ago

@younesbelkada sorry. Just updated the PR description.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

sayakpaul commented 3 months ago

@younesbelkada a gentle ping here.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.