Flux LoRA trainer and full-finetuning.
For now this is a utility wrapper around kohya that deals with:
conda create --name flux python=3.10
conda activate flux
git clone https://github.com/edenartlab/flux-trainer.git
cd flux-trainer
pip install -r requirements.txt
git clone https://github.com/kohya-ss/sd-scripts.git
cd sd-scripts
git checkout a2ad7e5644f08141fe053a2b63446d70d777bdcf
git checkout sd3
pip install -r requirements.txt
cd ..
Easiest way to download these models is:
pip install huggingface_hubhuggingface-cli loginAnd then run:
mkdir models
cd models
huggingface-cli download black-forest-labs/FLUX.1-dev ae.safetensors --repo-type model --local-dir .
huggingface-cli download black-forest-labs/FLUX.1-dev flux1-dev.safetensors --repo-type model --local-dir .
huggingface-cli download comfyanonymous/flux_text_encoders clip_l.safetensors --repo-type model --local-dir .
huggingface-cli download comfyanonymous/flux_text_encoders t5xxl_fp16.safetensors --repo-type model --local-dir .
If you have all these models already downloaded somewhere else, you can just point to their paths in your train_config.json
template/train_config.json and adjust with your training setup.template/eval_prompts.txtpython main.py --config /path/to/train_config.jsondocker build --build-arg HF_TOKEN=your_hf_token -t flux-trainer .
or
docker build --no-cache --build-arg HF_TOKEN=your_hf_token -t flux-trainer .
and then run eg:
docker run -it flux-trainer
or get a shell inside the container:
docker run -it flux-trainer /bin/bash
Python
97.9%
Dockerfile
2.1%
Flux LoRA trainer and full-finetuning.
For now this is a utility wrapper around kohya that deals with:
conda create --name flux python=3.10
conda activate flux
git clone https://github.com/edenartlab/flux-trainer.git
cd flux-trainer
pip install -r requirements.txt
git clone https://github.com/kohya-ss/sd-scripts.git
cd sd-scripts
git checkout a2ad7e5644f08141fe053a2b63446d70d777bdcf
git checkout sd3
pip install -r requirements.txt
cd ..
Easiest way to download these models is:
pip install huggingface_hubhuggingface-cli loginAnd then run:
mkdir models
cd models
huggingface-cli download black-forest-labs/FLUX.1-dev ae.safetensors --repo-type model --local-dir .
huggingface-cli download black-forest-labs/FLUX.1-dev flux1-dev.safetensors --repo-type model --local-dir .
huggingface-cli download comfyanonymous/flux_text_encoders clip_l.safetensors --repo-type model --local-dir .
huggingface-cli download comfyanonymous/flux_text_encoders t5xxl_fp16.safetensors --repo-type model --local-dir .
If you have all these models already downloaded somewhere else, you can just point to their paths in your train_config.json
template/train_config.json and adjust with your training setup.template/eval_prompts.txtpython main.py --config /path/to/train_config.jsondocker build --build-arg HF_TOKEN=your_hf_token -t flux-trainer .
or
docker build --no-cache --build-arg HF_TOKEN=your_hf_token -t flux-trainer .
and then run eg:
docker run -it flux-trainer
or get a shell inside the container:
docker run -it flux-trainer /bin/bash
Python
97.9%
Dockerfile
2.1%