Type | Workflows |
Stats | 1,408 |
Reviews | (82) |
Published | Sep 20, 2024 |
Base Model | |
Hash | AutoV2 49996CE0E1 |
This workflow is based on the incredible work by Kijai (https://github.com/kijai/ComfyUI-FluxTrainer) who created the training nodes for ComfyUI based on Kohya_ss (https://github.com/kohya-ss/sd-scripts) work. All credits go to them. Thanks also to u/tom83_be on Reddit who posted his installation and basic settings tips.
I just reworked the workflow and wrote a user-guide. I will keep updating the workflow too here.
With this workflow you can train LoRA's for FLUX on ComfyUI.
Around 12Gb Vram is all you need on your graphic card, so you don't need a RTX 3090 or 4090 Gpu, but it may need 32Gb Ram (set "split_mode" on "true").
If you are used to ComfyUI, the training process will be very easy, as the workflow is divided in nodes' group that allow you to set all the data needed for the LoRA training in a clear and easy way.
This workflow is also being tested on Runpod, using a A40 with 48Gb Vram.
You will need the following Flux Dev model files:
flux1-dev-fp8.safetensors
from https://huggingface.co/Kijai/flux-fp8/tree/main save it in ".../ComfyUI_training/ComfyUI/models/unet/t5xxl_fp8_e4m3fn.safetensors
from https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main save it in ".../ComfyUI_training/ComfyUI/models/clip/"clip_l.safetensors
from https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main save it in ".../ComfyUI_training/ComfyUI/models/clip/"ae.safetensors
from https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/main save it in ".../ComfyUI_training/ComfyUI/models/vae/"
The images I published were all created with a LoRA I trained with this workflow for a fiction instagram influencer called Kiara Aigen.
My suggestions: start with 10-20 image, 512x512 resolution, 2000 steps (so you will have 500 steps in each of the 4 Training group) and use Adafactor optimizer.
Remeber to set the right folder for input_dir (images set) and output_dir (where the workflow saves the LoRA's) and to change (add) a prompt in the "Init Flux Lora Training" node for Validation.
Check yellow notes in the workflow for more instructions.
Guide to this workflow is here: https://civitai.com/articles/7131/flux-lora-trainer-on-comfyui-v10
Enjoy!