Control image brightness
Last updated
Last updated
The Stable Diffusion pipeline is mediocre at generating images that are either very bright or dark as explained in the paper. The solutions proposed in the paper are currently implemented in the which you can use to improve the lighting in your images.
π‘ Take a look at the paper linked above for more details about the proposed solutions!
One of the solutions is to train a model with v prediction and v loss. Add the following flag to the or scripts to enable v_prediction
:
Copied
For example, letβs use the checkpoint which has been finetuned with v_prediction
.
Next, configure the following parameters in the :
rescale_betas_zero_snr=True
, rescales the noise schedule to zero terminal signal-to-noise ratio (SNR)
timestep_spacing="trailing"
, starts sampling from the last timestep
Copied
Finally, in your call to the pipeline, set guidance_rescale
to prevent overexposure:
Copied