AI Personal Learning
and practical guidance

Flux Gym: Easy UI for training FLUX LoRA with low video memory

General Introduction

Flux Gym is an easy web UI for training FLUX LoRA with low graphics memory support (12GB/16GB/20GB). The front-end is based on AI-Toolkit's Gradio UI, and the back-end is powered by Kohya Scripts.Flux Gym combines the simplicity of the AI-Toolkit WebUI with the flexibility of Kohya Scripts for a wide range of graphics memory configurations, and supports Docker and automatic model download features.

Flux Gym: a simple UI-1 for training FLUX LoRA with low graphics memory


 

Function List

  • Supports 12GB, 16GB, 20GB video memory
  • Docker support with automatic model download
  • Support for customized base models
  • Automatic generation of sample images
  • Posted to Huggingface
  • Advanced Function Options (hidden)

 

Using Help

Installation process

one-click installation

  1. utilizationPinokio one-click starterAutomatically installs and launches everything: Pinokio One-Click Launcher

manual installation

  1. Clone Fluxgym and kohya-ss/sd-scripts:
    git clone https://github.com/cocktailpeanut/fluxgym
    cd fluxgym
    git clone -b sd3 https://github.com/kohya-ss/sd-scripts
    
  2. Activate the virtual environment:
    • Windows.
      python -m venv env
      env\Scripts\activate
      
    • Linux.
      python -m venv env
      source env/bin/activate
      
  3. Install the dependencies:
    cd sd-scripts
    pip install -r requirements.txt
    cd .
    pip install --r requirements.txt
    pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
    
  4. Launch the application:
    python app.py
    

Docker Installation

  1. Clone Fluxgym and kohya-ss/sd-scripts:
    git clone https://github.com/cocktailpeanut/fluxgym
    cd fluxgym
    git clone -b sd3 https://github.com/kohya-ss/sd-scripts
    
  2. Build the image and run it:
    docker compose up -d --build
    
  3. Open your browser and visit: http://localhost:7860

Functional operation flow

  1. Enter the LoRA information.
  2. Upload images and add tags (using trigger words).
  3. Click on the "Start" button.

Sample Image Configuration

By default, Fluxgym does not generate sample images during training. You can configure Fluxgym to generate sample images at every N steps:

  • Sample Image Cues: These cues will be used to automatically generate images during training.
  • Sample images per N steps: For example, if the "Expected training steps" is 960 and the "Sample images per N steps" is 100, the images will be generated at the 100th, 200th and 300th steps.

Advanced Sample Images

Using the built-in Kohya sd-scripts syntax, you have full control over the sample images generated during the training phase:

  • Trigger words: e.g., hrld person.
  • Advanced flags: e.g., the --d flag specifies the seed, --w specifies the image width, --h specifies the image height, etc.

Posted to Huggingface

  1. Get Huggingface Token:Huggingface Token
  2. Enter the Token and click "Login".
  3. Select the trained LoRA, edit the name and publish it to Huggingface.
AI Easy Learning

The layman's guide to getting started with AI

Help you learn how to utilize AI tools at a low cost and from a zero base.AI, like office software, is an essential skill for everyone. Mastering AI will give you an edge in your job search and half the effort in your future work and studies.

View Details>
May not be reproduced without permission:Chief AI Sharing Circle " Flux Gym: Easy UI for training FLUX LoRA with low video memory

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish