-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Premise: this is a model which does not accept the guidance_scale param and loads a specific set of model weights according to the amount of num_inference_steps you want to do (1, 2, 4 or 8 steps).
As apps would request the ByteDance/SDXL-Lightning model, the following code would make it default to 2 steps:
And then when running inference, it would override num_inference_steps to 2:
Apparently apps needs to append 4step or 8step to the model ID if they want to do a different amount of num_inference_steps. This can be very confusing to app developers, who likely just request ByteDance/SDXL-Lightning with a specific number of num_inference_steps, which then quietly get overwritten during inference.
This would also explain why people have reported this model to have bad output, as running this model at 8 steps provides a vastly different output than at 2 steps.
Proposed solutions could be to switch unet/LoRas during inference or to make the documentation very clear how this specifc model behaves. Luckily with models like RealVisXL_V4.0_Lightning you're not tied to a specific amount of inference_steps