feat: support for SDXS-512 model#1180
Conversation
stable-diffusion.cpp
Outdated
| std::shared_ptr<TinyAutoEncoder> first_stage_model_tiny = nullptr; | ||
| std::shared_ptr<TinyAutoEncoder> tae_first_stage; |
There was a problem hiding this comment.
Why not just use tae_first_stage ?
There was a problem hiding this comment.
Also even though it's recommended to use with TAESD by default, it should work just fine with sd1.x KL-F8 VAE, just slower.
|
@stduhpf wrote:
Yes, but one needs additional options, it is slower and the output is not in the same quality as intended by IDkiro. ~/stable-diffusion.cpp/build/bin/sd-cli -m sdxs -p "portrait of a lovely cat" \
--cfg-scale 1 --steps 1 --taesd sdxs/vae/diffusion_pytorch_model.safetensorsI simply like the idea of using the provided models just "out of the box" without more mandatory options than really needed. That was the reason to continue after the second commit (i.e. the U-Net part). Anyway, a big THANK YOU for code your revision. |
|
Could you provide sdxs.safetensors for testing? |
|
..and here it is: use it via |
|
Thanks for merging this PR into your master. I think now we have extended once more the range of sd.cpp further towards the lower end. @leejet : Thank you very much! |
|
Is there any way I can get this model to generate different images for the same prompt? seems like no matter what I do it always generates nearly the same thing |
|
I can confirm that, but it also happens with PyTorch/Diffusers. Possibly a the disadvantage of the model ? |
ZIT has a simillar issue to a lesser extent. I'm guesssing the 1 step distillation makes it less sensitive to the original noise. |
|
@LostRuins : I have just added sdxs 0.9 in my fork. Do you want to try that ? https://github.com/akleine/stable-diffusion.cpp/tree/sdxs-09 Pls note: even though the name "SDXS-09" is similar to "SDXS", it is completely different from SDXS. |
|
I do want to try it! I'll give it a shot. If it's good, it would be even better if you could PR it here. Will reply here when I have some time to try it Edit: I can't find the sdxs09 source model. |
|
The model: The PR: |

Once I wrote "three TinySD models should be enough" ( #939 ), but I changed my mind on user's request in December 2025 ( #603 ) and because SDXS-512 is so incredible fast. (That makes SDXS very handy for my sdcpp-on-android project.)
The main challenge for me was that SDXS does not use AutoEncoderKL as primary VAE (as most else) but AutoEncoderTiny, see also https://huggingface.co/IDKiro/sdxs-512-dreamshaper . I also hope that including SDXS into sd.cpp will convince @IDKiro to release into the public his SDXS-1024 one day.