lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.64k stars 854 forks source link

SDXL Patching LORA #1478

Open fishonainternet opened 3 months ago

fishonainternet commented 3 months ago

Hi, is it normal for ForgeUI to Patching LORAs in SDXL everytime you add a LORA or changing the LORA weight?

flyingyakan commented 3 months ago

I have similar questions. In recent versions, SDXL LoRA patching is unreasonably slow. This process was almost instantaneous in previous versions. At least, commit cfa5242 working as expected.

Frigate19 commented 3 months ago

Having the same issue. The fix is supposedly to set "Diffusion in Low Bits" to "Automatic (fp16 LoRA)" but that only skips the "patching lora for JointTextEncoder" step. It does NOT skip the "patching lora for kmodel" step, which takes even longer anyway

lllyasviel commented 3 months ago

if you go to previous version, patching lora will be about 5% to 10% slower than the current version.

However, previous versions do not print that progress bar, so you may feel previous version faster, but previous version is just doing same things in a slower way without printing progress bar.

if hiding that progress bar make users feel more comfortable, maybe i can give an option to hide that progress bar.

if you have any evidence that any previous version is really faster, show full logs of both previous and current version here. However I do not think this can happen.

flyingyakan commented 3 months ago

Definitely No. At least in my environment, this is a real problem. I tried to identify which commit caused this problem. Now I am certain that commit 1236966 is culprit. I am using RTX3050 8GB, perhaps this problem is apparent only on low-spec GPUs?

Frigate19 commented 3 months ago

I narrowed down my issue to adetailer. When I enable it, it runs fine once and then on subsequent generations it patches LORAs every single time no matter what my settings are (even though I'm not adding or changing LORAs). I don't use it very often but I definitely do not remember it causing this much of a slowdown on older forge versions. In general, I also do not remember the patching being this slow when changing a LORA weight in past versions, but I could be wrong on that one.

Antigone84 commented 3 months ago

I had this issue too and tried everything, it was working fine a few updates ago. Tried the fp16 automatic thing, changed drivers...etc. Nothing worked.