{"id":23233790,"url":"https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ","last_synced_at":"2025-08-19T19:31:05.988Z","repository":{"id":245311398,"uuid":"815567349","full_name":"MinusZoneAI/ComfyUI-TrainTools-MZ","owner":"MinusZoneAI","description":"在ComfyUI中进行lora微调的节点,依赖于kohya-ss/sd-scripts等训练工具(Nodes for fine-tuning lora in ComfyUI, dependent on training tools such as kohya-ss/sd-scripts)","archived":false,"fork":false,"pushed_at":"2024-08-15T19:21:36.000Z","size":1700,"stargazers_count":35,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-15T21:23:09.488Z","etag":null,"topics":["comfyui","comfyui-nodes","comfyui-workflow","fine-tuning","lora","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MinusZoneAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-15T13:46:56.000Z","updated_at":"2024-08-14T18:37:37.000Z","dependencies_parsed_at":"2024-06-23T17:28:28.554Z","dependency_job_id":"61af8a4f-ed7e-4627-8017-2f75bdccf1e9","html_url":"https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ","commit_stats":null,"previous_names":["minuszoneai/comfyui-traintools-mz"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinusZoneAI%2FComfyUI-TrainTools-MZ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinusZoneAI%2FComfyUI-TrainTools-MZ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinusZoneAI%2FComfyUI-TrainTools-MZ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinusZoneAI%2FComfyUI-TrainTools-MZ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MinusZoneAI","download_url":"https://codeload.github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230367780,"owners_count":18215325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","comfyui-nodes","comfyui-workflow","fine-tuning","lora","stable-diffusion"],"created_at":"2024-12-19T03:02:03.670Z","updated_at":"2025-08-19T19:31:05.961Z","avatar_url":"https://github.com/MinusZoneAI.png","language":"Python","funding_links":[],"categories":["All Workflows Sorted by GitHub Stars","Workflows (3395) sorted by GitHub Stars"],"sub_categories":[],"readme":"![image](https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/assets/5035199/3bdce469-5a49-4f59-8a88-1b20e3a75c85)\n![image](https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/assets/5035199/9cd7f4eb-f971-49a8-ad57-7a56b71bf022)\n\n\n# ComfyUI-TrainTools-MZ\n在ComfyUI中进行lora微调的节点,依赖于kohya-ss/sd-scripts等训练工具(Nodes for fine-tuning lora in ComfyUI, dependent on training tools such as kohya-ss/sd-scripts) \n\n## Recent changes \n[20240706] 支持混元lora训练,脚本来自https://github.com/KohakuBlueleaf/sd-scripts/tree/HunYuanDiT  分支\n\n## Installation\n1. Clone this repo into `custom_nodes` folder.\n2. Restart ComfyUI.\n \n## Nodes \n### MZ_KohyaSS_KohakuBlueleaf_HYHiDInitWorkspace | MZ_KohyaSS_KohakuBlueleaf_HYHiDLoraTrain\n![image](https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/assets/5035199/56d4e2cf-aaa6-4b05-95b1-003ed551c757)\n\n### MZ_KohyaSSInitWorkspace\n初始化训练文件夹,文件夹位于output目录(Initialize the training folder, the folder in the output directory)\n+ lora_name(LoRa名称): 用于生成训练文件夹的名称(Used to generate the name of the training folder\n+ branch(分支): sd-scripts的分支,默认为当前代码调试时使用的分支(sd-scripts branch, default is the branch used when debugging the current code)\n+ source(源): sd-scripts的源,默认为github,下载有问题的话可以切换加速源(sd-scripts source, default is github, if there is a problem with the download, you can switch to the accelerated source)\n\n ![image](https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/assets/5035199/8714d3e3-bc4f-4f99-9c0c-a5ea938b10a9)\n\n\n### MZ_ImagesCopyWorkspace\n复制图片到训练文件夹中和一些数据集配置(Copy images to the training folder and some dataset configurations)\n+ images(图片列表): 推荐使用 https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite 中的上传文件夹节点 (It is recommended to use the upload folder node in https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite )\n+ force_clear(强制清空): 复制图片前是否强制清空原有文件夹内容(Whether to force clear the original folder content before copying the image)\n+ force_clear_only_images(仅清空图片): 仅清空图片文件夹内容,不清空其他文件夹内容(Only clear the content of the image folder, not the content of other folders)\n+ same_caption_generate(生成相同标注): 是否生成相同的标注文件(Whether to generate the same annotation file)\n+ same_caption(单一标签): 生成相同标签的内容(Generate content with the same label)\n+ 其他字段参考: https://github.com/kohya-ss/sd-scripts\n\n![image](https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/assets/5035199/739804dc-d8be-4d42-8b04-f3b4a1bc5e33)\n\n\n### MZ_KohyaSSUseConfig\n一些基础的训练配置(Some basic training configurations)\n+ 没什么特殊的,字段参考: https://github.com/kohya-ss/sd-scripts\n\n![image](https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/assets/5035199/9cf82ed6-f3a2-4032-8032-1fd0b0ff6bdd)\n\n\n### MZ_KohyaSSAdvConfig\n更多的训练配置(More training configurations)\n+ 没什么特殊的,字段参考: https://github.com/kohya-ss/sd-scripts\n\n![image](https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/assets/5035199/b7a5f904-8357-408a-9c27-4bda4e4f8c85)\n\n\n### MZ_KohyaSSTrain\n训练主线程(Training main thread)\n+ base_lora(基础lora): 加载一个lora模型后进行训练,和sd-scripts中的`network_weights`参数一致,启用时忽略dim/alpha/dropout(Train after loading a lora model, consistent with the `network_weights` parameter in sd-scripts, ignore dim/alpha/dropout when enabled)\n+ sample_generate(启用样图生成): 每次保存模型时进行一次示例图片生成,并展示训练过程中每个保存epoch时的示例图片(Enable example image generation each time the model is saved, and display the example image at each saved epoch during training)\n+ sample_prompt(提示词): 生成示例图片时使用的提示词(Phrase used when generating example images)\n\n![image](https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ/assets/5035199/e32d2132-cf0e-46b7-807d-a3160aaeea7d)\n\n\n## FAQ\n\n\n\n## Credits\n+ [https://github.com/comfyanonymous/ComfyUI](https://github.com/comfyanonymous/ComfyUI)\n+ [https://github.com/kohya-ss/sd-scripts](https://github.com/kohya-ss/sd-scripts)\n\n## Star History\n\n\u003ca href=\"https://star-history.com/#MinusZoneAI/ComfyUI-TrainTools-MZ\u0026Date\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=MinusZoneAI/ComfyUI-TrainTools-MZ\u0026type=Date\u0026theme=dark\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=MinusZoneAI/ComfyUI-TrainTools-MZ\u0026type=Date\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=MinusZoneAI/ComfyUI-TrainTools-MZ\u0026type=Date\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n\n## Contact\n- 绿泡泡: minrszone\n- Bilibili: [minus_zone](https://space.bilibili.com/5950992)\n- 小红书: [MinusZoneAI](https://www.xiaohongshu.com/user/profile/5f072e990000000001005472)\n- 爱发电: [MinusZoneAI](https://afdian.net/@MinusZoneAI)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMinusZoneAI%2FComfyUI-TrainTools-MZ","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMinusZoneAI%2FComfyUI-TrainTools-MZ","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMinusZoneAI%2FComfyUI-TrainTools-MZ/lists"}