Sign In

FLUX Trainer Workflow

Updated: Feb 19, 2025

toolflux trainerflux

Download

1 variant available

Archive Other

flux-train.zip

509.47 KB

Verified:

Type
Workflows
Stats

147

Reviews
Published

Feb 17, 2025

Base Model

Flux.1 D

Hash
AutoV2
BEF1C313C4
default creator card background decoration
Followers - 14

14

Likes - 27

27

The FLUX.1 [dev] Model is licensed by Black Forest Labs. Inc. under the FLUX.1 [dev] Non-Commercial License. Copyright Black Forest Labs. Inc.

IN NO EVENT SHALL BLACK FOREST LABS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL.

Snipaste_2025-02-17_13-17-09.png

Training FLUX in ComfyUI. A brief workflow, didn't add regularization image.

v2.0 release note:
Fix Flux-Trainer VisualizeLoss can't record global loss bug. v1.0 workflow just show current loop loss and can't auto flash loss data, so it always show first loop loss.

v2.0 workflow fix this problem. But you should modify Flux-Trainer code.

class VisualizeLoss:
    @classmethod

    ...
    
    # change output types
    RETURN_TYPES = ("NETWORKTRAINER", "IMAGE", "FLOAT",)
    RETURN_NAMES = ("network_trainer", "plot", "loss_list",)
    FUNCTION = "draw"
    CATEGORY = "FluxTrainer"

    def draw(self, network_trainer, window_size, plot_style, normalize_y, width, height, log_scale):
        ...
        
        # add code
        training_loop = network_trainer["training_loop"]
        network_trainer = network_trainer["network_trainer"]

        ...
        
        # It will make loss list become a list of all the same constants, I don't know how to modify it, temporarily shut down it.
        # 
        # if window_size > 0:
        #     loss_values = moving_average(loss_values, window_size)

        ...
        
       
        trainer = {
            "network_trainer": network_trainer,
            "training_loop": training_loop,
        }
        
        # change output 
        return (trainer, image_tensor, loss_values,)