feat: add sd3.5 medium support (+skip layer guidance) #451
+417
−81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #450
How to Use
Download weights
Run
SD3.5 Medium
For example:
Skip Layer Guidance (SLG)
Variant of Classifier-Free Guidance (CFG) that seems to improve SD3.5 medium's output quality quite significantly (especially anatomy and hands for example), at the cost of slower inference speed (some steps require 3 evals of the model instead of 2).
> sd.exe --model ..\models\sd3.5_medium-q8_0.gguf --clip_l ..\models\clip\clip_l.safetensors --clip_g ..\models\clip\clip_g.safetensors --t5xxl ..\models\clip\t5xxl_q4_k.gguf -p 'A cute anime girl waving at the camera.' --cfg-scale 4.5 --sampling-method euler --steps 30 -t 24 --vae-tiling -W 512 -H 768 --seed 42
vs
> sd.exe --model ..\models\sd3.5_medium-q8_0.gguf --clip_l ..\models\clip\clip_l.safetensors --clip_g ..\models\clip\clip_g.safetensors --t5xxl ..\models\clip\t5xxl_q4_k.gguf -p 'A cute anime girl waving at the camera.' --cfg-scale 4.5 --sampling-method euler --steps 30 -t 24 --vae-tiling -W 512 -H 768 --seed 42 --slg-scale 2.5