{"id":44,"date":"2026-01-20T09:22:01","date_gmt":"2026-01-20T01:22:01","guid":{"rendered":"https:\/\/www.starverse-ai.com\/guide\/?p=44"},"modified":"2026-01-21T09:52:39","modified_gmt":"2026-01-21T01:52:39","slug":"fluxgym%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8c%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.starverse-ai.com\/guide\/archives\/44","title":{"rendered":"fluxgym\u600e\u4e48\u8fd0\u884c(\u4f7f\u7528\u6559\u7a0b)"},"content":{"rendered":"\n<p>FluxGym\u600e\u4e48\u8fd0\u884c\uff1f\u901a\u5e38\u9700\u8981\u57fa\u7840\u7684\u786c\u4ef6\u652f\u6301,\u5e76\u4e14\u6709\u4e0d\u540c\u7684\u7248\u672c\u53ef\u4f9b\u9009\u62e9,\u53ef\u4ee5\u6839\u636e\u4ee5\u4e0b\u6559\u7a0b\u91cc\u9762\u7684\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff01\u4e5f\u53ef\u4ee5\u76f4\u63a5\u5728\u6211\u4eec\u7f51\u7ad9\u6ce8\u518c\u76f4\u63a5\u514d\u8d39\u90e8\u7f72\u7b80\u5355\u4fbf\u6377\u3002<\/p>\n\n\n\n<p>\u4e00\u3001FluxGym \u7b80\u4ecb\u200b<\/p>\n\n\n\n<p>FluxGym \u662f\u4e00\u6b3e\u4e13\u4e3a FLUX \u6a21\u578b\u8bbe\u8ba1\u7684 LoRA \u8bad\u7ec3\u5de5\u5177\uff0c\u878d\u5408\u4e86 AI-Toolkit \u7684\u7b80\u6d01 WebUI \u4e0e Kohya \u811a\u672c\u7684\u7075\u6d3b\u529f\u80fd\uff0c\u652f\u6301 12GB-20GB VRAM \u8bbe\u5907\uff0c\u65e0\u9700\u590d\u6742\u7ec8\u7aef\u64cd\u4f5c\u5373\u53ef\u5b9e\u73b0\u6a21\u578b\u4e2a\u6027\u5316\u5fae\u8c03\u3002\u5176\u6838\u5fc3\u4f18\u52bf\u5728\u4e8e\u81ea\u52a8\u4e0b\u8f7d\u6a21\u578b\u3001\u652f\u6301\u81ea\u5b9a\u4e49\u57fa\u7840\u6a21\u578b\uff0c\u4e14\u517c\u5bb9 Windows \u4e0e Linux \u7cfb\u7edf\uff0c\u662f AI \u7ed8\u753b\u7231\u597d\u8005\u7684\u9ad8\u6548\u8bad\u7ec3\u5de5\u5177\u3002\u200b<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"323\" src=\"https:\/\/www.starverse-ai.com\/guide\/wp-content\/uploads\/2026\/01\/QQ\u622a\u56fe20260120092108.jpg\" alt=\"\" class=\"wp-image-46\" srcset=\"https:\/\/www.starverse-ai.com\/guide\/wp-content\/uploads\/2026\/01\/QQ\u622a\u56fe20260120092108.jpg 628w, https:\/\/www.starverse-ai.com\/guide\/wp-content\/uploads\/2026\/01\/QQ\u622a\u56fe20260120092108-300x154.jpg 300w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/figure>\n<\/div>\n\n\n<p>\u4e8c\u3001\u8fd0\u884c\u524d\u7f6e\u6761\u4ef6\u200b<\/p>\n\n\n\n<p>\u786c\u4ef6\u8981\u6c42\uff1aNVIDIA \u663e\u5361(\u652f\u6301 CUDA)\uff0c\u663e\u5b58\u226512GB(\u63a8\u8350 16GB \u4ee5\u4e0a);\u200b<\/p>\n\n\n\n<p>\u8f6f\u4ef6\u73af\u5883\uff1aPython 3.10-3.12(\u4e0d\u652f\u6301 3.13+)\uff0cGit\uff0cMicrosoft Visual Studio 2022(\u52fe\u9009 C++ \u684c\u9762\u5f00\u53d1)\uff0cRust \u73af\u5883;\u200b<\/p>\n\n\n\n<p>\u7f51\u7edc\u51c6\u5907\uff1a\u90e8\u5206\u4f9d\u8d56\u4e0e\u6a21\u578b\u9700\u8054\u7f51\u4e0b\u8f7d\uff0c\u5efa\u8bae\u914d\u7f6e\u955c\u50cf\u52a0\u901f\u3002\u200b<\/p>\n\n\n\n<p><strong>\u661f\u5b87\u667a\u7b97\u5b98\u7f51\u652f\u6301\u514d\u8d39\u90e8\u7f72\u7acb\u9a6c\u5b89\u88c5\uff01\u70b9\u51fb\u4e0b\u65b9\u7acb\u5373\u8bd5\u7528!<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.starverse-ai.com\/applications\/details\/tama-P3q9vwhnR4ONSN6k\"><img loading=\"lazy\" decoding=\"async\" width=\"209\" height=\"49\" src=\"https:\/\/www.starverse-ai.com\/guide\/wp-content\/uploads\/2026\/01\/QQ\u622a\u56fe20260121094818-1.jpg\" alt=\"\" class=\"wp-image-126\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>\u4e09\u3001\u8be6\u7ec6\u8fd0\u884c\u6b65\u9aa4\u200b<\/p>\n\n\n\n<p>(\u4e00)\u73af\u5883\u642d\u5efa(\u4ee5\u624b\u52a8\u5b89\u88c5\u4e3a\u4f8b\uff0c\u6700\u7a33\u5b9a\u65b9\u6848)\u200b<\/p>\n\n\n\n<p>\u514b\u9686\u9879\u76ee\u4ed3\u5e93\u200b<\/p>\n\n\n\n<p>\u6253\u5f00\u7ec8\u7aef\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u514b\u9686 FluxGym \u53ca\u4f9d\u8d56\u811a\u672c\uff1a\u200b<\/p>\n\n\n\n<p>git clone https:\/\/github.com\/cocktailpeanut\/fluxgym\u200b<\/p>\n\n\n\n<p>cd fluxgym\u200b<\/p>\n\n\n\n<p>git clone -b sd3 https:\/\/github.com\/kohya-ss\/sd-scripts\u200b<\/p>\n\n\n\n<p>\u56fd\u5185\u7528\u6237\u53ef\u66ff\u6362\u4e3a Gitee \u955c\u50cf\u5730\u5740\u63d0\u5347\u901f\u5ea6\u3002\u200b<\/p>\n\n\n\n<p>\u521b\u5efa\u5e76\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u200b<\/p>\n\n\n\n<p>Windows\uff1a\u200b<\/p>\n\n\n\n<p>python -m venv env\u200b<\/p>\n\n\n\n<p>env\\scripts\\activate\u200b<\/p>\n\n\n\n<p>Linux\uff1a\u200b<\/p>\n\n\n\n<p>python -m venv env\u200b<\/p>\n\n\n\n<p>source env\/bin\/activate\u200b<\/p>\n\n\n\n<p>\u5b89\u88c5\u4f9d\u8d56\u5305\u200b<\/p>\n\n\n\n<p>\u5148\u5b89\u88c5 sd-scripts \u4f9d\u8d56\uff0c\u518d\u5b89\u88c5 FluxGym \u4e3b\u7a0b\u5e8f\u4f9d\u8d56\uff1a\u200b<\/p>\n\n\n\n<p>cd sd-scripts\u200b<\/p>\n\n\n\n<p>pip install -r requirements.txt -i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple\u200b<\/p>\n\n\n\n<p>cd ..\u200b<\/p>\n\n\n\n<p># \u4fee\u6539requirements.txt\uff0c\u89e3\u51b3schedulefree\u4f9d\u8d56\u51b2\u7a81\u200b<\/p>\n\n\n\n<p>sed -i &#8216;s\/schedulefree==1.4\/schedulefree==1.4.1\/g&#8217; requirements.txt\u200b<\/p>\n\n\n\n<p>pip install -r requirements.txt -i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple\u200b<\/p>\n\n\n\n<p>\u5b89\u88c5 PyTorch \u4e0e CUDA\u200b<\/p>\n\n\n\n<p>\u6839\u636e\u663e\u5361\u578b\u53f7\u9009\u62e9\u5bf9\u5e94\u7248\u672c\uff1a\u200b<\/p>\n\n\n\n<p>\u666e\u901a NVIDIA \u663e\u5361(\u975e 50 \u7cfb\u5217)\uff1a\u200b<\/p>\n\n\n\n<p>pip install &#8211;pre torch torchvision torchaudio &#8211;index-url https:\/\/download.pytorch.org\/whl\/nightly\/cu121\u200b<\/p>\n\n\n\n<p>RTX 50 \u7cfb\u5217\u663e\u5361\uff1a\u200b<\/p>\n\n\n\n<p>pip install &#8211;pre torch torchvision torchaudio &#8211;index-url https:\/\/download.pytorch.org\/whl\/nightly\/cu128\u200b<\/p>\n\n\n\n<p>pip install -U bitsandbytes\u200b<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u6a21\u578b\u6587\u4ef6\u200b<\/p>\n\n\n\n<p>\u9700\u5728\u9879\u76ee\u6839\u76ee\u5f55\u521b\u5efamodels\u6587\u4ef6\u5939\uff0c\u6309\u4ee5\u4e0b\u7ed3\u6784\u653e\u7f6e\u6a21\u578b\uff1a\u200b<\/p>\n\n\n\n<p>models\/clip\uff1a\u4e0b\u8f7d clip_l.safetensors\u3001t5xxl_fp16.safetensors;\u200b<\/p>\n\n\n\n<p>models\/vae\uff1a\u4e0b\u8f7d ae.sft;\u200b<\/p>\n\n\n\n<p>models\/unet\uff1a\u4e0b\u8f7d flux1-dev.sft\u3002\u200b<\/p>\n\n\n\n<p>\u63a8\u8350\u4f7f\u7528 HF \u955c\u50cf(hf-mirror.com)\u52a0\u901f\u4e0b\u8f7d\u3002\u200b<\/p>\n\n\n\n<p>(\u4e8c)\u542f\u52a8 FluxGym\u200b<\/p>\n\n\n\n<p>\u5728\u865a\u62df\u73af\u5883\u6fc0\u6d3b\u72b6\u6001\u4e0b\uff0c\u6267\u884c\u542f\u52a8\u547d\u4ee4\uff1a\u200b<\/p>\n\n\n\n<p>python app.py\u200b<\/p>\n\n\n\n<p>\u542f\u52a8\u6210\u529f\u540e\uff0c\u6d4f\u89c8\u5668\u8bbf\u95eehttp:\/\/localhost:7860\u5373\u53ef\u8fdb\u5165 WebUI\uff0c\u4e0a\u4f20\u56fe\u7247\u5e76\u914d\u7f6e Lora \u4fe1\u606f\u5373\u53ef\u5f00\u59cb\u8bad\u7ec3\u3002\u200b<\/p>\n\n\n\n<p>\u56db\u3001\u5e38\u89c1\u95ee\u9898 FAQ\u200b<\/p>\n\n\n\n<p>\u542f\u52a8\u65f6\u63d0\u793a \u201cImportError: cannot import name &#8216;cached_download&#8217;\u201d?\u200b<\/p>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6848\uff1a\u5347\u7ea7 huggingface-hub\uff0c\u6267\u884cpip install -U huggingface-hub\uff0c\u66ff\u6362\u65e7\u7248 API \u8c03\u7528\u65b9\u5f0f\u3002\u200b<\/p>\n\n\n\n<p>\u4f9d\u8d56\u5b89\u88c5\u65f6\u51fa\u73b0 C++ \u7f16\u8bd1\u9519\u8bef?\u200b<\/p>\n\n\n\n<p>\u539f\u56e0\uff1a\u672a\u5b89\u88c5 Visual Studio C++ \u7f16\u8bd1\u5668\u3002\u9700\u5b89\u88c5 VS2022 \u5e76\u52fe\u9009 \u201cC++ \u684c\u9762\u5f00\u53d1\u201d\uff0c\u540c\u65f6\u914d\u7f6e\u73af\u5883\u53d8\u91cf PATH \u6307\u5411\u7f16\u8bd1\u5668\u76ee\u5f55\u3002\u200b<\/p>\n\n\n\n<p>\u663e\u5b58\u4e0d\u8db3\u5bfc\u81f4\u7a0b\u5e8f\u5d29\u6e83?\u200b<\/p>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6848\uff1a\u5173\u95ed\u5176\u4ed6\u5360\u7528\u663e\u5b58\u7684\u7a0b\u5e8f\uff0c\u6216\u5728 WebUI \u4e2d\u964d\u4f4e\u6279\u91cf\u5904\u7406\u5927\u5c0f\uff0c12GB \u663e\u5b58\u5efa\u8bae\u8bbe\u7f6e\u4e3a 2-4.\u200b<\/p>\n\n\n\n<p>\u6a21\u578b\u4e0b\u8f7d\u7f13\u6162\u6216\u5931\u8d25?\u200b<\/p>\n\n\n\n<p>\u6539\u7528\u56fd\u5185\u955c\u50cf(\u5982hf-mirror.com)\u4e0b\u8f7d\uff0c\u6216\u901a\u8fc7\u7f51\u76d8\u83b7\u53d6\u6a21\u578b\u6587\u4ef6\u540e\u624b\u52a8\u653e\u7f6e\u5230\u5bf9\u5e94\u76ee\u5f55\u3002\u200b<\/p>\n\n\n\n<p>PyTorch \u7248\u672c\u4e0d\u517c\u5bb9 optimum-quanto?\u200b<\/p>\n\n\n\n<p>\u6267\u884cpip install optimum-quanto==0.2.6.\u6307\u5b9a\u517c\u5bb9\u7248\u672c\u5373\u53ef\u89e3\u51b3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FluxGym\u600e\u4e48\u8fd0\u884c\uff1f\u901a\u5e38\u9700\u8981\u57fa\u7840\u7684\u786c\u4ef6\u652f\u6301,\u5e76\u4e14\u6709\u4e0d\u540c\u7684&hellip;<\/p>\n","protected":false},"author":2,"featured_media":46,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zixun"],"views":107,"_links":{"self":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":2,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":131,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/44\/revisions\/131"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/media\/46"}],"wp:attachment":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}