Skip to content

jac3km4/latentspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

latentspace

This library aims to be a a complete Stable Diffusion implementation in idiomatic Rust built on top of ONNX. It's still in an early work-in-progress stage, but some pipelines already work, see examples.

features

Legend: 🐥 complete, 🐣 partially implemented, 🥚 not available yet
  • 🐥 txt2img
  • 🐣 img2img and inpainting
  • 🐥 CUDA and TensorRT accelerated inference
    • txt2img completes in ~2 seconds for a 512x512 image on modern Nvidia hardware
  • 🐥 fp32 and fp16 models
    • fp16 models can be leveraged to save space and memory
  • 🐣 support different schedulers
    • Euler, EulerAncestral and LMS for now
  • 🐥 long prompt weighting
  • 🥚 upscaling
  • 🥚 LORAs and textual inversions
  • 🐥 small footprint, no heavy dependencies
    • basic txt2img binary is <2MB on linux

preparing checkpoints

Checkpoints have to be converted to the ONNX format before use. I've built a convenience Docker image that can convert safetensors files into optimized fp16 ONNX models, it can be invoked through a script in this repository:

./utils/convert/convert.sh -i /home/me/checkpoints/CounterfeitAnime.safetensors -o /home/me/checkpoints/CounterfeitAnime-onnx

examples

About

Stable Diffusion in Rust

Topics

Resources

License

Stars

8 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors