Instructions to use d-wang26/wd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use d-wang26/wd with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("d-wang26/wd", 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
|
Download diffusers/examples/textual_inversion/README_sdxl.md from d-wang26/wd: direct link, hf CLI and curl.
- Browser
- Download file 742 Bytes
-
https://huggingface.co/d-wang26/wd/resolve/main/diffusers/examples/textual_inversion/README_sdxl.md
- Command line
-
hf download hf://d-wang26/wd/diffusers/examples/textual_inversion/README_sdxl.md
-
curl -L -o README_sdxl.md https://huggingface.co/d-wang26/wd/resolve/main/diffusers/examples/textual_inversion/README_sdxl.md
742 Bytes
Textual Inversion fine-tuning example for SDXL
export MODEL_NAME="stabilityai/stable-diffusion-xl-base-1.0"
export DATA_DIR="./cat"
accelerate launch textual_inversion_sdxl.py \
--pretrained_model_name_or_path=$MODEL_NAME \
--train_data_dir=$DATA_DIR \
--learnable_property="object" \
--placeholder_token="<cat-toy>" \
--initializer_token="toy" \
--mixed_precision="bf16" \
--resolution=768 \
--train_batch_size=1 \
--gradient_accumulation_steps=4 \
--max_train_steps=500 \
--learning_rate=5.0e-04 \
--scale_lr \
--lr_scheduler="constant" \
--lr_warmup_steps=0 \
--save_as_full_pipeline \
--output_dir="./textual_inversion_cat_sdxl"
For now, only training of the first text encoder is supported.