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
26.07k stars 5.37k forks source link

cross_attention_kwargs ['scale'] are not expected by XFormersAttnProcessor and will be ignored. #7519

Closed wb315 closed 7 months ago

wb315 commented 7 months ago

Describe the bug

when i want to inference the trainde model, i use the "scale" params in cross_attention_kwargs, there has the info as "cross_attention_kwargs ['scale'] are not expected by XFormersAttnProcessor and will be ignored."。 I what to konw the "scale" is effective ? Looking forward to your reply!

Reproduction

model_path = "sd-pokemon-model-lora-sdxl" 
pipe.load_lora_weights(model_path)
prompt = "Charmander from Pokémon is playing in the swimming pool."
image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5, cross_attention_kwargs={"scale":0.5}).images[0]

Logs

1711709772063

System Info

diffusers==0.27.0.dev0 xformers==0.0.24+cu118 torch==2.2.0+cu118 torchvision==0.17.0+cu118

Who can help?

No response

sayakpaul commented 7 months ago

It's not a bug. peft takes care of scale already.

YuzhiChen001 commented 6 months ago

Describe the bug

when i want to inference the trainde model, i use the "scale" params in cross_attention_kwargs, there has the info as "cross_attention_kwargs ['scale'] are not expected by XFormersAttnProcessor and will be ignored."。 I what to konw the "scale" is effective ? Looking forward to your reply!

Reproduction

model_path = "sd-pokemon-model-lora-sdxl" 
pipe.load_lora_weights(model_path)
prompt = "Charmander from Pokémon is playing in the swimming pool."
image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5, cross_attention_kwargs={"scale":0.5}).images[0]

Logs

1711709772063

System Info

diffusers==0.27.0.dev0 xformers==0.0.24+cu118 torch==2.2.0+cu118 torchvision==0.17.0+cu118

Who can help?

No response

Have you solved this problem?