replicate/qwen-image-lora-trainer
Python
Captured source
source ↗replicate/qwen-image-lora-trainer
Language: Python
Stars: 18
Forks: 4
Open issues: 3
Created: 2025-08-05T21:38:46Z
Pushed: 2025-11-15T02:16:08Z
Default branch: main
Fork: no
Archived: no
README:
Qwen Image LoRA

Fine-tunable Qwen Image model with exceptional composition abilities. Train custom LoRAs for any style or subject.
Training
Train your own LoRA on Replicate or locally:
cog train -i dataset=@your-images.zip -i default_caption="A photo of a person named <>"
Training runs on Nvidia H100 GPU hardware and outputs a ZIP file with your LoRA weights.
Inference
Generate images using your trained LoRA:
cog predict -i prompt="A beautiful sunset" -i replicate_weights=@your-trained-lora.zip
Local Development
git clone --recursive https://github.com/your-repo/qwen-image-lora-trainer.git cd qwen-image-lora-trainer
Then use cog train and cog predict as shown above.
Dataset Format
Your training ZIP should contain images (.jpg, .png, .webp) and optionally matching .txt caption files:
dataset.zip ├── photo1.jpg ├── photo1.txt # "A photo of a person named <>" ├── photo2.jpg └── photo3.jpg # Will use default_caption
Important: Qwen Prompting
Critical: Qwen is extremely sensitive to prompting and differs from other image models. Do NOT use abstract tokens like "TOK", "sks", or meaningless identifiers.
Instead, use descriptive, familiar words that closely match your actual images:
- ✅ "person", "man", "woman", "dog", "cat", "building", "car"
- ❌ "TOK", "sks", "subj", random tokens
Every token carries meaning - the model learns by overriding specific descriptive concepts rather than learning new tokens. Be precise and descriptive about what's actually in your images.
Notes
- Training typically takes 15-30 minutes depending on dataset size
- Runs on Nvidia H100 GPU hardware on Replicate
Notability
notability 3.0/10Routine repo, low stars