未更新大佬最新内容哈,老的kontext训练
https://www.bilibili.com/video/BV1RbGTzfEQF/?vd_source=2ebab812a46c68cabe85acf4e3468677
可以自动断点继续炼
T2ITrainer is a diffusers based training script. It aims to provide simple yet implementation for lora training.
--config_path argument to train_flux_lora_ui_kontext.py
support config file to start the kontext trainingpython train_flux_lora_ui_kontext.py --config_path config.json
| Model Type | VRAM Requirements | Status |
|---|---|---|
| Kolors | 11GB GPU | ✅ Supported |
| SD3.5 (FP16 BS1) | 24GB GPU | ✅ Supported |
| Flux Fill,Kontext | 24GB GPU | ✅ Supported |
❗ Mandatory: Install Microsoft Visual C++ Redistributable if encountering DLL errors
Recommended Method
git clone https://github.com/lrzjason/T2ITrainer.git
cd T2ITrainer
setup.bat
Clone Repository 🌐
git clone https://github.com/lrzjason/T2ITrainer.git
cd T2ITrainer
Virtual Environment 🛠️
python -m venv venv call venv\Scripts\activate pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
Model Downloads 📥
# Kolors
huggingface-cli download Kwai-Kolors/Kolors --local-dir kolors_models/
# NF4 Flux Fill for low gpu
huggingface-cli download "lrzjason/flux-fill-nf4" --local-dir flux_models/fill/
# skip if downloaded nf 4 Flux Fill
huggingface-cli download "black-forest-labs/FLUX.1-fill-dev" --local-dir flux_models/fill/
# SD3.5 Models
huggingface-cli download "stabilityai/stable-diffusion-3.5-large" --local-dir "sd3.5L/"
# NF4 Flux kontext
huggingface-cli download "lrzjason/flux-kontext-nf4" --local-dir flux_models/kontext/
|
flux_models:
|
kontext:
|
| Script | Command | Special Notes |
|---|---|---|
| Flux kontext | python ui_flux_fill.py | Requires diffusers>=0.32.0, 24GB VRAM Recommended |
| Flux Fill | python ui_flux_fill.py | Requires diffusers>=0.32.0, 24GB VRAM Recommended |
| Kolors | python ui.py | Needs Fixed VAE |
| SD3.5 Large | python ui_sd35.py | 24GB VRAM Recommended |
Inpainting Model Setup
huggingface-cli download "lrzjason/flux-kontext-nf4" --local-dir flux_models/kontext/
For more details (example dataset):
Inpainting Model Setup
huggingface-cli download "lrzjason/flux-fill-nf4" --local-dir flux_models/fill/
For more details (example dataset):
Dev Model Installation
huggingface-cli download "black-forest-labs/FLUX.1-dev" --local-dir flux_models/dev/
| Category | Settings |
|---|---|
| Base Configuration | Rank 16, AdamW, Lr 1e-4 |
| 24GB GPU | 512 resolution, Batch Size 1 |
| VRAM Optimization | Use nf4 based training |
| Precision | bf16 |
VRAM Peak
|
VRAM Peak
|
VRAM Low
|
Register WandB before using it Setup WandB env
pip install wandb wandb login
Install Tensorboard first if you choice to use Tensorboard To visualize training data, run the following command in your terminal:
tensorboard --logdir=.\logs
Kolors Workflow:
# ComfyUI Plugins
git clone https://github.com/kijai/ComfyUI-KwaiKolorsWrapper
git clone https://github.com/MinusZoneAI/ComfyUI-Kolors-MZ
Configuration Guide: 📖 CivitAI Article
blocks_to_swap parameter (higher values reduce memory usage)huggingface-cli download "black-forest-labs/FLUX.1-Kontext-dev" --local-dir flux_models/kontext_full/ --exclude "*.safetensors"
--config_path argument to train_flux_lora_ui_kontext.py
support config file to start the kontext trainingpython train_flux_lora_ui_kontext.py --config_path config.json
|
Buy me a coffee:
|
WeChat:
|