rupeshs / fastsdcpu

Fast stable diffusion on CPU
MIT License
1.5k stars 121 forks source link

Fix LoRA support in LCM-LoRA mode #245

Closed monstruosoft closed 2 months ago

monstruosoft commented 2 months ago

This minor change fixes LoRA support in LCM-LoRA mode. Also, I'm not completely sure, but it looks like not calling _fuselora() considerably reduces RAM usage at the cost of slightly higher generation times.

monstruosoft commented 2 months ago

In recent versions of diffusers the argument load_safety_checker can be problematic, so it was removed from the .safetensors loading code in LCM-LoRA mode in favor of using just safety_checker=None. RAM usage in LCM-LoRA mode when using safetensors models is still higher, don't know why.

wbruna commented 2 months ago

I can confirm load_safety_checker should be disabled; did the same on #248 .