CivArchive
    Auto-caption and FL Trainer for LORA - v1.2
    Preview 24646889

    This workflow contains 4 groups for different use-cases. To activate one, right-click the group and click "Set group nodes to Always".

    You will need to install many custom nodes, you might want to read the docs of the following repositories :

    Group 1 : PNG Conversion

    Inputs :

    • Path of the images to convert

    • Path of the outputs

    • Format (set to PNG)

    Group 2 : Captioning

    Inputs :

    • Path to the dataset folder containing all the PNGs (IMPORTANT : Must be PNG, not JPEG or anything else).

    • Trigger words and appended words to the results.

    It will tag all the images one by one and create a TXT file with the same name as the PNG image.

    Group 3 : Training configuration

    Inputs :

    • Path to the dataset folder with the PNGs and TXT files.

    • Training prompt.

    I've set the "FL Khoya Adv Config" settings to the same used by CIVITAI.com in the "Train a LORA" function of the site but feel free to add/remove network dim and network alpha, try different optimizers and so on...

    Group 4 : Testing the model

    Inputs :

    • Your checkpoint

    • Your new LORA model

    • Prompts

    • Size and batch

    It is setup for SD15 models but can easily be changed to SDXL model loaders.

    Description

    • Added image converter to PNG

    • Removed preview from auto-caption

    FAQ

    Comments (1)

    FredoGarvinAug 31, 2024
    CivitAI

    I am having issues with the training section, the following error message:!!! Exception during processing!!! name 'file' is not defined

    Traceback (most recent call last):

    File "E:\Comfy\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute

    output_data, output_ui = get_output_data(obj, input_data_all)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "E:\Comfy\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data

    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "E:\Comfy\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list

    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "E:\Comfy\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-TrainTools-MZ\__init__.py", line 653, in start

    images = [x for x in images if x.lower().endswith(

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "E:\Comfy\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-TrainTools-MZ\__init__.py", line 654, in <listcomp>

    ".png") or x.lower().endswith(".jpg") or file.lower().endswith(".webp")]

    ^^^^

    NameError: name 'file' is not defined

    any help is appreciated

    Workflows
    SD 1.5

    Details

    Downloads
    418
    Platform
    CivitAI
    Platform Status
    Available
    Created
    8/16/2024
    Updated
    7/17/2026
    Deleted
    -

    Files

    autoCaptionAndFL_v12.zip

    Mirrors

    CivitAI (1 mirrors)