Instructions to use darask0/MOSS-Image_4-step_adapter_lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use darask0/MOSS-Image_4-step_adapter_lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OpenMOSS-Team/MOSS-Image-SFT", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("darask0/MOSS-Image_4-step_adapter_lora") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
File size: 651 Bytes
47ea602 | 1 2 3 4 5 6 7 8 9 10 11 12 | #!/usr/bin/env bash
# On the pod: let the second teacher run go until DEADLINE (UTC, e.g. 21:50), stop it, then train DMAD on all GPUs.
DEADLINE=${1:?usage: pod_dmad.sh HH:MM}
until [[ "$(date -u +%H:%M)" > "$DEADLINE" || "$(date -u +%H:%M)" == "$DEADLINE" ]]; do sleep 20; done
pkill -f "rapid_moss.teachergen"
while pgrep -f "rapid_moss.teachergen" > /dev/null; do sleep 5; done
echo "== teacher samples: $(ls /workspace/teacher /workspace/teacher2 | grep -c safetensors) shards $(date -u +%T)"
cd /workspace/code
N=$(nvidia-smi -L | wc -l)
torchrun --nproc-per-node "$N" -m rapid_moss.train --config configs/dmad.json
echo "== done $(date -u +%T)"
|