My stuff

  • My Workflows

  • Liked Workflows

  • Following Workflows

Go to OpenArt main site
Upload workflow

FLUX LoRA trainer 2.0

5.0

0 reviews
25
23.9K
4.8K
25
Description


A ComfyUI workflow to train LoRA's for FLUX.1 Dev model.

An
easy-to-use workflow that allows you to train your own LoRA's on
ComfyUI. Based on Kohya (Kohya-ss backend) and Kijai (ComfyUI custom
nodes) incredible works.

----------------

To train a LoRA (Low Rank Adaptation) for FLUX these are the steps you should follow before clicking on Queue:

1)
Prepare learning data - that is an images set (min 10, 20-30 is fine,
but for some specific LoRA's the more is better). The image quality is
VERY important, use only high-res images with good quality (no blurred
imgs, out of focus, etc.)

2) You don't need to create the caption
.txt files, FLUX model's LoRA's can be trained on images only, but on
some specific kind of training caption is needed (like for example style
LoRA's)

3) Check you have set the input (training images) and the
output (saved LoRA's) folders correctly. For ComfyUI windows-portable
version the "training" directory must be created in the same directory
with "ComfyUI_windows_portable" one.

4) Set your LoraTrigger word (optional)

5)
Add at least on prompt (up to 4 prompts) for Training Validation in the
"Prompts for Validation" green node, at the bottom. Prompts must be
separated by "|".<br>

6) Adjust training settings (or leave default ones)

-Max training steps: 1000-4000

-Network_dim: can be 4,8,16,32,64,128 (high values mean better quality but larger lora files)

-Network_alpha: default is 1

-Learning rate: suggested 0.0004

-Blocks_to_swap: default 18

For more details on settings here are a couple of links:<br>

-Kohya-ss usage documentation

-Kohya-ss lora training

Now click "Queue" and wait a few hours... (Unless you have a nVidia H100 as GPU)

At the end of the trainig you will have a few different LoRA's, chose the best one and enjoy it in your next workflow!



Discussion

(No comments yet)

Loading...

Author

6
16.7K
173
66.9K

No reviews yet

  • - latest (9 months ago)

Primitive Nodes (57)

Bookmark (rgthree) (1)

Display Any (rgthree) (3)

Fast Bypasser (rgthree) (3)

FluxTrainEnd (1)

FluxTrainLoop (4)

FluxTrainModelSelect (1)

FluxTrainSave (4)

FluxTrainValidate (4)

FluxTrainValidationSettings (1)

GetNode (12)

ImageConcatFromBatch (1)

InitFluxLoRATraining (1)

Note (4)

Note Plus (mtb) (1)

OptimizerConfig (1)

Primitive integer [Crystools] (1)

SetNode (6)

TrainDatasetAdd (3)

TrainDatasetGeneralConfig (1)

VisualizeLoss (4)

Custom Nodes (22)

ComfyUI

  • - PreviewImage (4)

  • - SaveImage (5)

ComfyUI Essentials

  • - SimpleMath+ (1)

  • - ImageBatchMulti (1)

  • - GetImageSizeAndCount (1)

  • - AddLabel (5)

  • - SomethingToString (4)

  • - StringConstantMultiline (1)

Checkpoints (0)

LoRAs (0)