[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72320":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":29,"discoverSource":30},72320,"fluxgym","cocktailpeanut\u002Ffluxgym","cocktailpeanut","Dead simple FLUX LoRA training UI with LOW VRAM support","",null,"Python",3226,373,25,395,0,2,6,13,68.02,"MIT License",false,"main",true,[],"2026-06-12 04:01:04","# Flux Gym\n\nDead simple web UI for training FLUX LoRA **with LOW VRAM (12GB\u002F16GB\u002F20GB) support.**\n\n- **Frontend:** The WebUI forked from [AI-Toolkit](https:\u002F\u002Fgithub.com\u002Fostris\u002Fai-toolkit) (Gradio UI created by https:\u002F\u002Fx.com\u002Fmultimodalart)\n- **Backend:** The Training script powered by [Kohya Scripts](https:\u002F\u002Fgithub.com\u002Fkohya-ss\u002Fsd-scripts)\n\nFluxGym supports 100% of Kohya sd-scripts features through an [Advanced](#advanced) tab, which is hidden by default.\n\n![screenshot.png](screenshot.png)\n\n---\n\n\n# What is this?\n\n1. I wanted a super simple UI for training Flux LoRAs\n2. The [AI-Toolkit](https:\u002F\u002Fgithub.com\u002Fostris\u002Fai-toolkit) project is great, and the gradio UI contribution by [@multimodalart](https:\u002F\u002Fx.com\u002Fmultimodalart) is perfect, but the project only works for 24GB VRAM.\n3. [Kohya Scripts](https:\u002F\u002Fgithub.com\u002Fkohya-ss\u002Fsd-scripts) are very flexible and powerful for training FLUX, but you need to run in terminal.\n4. What if you could have the simplicity of AI-Toolkit WebUI and the flexibility of Kohya Scripts?\n5. Flux Gym was born. Supports 12GB, 16GB, 20GB VRAMs, and extensible since it uses Kohya Scripts underneath.\n\n---\n\n# News\n\n- September 25: Docker support + Autodownload Models (No need to manually download models when setting up) + Support custom base models (not just flux-dev but anything, just need to include in the [models.yaml](models.yaml) file.\n- September 16: Added \"Publish to Huggingface\" + 100% Kohya sd-scripts feature support: https:\u002F\u002Fx.com\u002Fcocktailpeanut\u002Fstatus\u002F1835719701172756592\n- September 11: Automatic Sample Image Generation + Custom Resolution: https:\u002F\u002Fx.com\u002Fcocktailpeanut\u002Fstatus\u002F1833881392482066638\n\n---\n\n# Supported Models\n\n1. Flux1-dev\n2. Flux1-dev2pro (as explained here: https:\u002F\u002Fmedium.com\u002F@zhiwangshi28\u002Fwhy-flux-lora-so-hard-to-train-and-how-to-overcome-it-a0c70bc59eaf)\n3. Flux1-schnell (Couldn't get high quality results, so not really recommended, but feel free to experiment with it)\n4. More?\n\nThe models are automatically downloaded when you start training with the model selected.\n\nYou can easily add more to the supported models list by editing the [models.yaml](models.yaml) file. If you want to share some interesting base models, please send a PR.\n\n---\n\n# How people are using Fluxgym\n\nHere are people using Fluxgym to locally train Lora sharing their experience:\n\nhttps:\u002F\u002Fpinokio.computer\u002Fitem?uri=https:\u002F\u002Fgithub.com\u002Fcocktailpeanut\u002Ffluxgym\n\n\n# More Info\n\nTo learn more, check out this X thread: https:\u002F\u002Fx.com\u002Fcocktailpeanut\u002Fstatus\u002F1832084951115972653\n\n# Install\n\n## 1. One-Click Install\n\nYou can automatically install and launch everything locally with Pinokio 1-click launcher: https:\u002F\u002Fpinokio.computer\u002Fitem?uri=https:\u002F\u002Fgithub.com\u002Fcocktailpeanut\u002Ffluxgym\n\n\n## 2. Install Manually\n\nFirst clone Fluxgym and kohya-ss\u002Fsd-scripts:\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fcocktailpeanut\u002Ffluxgym\ncd fluxgym\ngit clone -b sd3 https:\u002F\u002Fgithub.com\u002Fkohya-ss\u002Fsd-scripts\n```\n\nYour folder structure will look like this:\n\n```\n\u002Ffluxgym\n  app.py\n  requirements.txt\n  \u002Fsd-scripts\n```\n\nNow activate a venv from the root `fluxgym` folder:\n\nIf you're on Windows:\n\n```\npython -m venv env\nenv\\Scripts\\activate\n```\n\nIf your're on Linux:\n\n```\npython -m venv env\nsource env\u002Fbin\u002Factivate\n```\n\nThis will create an `env` folder right below the `fluxgym` folder:\n\n```\n\u002Ffluxgym\n  app.py\n  requirements.txt\n  \u002Fsd-scripts\n  \u002Fenv\n```\n\nNow go to the `sd-scripts` folder and install dependencies to the activated environment:\n\n```\ncd sd-scripts\npip install -r requirements.txt\n```\n\nNow come back to the root folder and install the app dependencies:\n\n```\ncd ..\npip install -r requirements.txt\n```\n\nFinally, install pytorch Nightly:\n\n```\npip install --pre torch torchvision torchaudio --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu121\n```\n\nOr, in case of NVIDIA RTX 50-series (5090, etc.) you will need to install cu128 torch and update bitsandbytes to the latest:\n\n```\npip install --pre torch torchvision torchaudio --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fnightly\u002Fcu128\npip install -U bitsandbytes\n```\n\n\n# Start\n\nGo back to the root `fluxgym` folder, with the venv activated, run:\n\n```\npython app.py\n```\n\n> Make sure to have the venv activated before running `python app.py`.\n>\n> Windows: `env\u002FScripts\u002Factivate`\n> Linux: `source env\u002Fbin\u002Factivate`\n\n## 3. Install via Docker\n\nFirst clone Fluxgym and kohya-ss\u002Fsd-scripts:\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fcocktailpeanut\u002Ffluxgym\ncd fluxgym\ngit clone -b sd3 https:\u002F\u002Fgithub.com\u002Fkohya-ss\u002Fsd-scripts\n```\nCheck your `user id` and `group id` and change it if it's not 1000 via `environment variables` of `PUID` and `PGID`. \nYou can find out what these are in linux by running the following command: `id`\n\nNow build the image and run it via `docker-compose`:\n```\ndocker compose up -d --build\n```\n\nOpen web browser and goto the IP address of the computer\u002FVM: http:\u002F\u002Flocalhost:7860\n\n# Usage\n\nThe usage is pretty straightforward:\n\n1. Enter the lora info\n2. Upload images and caption them (using the trigger word)\n3. Click \"start\".\n\nThat's all!\n\n![flow.gif](flow.gif)\n\n# Configuration\n\n## Sample Images\n\nBy default fluxgym doesn't generate any sample images during training.\n\nYou can however configure Fluxgym to automatically generate sample images for every N steps. Here's what it looks like:\n\n![sample.png](sample.png)\n\nTo turn this on, just set the two fields:\n\n1. **Sample Image Prompts:** These prompts will be used to automatically generate images during training. If you want multiple, separate teach prompt with new line.\n2. **Sample Image Every N Steps:** If your \"Expected training steps\" is 960 and your \"Sample Image Every N Steps\" is 100, the images will be generated at step 100, 200, 300, 400, 500, 600, 700, 800, 900, for EACH prompt.\n\n![sample_fields.png](sample_fields.png)\n\n## Advanced Sample Images\n\nThanks to the built-in syntax from [kohya\u002Fsd-scripts](https:\u002F\u002Fgithub.com\u002Fkohya-ss\u002Fsd-scripts?tab=readme-ov-file#sample-image-generation-during-training), you can control exactly how the sample images are generated during the training phase:\n\nLet's say the trigger word is **hrld person.** Normally you would try sample prompts like:\n\n```\nhrld person is riding a bike\nhrld person is a body builder\nhrld person is a rock star\n```\n\nBut for every prompt you can include **advanced flags** to fully control the image generation process. For example, the `--d` flag lets you specify the SEED.\n\nSpecifying a seed means every sample image will use that exact seed, which means you can literally see the LoRA evolve. Here's an example usage:\n\n```\nhrld person is riding a bike --d 42\nhrld person is a body builder --d 42\nhrld person is a rock star --d 42\n```\n\nHere's what it looks like in the UI:\n\n![flags.png](flags.png)\n\nAnd here are the results:\n\n![seed.gif](seed.gif)\n\nIn addition to the `--d` flag, here are other flags you can use:\n\n\n- `--n`: Negative prompt up to the next option.\n- `--w`: Specifies the width of the generated image.\n- `--h`: Specifies the height of the generated image.\n- `--d`: Specifies the seed of the generated image.\n- `--l`: Specifies the CFG scale of the generated image.\n- `--s`: Specifies the number of steps in the generation.\n\nThe prompt weighting such as `( )` and `[ ]` also work. (Learn more about [Attention\u002FEmphasis](https:\u002F\u002Fgithub.com\u002FAUTOMATIC1111\u002Fstable-diffusion-webui\u002Fwiki\u002FFeatures#attentionemphasis))\n\n## Publishing to Huggingface\n\n1. Get your Huggingface Token from https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens\n2. Enter the token in the \"Huggingface Token\" field and click \"Login\". This will save the token text in a local file named `HF_TOKEN` (All local and private).\n3. Once you're logged in, you will be able to select a trained LoRA from the dropdown, edit the name if you want, and publish to Huggingface.\n\n![publish_to_hf.png](publish_to_hf.png)\n\n\n## Advanced\n\nThe advanced tab is automatically constructed by parsing the launch flags available to the latest version of [kohya sd-scripts](https:\u002F\u002Fgithub.com\u002Fkohya-ss\u002Fsd-scripts). This means Fluxgym is a full fledged UI for using the Kohya script.\n\n> By default the advanced tab is hidden. You can click the \"advanced\" accordion to expand it.\n\n![advanced.png](advanced.png)\n\n\n## Advanced Features\n\n### Uploading Caption Files\n\nYou can also upload the caption files along with the image files. You just need to follow the convention:\n\n1. Every caption file must be a `.txt` file.\n2. Each caption file needs to have a corresponding image file that has the same name.\n3. For example, if you have an image file named `img0.png`, the corresponding caption file must be `img0.txt`.\n","FluxGym 是一个用于训练 FLUX LoRA 模型的极简 Web UI，支持低显存（12GB\u002F16GB\u002F20GB）环境。项目前端基于 AI-Toolkit 的 Gradio UI，并集成了 Kohya Scripts 作为后端训练脚本，提供强大的训练功能和灵活性。通过隐藏的高级选项卡，用户可以访问 Kohya sd-scripts 的所有特性。该工具非常适合那些希望在有限硬件条件下进行高效机器学习模型训练的研究人员或开发者使用。此外，FluxGym 还提供了自动下载模型、自定义基础模型以及一键安装等便捷功能，使得整个设置过程更加简便快捷。","2026-06-11 03:41:20","high_star"]