Instructions to use OFA-Sys/small-stable-diffusion-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OFA-Sys/small-stable-diffusion-v0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OFA-Sys/small-stable-diffusion-v0", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Nice model, but can't fine-tune
#12
by kopyl - opened
I just fined tuned https://huggingface.co/lambdalabs/miniSD-diffusers
which is a similar model to this except with 256x256 resultion.
The fine-tuning went well, but when i use the same approach on this model, i quickly get zero step loss at 100 steps. Do you know why? Here i my params:
!accelerate launch --mixed_precision="fp16" train_text_to_image.py \
--pretrained_model_name_or_path=OFA-Sys/small-stable-diffusion-v0 \
--use_ema \
--resolution=512 \
--train_batch_size=64 \
--max_train_steps=1000000 \
--checkpointing_steps=200 \
--learning_rate=4e-7 \
--max_grad_norm=1 \
--lr_scheduler="constant" \
--lr_warmup_steps=0 \
--noise_offset=0.05 \
I tried these LR:
- 4e-7
- 1e-5
-1e-6
and always get the zero loss
train_text_to_image.py is https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image.py