Comments (2)
This should be able to run on a 8GB GPU by using fp16 weights and putting only the unet weights on the GPU. There are more details in the main readme.
from diffusers-rs.
Looks like v1.5 works at full precision on my 8GB GPU.
I now have the v2.1 working with fp16 using this script
#!/bin/bash
export LIBTORCH=$HOME/libtorch
export LD_LIBRARY_PATH=${LIBTORCH}/lib:$LD_LIBRARY_PATH
export PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:64
export RUST_BACKTRACE=1
export CARGO_TARGET_DIR=target2
cargo run \
--example stable-diffusion \
--features clap -- \
--cpu vae \
--cpu clip \
--prompt "$1"
max_split_size_mb
worked at 128mb, but very unreliably so I dropped it to 64mb and it seems good now.
The readme only has a link to the v1.5 fp15 weights so I generated my own from stabilityai's fp16 branch at https://huggingface.co/stabilityai/stable-diffusion-2-1/tree/fp16 and using the readme instructions here https://github.com/LaurentMazare/diffusers-rs#converting-the-original-weight-files
from diffusers-rs.
Related Issues (20)
- Feature Request: Negative prompts HOT 1
- Add Scheduler trait/enum HOT 2
- m1 mac gpu HOT 6
- Google Colab Notebook to run diffusion experiment on the GPU
- Embed the examples logic into the pipeline HOT 1
- How to load a parameter file in safetensors format? HOT 1
- PytorchStreamReader failed reading zip archive HOT 2
- ControlNet support? HOT 5
- Bad distorted picture using the in-painting example provided HOT 4
- Loading of text embeddings in pt format? HOT 2
- Example of inpaint doesn't work for Stable Diffusion 2.1 HOT 2
- Error: The system cannot find the file specified. (os error 2) HOT 2
- Tracking issue for SD ecosystem feature parity HOT 6
- DirectML Support HOT 1
- Cannot link when used together with cxx-qt crate HOT 1
- CUDA/GPU Not Working. HOT 1
- STATUS_DLL_NOT_FOUND HOT 1
- Benchmarks? HOT 1
- Integration with Stable Diffusion XL 1.0 ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffusers-rs.