Skip Layer Guidance (SLG) is a sampling technique that adds extra guidance to the original CFG in certain range of steps of sampling. The extra guidance is calculated by comparing the positive DiT model output from original model substracted by the positive model output from a variant model with certain layers removed (e.g. layer 7, 8 and 9 for Stable Diffusion 3.5 Medium).
Although SLG appears to be an optional choice, SAI seems officially prefer that enabled for Stable Diffusion 3.5 Medium. Evidance includes:
The official repo on HuggingFace Hub offers a ComfyUI workflow with SLG enabled.
Posts on Reddit (e.g. this one) and Twitter/X (e.g. this one) that cover the use of SLG in Stable Diffusion 3.5 Medium suggest that the use of SLG seems to be important to "reduces the chance of anatomy failure and increases the overall coherency", with multiple independent posts cross-validate this claim.
@LaurentMazare WDYT? If this is considered recommended officially, I guess it's better to support that in the MMDiT model and example. If it's justified, I can get this implemented this week.
If it's in the official implementation, it seems like a good option to add as long as the added complexity isn't too bad (the python diff looks pretty reasonable).
Skip Layer Guidance (SLG) is a sampling technique that adds extra guidance to the original CFG in certain range of steps of sampling. The extra guidance is calculated by comparing the positive DiT model output from original model substracted by the positive model output from a variant model with certain layers removed (e.g. layer 7, 8 and 9 for Stable Diffusion 3.5 Medium).
Although SLG appears to be an optional choice, SAI seems officially prefer that enabled for Stable Diffusion 3.5 Medium. Evidance includes:
Posts on Reddit (e.g. this one) and Twitter/X (e.g. this one) that cover the use of SLG in Stable Diffusion 3.5 Medium suggest that the use of SLG seems to be important to "reduces the chance of anatomy failure and increases the overall coherency", with multiple independent posts cross-validate this claim.
@LaurentMazare WDYT? If this is considered recommended officially, I guess it's better to support that in the MMDiT model and example. If it's justified, I can get this implemented this week.