Text-to-Image
Diffusers
TensorBoard
Safetensors
StableDiffusionPipeline
dreambooth
diffusers-training
stable-diffusion
stable-diffusion-diffusers
Instructions to use noamaz/dog_example with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use noamaz/dog_example with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("noamaz/dog_example", torch_dtype=torch.bfloat16, device_map="cuda") prompt = "a photo of sks dog" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
| export MODEL_NAME="runwayml/stable-diffusion-v1-5" | |
| export INSTANCE_DIR="/dt/shabtaia/dt-sicpa/noam/diffusers/examples/dog_example/images" | |
| export OUTPUT_DIR="/dt/shabtaia/dt-sicpa/noam/diffusers/examples/dog_example" | |
| accelerate launch train_dreambooth.py \ | |
| --pretrained_model_name_or_path=$MODEL_NAME \ | |
| --instance_data_dir=$INSTANCE_DIR \ | |
| --output_dir=$OUTPUT_DIR \ | |
| --instance_prompt="a photo of sks dog" \ | |
| --resolution=512 \ | |
| --train_batch_size=1 \ | |
| --gradient_accumulation_steps=1 \ | |
| --learning_rate=5e-6 \ | |
| --lr_scheduler="constant" \ | |
| --lr_warmup_steps=0 \ | |
| --max_train_steps=400 \ | |
| --push_to_hub |