[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-Uminosachi--sd-webui-inpaint-anything":3,"tool-Uminosachi--sd-webui-inpaint-anything":62},[4,18,28,37,45,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":24,"last_commit_at":25,"category_tags":26,"status":17},9989,"n8n","n8n-io\u002Fn8n","n8n 是一款面向技术团队的公平代码（fair-code）工作流自动化平台，旨在让用户在享受低代码快速构建便利的同时，保留编写自定义代码的灵活性。它主要解决了传统自动化工具要么过于封闭难以扩展、要么完全依赖手写代码效率低下的痛点，帮助用户轻松连接 400 多种应用与服务，实现复杂业务流程的自动化。\n\nn8n 特别适合开发者、工程师以及具备一定技术背景的业务人员使用。其核心亮点在于“按需编码”：既可以通过直观的可视化界面拖拽节点搭建流程，也能随时插入 JavaScript 或 Python 代码、调用 npm 包来处理复杂逻辑。此外，n8n 原生集成了基于 LangChain 的 AI 能力，支持用户利用自有数据和模型构建智能体工作流。在部署方面，n8n 提供极高的自由度，支持完全自托管以保障数据隐私和控制权，也提供云端服务选项。凭借活跃的社区生态和数百个现成模板，n8n 让构建强大且可控的自动化系统变得简单高效。",184740,2,"2026-04-19T23:22:26",[16,14,13,15,27],"插件",{"id":29,"name":30,"github_repo":31,"description_zh":32,"stars":33,"difficulty_score":10,"last_commit_at":34,"category_tags":35,"status":17},10095,"AutoGPT","Significant-Gravitas\u002FAutoGPT","AutoGPT 是一个旨在让每个人都能轻松使用和构建 AI 的强大平台，核心功能是帮助用户创建、部署和管理能够自动执行复杂任务的连续型 AI 智能体。它解决了传统 AI 应用中需要频繁人工干预、难以自动化长流程工作的痛点，让用户只需设定目标，AI 即可自主规划步骤、调用工具并持续运行直至完成任务。\n\n无论是开发者、研究人员，还是希望提升工作效率的普通用户，都能从 AutoGPT 中受益。开发者可利用其低代码界面快速定制专属智能体；研究人员能基于开源架构探索多智能体协作机制；而非技术背景用户也可直接选用预置的智能体模板，立即投入实际工作场景。\n\nAutoGPT 的技术亮点在于其模块化“积木式”工作流设计——用户通过连接功能块即可构建复杂逻辑，每个块负责单一动作，灵活且易于调试。同时，平台支持本地自托管与云端部署两种模式，兼顾数据隐私与使用便捷性。配合完善的文档和一键安装脚本，即使是初次接触的用户也能在几分钟内启动自己的第一个 AI 智能体。AutoGPT 正致力于降低 AI 应用门槛，让人人都能成为 AI 的创造者与受益者。",183572,"2026-04-20T04:47:55",[13,36,27,14,15],"语言模型",{"id":38,"name":39,"github_repo":40,"description_zh":41,"stars":42,"difficulty_score":10,"last_commit_at":43,"category_tags":44,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":46,"name":47,"github_repo":48,"description_zh":49,"stars":50,"difficulty_score":51,"last_commit_at":52,"category_tags":53,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,27],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":24,"last_commit_at":60,"category_tags":61,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":68,"readme_en":69,"readme_zh":70,"quickstart_zh":71,"use_case_zh":72,"hero_image_url":73,"owner_login":74,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":77,"owner_website":76,"owner_url":78,"languages":79,"stars":92,"forks":93,"last_commit_at":94,"license":95,"difficulty_score":10,"env_os":96,"env_gpu":97,"env_ram":98,"env_deps":99,"category_tags":108,"github_topics":109,"view_count":24,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":129,"updated_at":130,"faqs":131,"releases":161},10146,"Uminosachi\u002Fsd-webui-inpaint-anything","sd-webui-inpaint-anything","Inpaint Anything extension performs stable diffusion inpainting on a browser UI using masks from Segment Anything.","sd-webui-inpaint-anything 是一款专为 Stable Diffusion Web UI 设计的智能修复扩展插件。它巧妙地将 Meta 发布的“分割一切”（Segment Anything）模型融入绘图流程，让用户只需在图片上简单点击或涂抹，即可自动精准识别并生成需要修改区域的蒙版，随后利用 Stable Diffusion 技术完成高质量的内容重绘或画面扩充。\n\n传统修图往往需要用户手动精细绘制蒙版，不仅耗时且对操作技巧要求较高。sd-webui-inpaint-anything 彻底解决了这一痛点，将复杂的选区工作转化为直观的交互体验，大幅提升了创作效率与成品质量。无论是希望快速移除画面杂物、替换局部元素，还是进行创意扩图的创作者，都能从中受益。\n\n该工具特别适合插画师、平面设计师以及广大 AI 绘画爱好者使用。其核心亮点在于支持多种先进的分割模型（如 SAM 2、MobileSAM 等），用户可根据显存配置灵活选择；同时提供针对动漫风格的优化选项，以及蒙版的微调功能（如扩张、修剪、叠加），确保选区完美贴合需求。作为 AUTOMATIC1111 界面的原生扩展","sd-webui-inpaint-anything 是一款专为 Stable Diffusion Web UI 设计的智能修复扩展插件。它巧妙地将 Meta 发布的“分割一切”（Segment Anything）模型融入绘图流程，让用户只需在图片上简单点击或涂抹，即可自动精准识别并生成需要修改区域的蒙版，随后利用 Stable Diffusion 技术完成高质量的内容重绘或画面扩充。\n\n传统修图往往需要用户手动精细绘制蒙版，不仅耗时且对操作技巧要求较高。sd-webui-inpaint-anything 彻底解决了这一痛点，将复杂的选区工作转化为直观的交互体验，大幅提升了创作效率与成品质量。无论是希望快速移除画面杂物、替换局部元素，还是进行创意扩图的创作者，都能从中受益。\n\n该工具特别适合插画师、平面设计师以及广大 AI 绘画爱好者使用。其核心亮点在于支持多种先进的分割模型（如 SAM 2、MobileSAM 等），用户可根据显存配置灵活选择；同时提供针对动漫风格的优化选项，以及蒙版的微调功能（如扩张、修剪、叠加），确保选区完美贴合需求。作为 AUTOMATIC1111 界面的原生扩展，它无需切换软件即可实现从智能选区到最终生成的无缝衔接，是让 AI 绘图更加得心应手的实用利器。","# Inpaint Anything for Stable Diffusion Web UI\n\nInpaint Anything extension performs stable diffusion inpainting on a browser UI using any mask selected from the output of [Segment Anything](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything).\n\n\nUsing Segment Anything enables users to specify masks by simply pointing to the desired areas, instead of manually filling them in. This can increase the efficiency and accuracy of the mask creation process, leading to potentially higher-quality inpainting results while saving time and effort.\n\n[Standalone version](https:\u002F\u002Fgithub.com\u002FUminosachi\u002Finpaint-anything)\n\n## Installation\n\nTo install the software, please follow these steps:\n\n* Open the `Extensions` tab on the AUTOMATIC1111's [Stable Diffusion Web UI](https:\u002F\u002Fgithub.com\u002FAUTOMATIC1111\u002Fstable-diffusion-webui.git).\n* Select the `Install from URL` option.\n* Enter `https:\u002F\u002Fgithub.com\u002FUminosachi\u002Fsd-webui-inpaint-anything.git` in the `URL for extension's git repository` field.\n* Click on the `Install` button.\n* Once installation is complete, restart the Web UI.\n* Note: This extension supports v1.3.0 or higher of AUTOMATIC1111's Stable Diffusion Web UI.\n\n## Running the application\n\n* If you intend to use the memory-efficient xformers, please append the `--xformers` argument to your startup command. For example, run `.\u002Fwebui.sh --xformers` or `webui.bat --xformers`\n* Note: If you have a privacy protection extension enabled in your web browser, such as DuckDuckGo, you may not be able to retrieve the mask from your sketch.\n* Note: In Gradio version 3.23.0 or older, the segmentation image may appear small on the Web UI.\n\n## Downloading the Model\n\n* Navigate to the `Inpaint Anything` tab in the Web UI.\n* Click on the `Download model` button, located next to the [Segment Anything Model ID](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything#model-checkpoints). This includes the [SAM 2](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything-2), [Segment Anything in High Quality Model ID](https:\u002F\u002Fgithub.com\u002FSysCV\u002Fsam-hq), [Fast Segment Anything](https:\u002F\u002Fgithub.com\u002FCASIA-IVA-Lab\u002FFastSAM), and [Faster Segment Anything (MobileSAM)](https:\u002F\u002Fgithub.com\u002FChaoningZhang\u002FMobileSAM).\n  * Please note that the SAM is available in three sizes: Base, Large, and Huge. Remember, larger sizes consume more VRAM.\n* Wait for the download to complete.\n* The downloaded model file will be stored in the `models` directory of this application's repository.\n\n## Usage\n\n* Drag and drop your image onto the input image area.\n  * Outpainting can be achieved by the `Padding options`, configuring the scale and balance, and then clicking on the `Run Padding` button.\n  * The `Anime Style` checkbox enhances segmentation mask detection, particularly in anime style images, at the expense of a slight reduction in mask quality.\n* Click on the `Run Segment Anything` button.\n* Use sketching to point the area you want to inpaint. You can undo and adjust the pen size.\n  * Hover over either the SAM image or the mask image and press the `S` key for Fullscreen mode, or the `R` key to Reset zoom.\n* Click on the `Create mask` button. The mask will appear in the selected mask image area.\n\n### Mask Adjustment\n\n* `Expand mask region` button: Use this to slightly expand the area of the mask for broader coverage.\n* `Trim mask by sketch` button: Clicking this will exclude the sketched area from the mask.\n* `Add mask by sketch` button: Clicking this will add the sketched area to the mask.\n\n### Inpainting Tab\n\n* Enter your desired Prompt and Negative Prompt, then choose the Inpainting Model ID.\n* Click on the `Run Inpainting` button (**Please note that it may take some time to download the model for the first time**).\n  * In the Advanced options, you can adjust the Sampler, Sampling Steps, Guidance Scale, and Seed.\n  * If you enable the `Mask area Only` option, modifications will be confined to the designated mask area only.\n* Adjust the iteration slider to perform inpainting multiple times with different seeds.\n* The inpainting process is powered by [diffusers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdiffusers).\n\n#### Tips\n\n* You can directly drag and drop the inpainted image into the input image field on the Web UI. (useful with Chrome and Edge browsers)\n* To load prompts saved in a PNG file, follow these steps:\n  * Drag and drop the image into the 'PNG Info' tab on the Web UI, then click `Send to txt2img (or img2img)`.\n  * Navigate to the 'Inpainting' section within the 'Inpaint Anything' tab and click the `Get prompt from: txt2img (or img2img)` button.\n\n#### Model Cache\n* The inpainting model, which is saved in HuggingFace's cache and includes `inpaint` (case-insensitive) in its repo_id, will also be added to the Inpainting Model ID dropdown list.\n  * If there's a specific model you'd like to use, you can cache it in advance using the following Python commands (`venv\u002Fbin\u002Fpython` for Linux and MacOS):\n  ```bash\n  venv\\Scripts\\python.exe\n  ```\n  ```python\n  from diffusers import StableDiffusionInpaintPipeline\n  pipe = StableDiffusionInpaintPipeline.from_pretrained(\"Uminosachi\u002Fdreamshaper_5-inpainting\")\n  exit()\n  ```\n* The model diffusers downloaded is typically stored in your home directory. You can find it at `\u002Fhome\u002Fusername\u002F.cache\u002Fhuggingface\u002Fhub` for Linux and MacOS users, or at `C:\\Users\\username\\.cache\\huggingface\\hub` for Windows users.\n  * When executing inpainting, if the following error is output to the console, try deleting the corresponding model from the cache folder mentioned above:\n  ```\n  An error occurred while trying to fetch model name...\n  ```\n\n### Cleaner Tab\n\n* Choose the Cleaner Model ID.\n* Click on the `Run Cleaner` button (**Please note that it may take some time to download the model for the first time**).\n* Cleaner process is performed using [Lama Cleaner](https:\u002F\u002Fgithub.com\u002FSanster\u002Flama-cleaner).\n\n### Inpainting webui Tab\n\n* This tab becomes accessible when you have an inpainting model.\n* The required model should include `inpaint` (case-insensitive) in its filename and must be located in the `stable-diffusion-webui\u002Fmodels` directory.\n* Once the model is recognized, it becomes selectable from the Inpainting Model ID dropdown list.\n* The process can be executed swiftly, without requiring model loading, when the Stable Diffusion checkpoint (located in the upper left corner of the Web UI) matches the selected Inpainting Model ID.\n\n### ControlNet Inpaint Tab\n\n* To execute inpainting, use the Stable Diffusion checkpoint located in the upper left of the Web UI, and pair it with the ControlNet inpaint model.\n* Enter your desired Prompt and Negative Prompt.\n* Click on the `Run ControlNet Inpaint` button to start the process.\n  * In the Advanced options, you can adjust the Sampler, Sampling Steps, Guidance Scale, Denoising Strength, and Seed.\n* The Control Weight and Control Mode can be modified in the ControlNet options.\n  * The Reference-Only Control can be utilized if the Multi ControlNet setting is configured to 2 or higher.\n  * The IP-Adapter can be utilized if the [IP-Adapter model](https:\u002F\u002Fhuggingface.co\u002Flllyasviel\u002Fsd_control_collection\u002Ftree\u002Fmain) is present in the `extensions\u002Fsd-webui-controlnet\u002Fmodels` directory, and the ControlNet version is updated.\n* Make sure to install the ControlNet extension that supports the `inpaint_only` preprocessor and the ControlNet inpaint model.\n* Requires: The [sd-webui-controlnet](https:\u002F\u002Fgithub.com\u002FMikubill\u002Fsd-webui-controlnet) extension and the [ControlNet-v1-1](https:\u002F\u002Fhuggingface.co\u002Flllyasviel\u002FControlNet-v1-1\u002Ftree\u002Fmain) inpaint model in the `extensions\u002Fsd-webui-controlnet\u002Fmodels` directory.\n\n### Mask only Tab\n\n* Gives ability to just save mask without any other processing, so it's then possible to use the mask in img2img's `Inpaint upload` with any model\u002Fextensions\u002Ftools you already have in your AUTOMATIC1111.\n* `Get mask as alpha of image` button: Save the mask as RGBA image, with the mask put into the alpha channel of the input image.\n* `Get mask` button: Save the mask as RGB image.\n* After the `Get mask` button press you can use `Send to img2img inpaint` button under the mask image to send both input image and mask to the img2img tab.\n\n![UI image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FUminosachi_sd-webui-inpaint-anything_readme_ee43e469df36.png)\n\n## Auto-saving images\n\n* The inpainted image will be automatically saved in the folder that matches the current date within the `outputs\u002Finpaint-anything` directory.\n* You can switch to the `outputs\u002Fimg2img-images` directory via the `Inpaint Anything` section found in the `Settings` tab on the Web UI.\n\n## Development\n\nWith the [Inpaint Anything library](README_DEV.md), you can perform segmentation and create masks using sketches from other extensions.\n\n## License\n\nThe source code is licensed under the [Apache 2.0 license](LICENSE).\n\n## References\n\n* Ravi, N., Gabeur, V., Hu, Y.-T., Hu, R., Ryali, C., Ma, T., Khedr, H., Rädel, R., Rolland, C., Gustafson, L., Mintun, E., Pan, J., Alwala, K. V., Carion, N., Wu, C.-Y., Girshick, R., Dollár, P., & Feichtenhofer, C. (2024). [SAM 2: Segment Anything in Images and Videos](https:\u002F\u002Fai.meta.com\u002Fresearch\u002Fpublications\u002Fsam-2-segment-anything-in-images-and-videos\u002F). arXiv preprint.\n* Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T., Whitehead, S., Berg, A. C., Lo, W-Y., Dollár, P., & Girshick, R. (2023). [Segment Anything](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.02643). arXiv:2304.02643.\n* Ke, L., Ye, M., Danelljan, M., Liu, Y., Tai, Y-W., Tang, C-K., & Yu, F. (2023). [Segment Anything in High Quality](https:\u002F\u002Farxiv.org\u002Fabs\u002F2306.01567). arXiv:2306.01567.\n* Zhao, X., Ding, W., An, Y., Du, Y., Yu, T., Li, M., Tang, M., & Wang, J. (2023). [Fast Segment Anything](https:\u002F\u002Farxiv.org\u002Fabs\u002F2306.12156). arXiv:2306.12156 [cs.CV].\n* Zhang, C., Han, D., Qiao, Y., Kim, J. U., Bae, S-H., Lee, S., & Hong, C. S. (2023). [Faster Segment Anything: Towards Lightweight SAM for Mobile Applications](https:\u002F\u002Farxiv.org\u002Fabs\u002F2306.14289). arXiv:2306.14289.\n","# Stable Diffusion Web UI 的任意修复插件\n\n“任意修复”扩展程序在浏览器界面上，使用从 [Segment Anything](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything) 输出中选择的任何掩码，执行稳定扩散图像修复。\n\n借助 Segment Anything，用户只需指向所需区域即可指定掩码，而无需手动绘制。这不仅提高了创建掩码的效率和准确性，还能节省时间和精力，从而获得更高质量的修复效果。\n\n[独立版本](https:\u002F\u002Fgithub.com\u002FUminosachi\u002Finpaint-anything)\n\n## 安装\n\n请按照以下步骤安装该软件：\n\n* 打开 AUTOMATIC1111 的 [Stable Diffusion Web UI](https:\u002F\u002Fgithub.com\u002FAUTOMATIC1111\u002Fstable-diffusion-webui.git) 中的“Extensions”选项卡。\n* 选择“Install from URL”选项。\n* 在“URL for extension's git repository”字段中输入 `https:\u002F\u002Fgithub.com\u002FUminosachi\u002Fsd-webui-inpaint-anything.git`。\n* 点击“Install”按钮。\n* 安装完成后，请重启 Web UI。\n* 注意：此扩展支持 AUTOMATIC1111 的 Stable Diffusion Web UI v1.3.0 或更高版本。\n\n## 运行应用程序\n\n* 如果您打算使用内存高效的 xformers，请在启动命令中添加 `--xformers` 参数。例如，运行 `.\u002Fwebui.sh --xformers` 或 `webui.bat --xformers`。\n* 注意：如果您在浏览器中启用了隐私保护扩展程序（如 DuckDuckGo），可能无法从您的草图中获取掩码。\n* 注意：在 Gradio 3.23.0 或更早版本中，分割图像可能会在 Web UI 上显示得较小。\n\n## 下载模型\n\n* 导航到 Web UI 中的“Inpaint Anything”选项卡。\n* 点击位于 [Segment Anything Model ID](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything#model-checkpoints) 旁边的“Download model”按钮。这包括 [SAM 2](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything-2)、[高精度 Segment Anything 模型 ID](https:\u002F\u002Fgithub.com\u002FSysCV\u002Fsam-hq)、[Fast Segment Anything](https:\u002F\u002Fgithub.com\u002FCASIA-IVA-Lab\u002FFastSAM) 和 [更快的 Segment Anything (MobileSAM)](https:\u002F\u002Fgithub.com\u002FChaoningZhang\u002FMobileSAM)。\n  * 请注意，SAM 有三种尺寸：Base、Large 和 Huge。请记住，尺寸越大，VRAM 消耗越多。\n* 等待下载完成。\n* 下载的模型文件将存储在此应用程序仓库的 `models` 目录中。\n\n## 使用方法\n\n* 将您的图像拖放到输入图像区域。\n  * 可以通过“Padding options”实现外扩，配置缩放比例和平衡，然后点击“Run Padding”按钮。\n  * 勾选“Anime Style”复选框可以增强对动漫风格图像的分割掩码检测，但会略微降低掩码质量。\n* 点击“Run Segment Anything”按钮。\n* 使用草图工具标记您想要修复的区域。您可以撤销操作并调整笔刷大小。\n  * 将鼠标悬停在 SAM 图像或掩码图像上，按 `S` 键进入全屏模式，或按 `R` 键重置缩放。\n* 点击“Create mask”按钮。掩码将显示在选定的掩码图像区域。\n\n### 掩码调整\n\n* “Expand mask region”按钮：用于稍微扩大掩码区域，以获得更广泛的覆盖范围。\n* “Trim mask by sketch”按钮：单击此按钮可将草图区域排除在掩码之外。\n* “Add mask by sketch”按钮：单击此按钮可将草图区域添加到掩码中。\n\n### 修复选项卡\n\n* 输入您所需的 Prompt 和 Negative Prompt，然后选择修复模型 ID。\n* 点击“Run Inpainting”按钮（**请注意，首次下载模型可能需要一些时间**）。\n  * 在高级选项中，您可以调整采样器、采样步数、指导尺度和种子。\n  * 如果启用“Mask area Only”选项，则修改仅限于指定的掩码区域。\n* 调整迭代滑块，以使用不同种子多次进行修复。\n* 修复过程由 [diffusers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdiffusers) 提供支持。\n\n#### 小贴士\n\n* 您可以直接将修复后的图像拖放到 Web UI 的输入图像字段中。（在 Chrome 和 Edge 浏览器中效果较好）\n* 要加载保存在 PNG 文件中的提示词，请按照以下步骤操作：\n  * 将图像拖放到 Web UI 的“PNG Info”选项卡中，然后点击“Send to txt2img (or img2img)”。\n  * 导航到“Inpaint Anything”选项卡中的“Inpainting”部分，点击“Get prompt from: txt2img (or img2img)”按钮。\n\n#### 模型缓存\n* 保存在 HuggingFace 缓存中的修复模型，如果其 repo_id 包含 `inpaint`（不区分大小写），也会被添加到修复模型 ID 下拉列表中。\n  * 如果您想使用特定模型，可以提前使用以下 Python 命令将其缓存起来（Linux 和 MacOS 使用 `venv\u002Fbin\u002Fpython`）：\n  ```bash\n  venv\\Scripts\\python.exe\n  ```\n  ```python\n  from diffusers import StableDiffusionInpaintPipeline\n  pipe = StableDiffusionInpaintPipeline.from_pretrained(\"Uminosachi\u002Fdreamshaper_5-inpainting\")\n  exit()\n  ```\n* 下载的模型通常存储在您的主目录中。对于 Linux 和 MacOS 用户，可以在 `\u002Fhome\u002Fusername\u002F.cache\u002Fhuggingface\u002Fhub` 找到；对于 Windows 用户，则位于 `C:\\Users\\username\\.cache\\huggingface\\hub`。\n  * 在执行修复时，如果控制台输出以下错误信息，请尝试从上述缓存文件夹中删除相应模型：\n  ```\n  An error occurred while trying to fetch model name...\n  ```\n\n### 清理选项卡\n\n* 选择清理模型 ID。\n* 点击“Run Cleaner”按钮（**请注意，首次下载模型可能需要一些时间**）。\n* 清理过程由 [Lama Cleaner](https:\u002F\u002Fgithub.com\u002FSanster\u002Flama-cleaner) 执行。\n\n### 修复 Web UI 选项卡\n\n* 当您拥有修复模型时，此选项卡将变为可用。\n* 所需模型的文件名应包含 `inpaint`（不区分大小写），并且必须位于 `stable-diffusion-webui\u002Fmodels` 目录中。\n* 一旦模型被识别，它就会出现在修复模型 ID 下拉列表中。\n* 当 Web UI 左上角的稳定扩散检查点与所选修复模型 ID 匹配时，修复过程可以快速执行，无需加载模型。\n\n### ControlNet 修复选项卡\n\n* 要执行图像修复，请使用 Web UI 左上角的 Stable Diffusion 检查点，并将其与 ControlNet 修复模型配对。\n* 输入您所需的提示词和负面提示词。\n* 单击 `运行 ControlNet 修复` 按钮以开始处理。\n  * 在高级选项中，您可以调整采样器、采样步数、指导尺度、去噪强度和种子。\n* 可以在 ControlNet 选项中修改控制权重和控制模式。\n  * 如果多 ControlNet 设置配置为 2 或更高，则可以使用仅参考控制。\n  * 如果 `extensions\u002Fsd-webui-controlnet\u002Fmodels` 目录中存在 [IP-Adapter 模型](https:\u002F\u002Fhuggingface.co\u002Flllyasviel\u002Fsd_control_collection\u002Ftree\u002Fmain)，并且 ControlNet 版本已更新，则可以使用 IP-Adapter。\n* 请确保安装支持 `inpaint_only` 预处理器和 ControlNet 修复模型的 ControlNet 扩展。\n* 需要：[sd-webui-controlnet](https:\u002F\u002Fgithub.com\u002FMikubill\u002Fsd-webui-controlnet) 扩展以及位于 `extensions\u002Fsd-webui-controlnet\u002Fmodels` 目录中的 [ControlNet-v1-1](https:\u002F\u002Fhuggingface.co\u002Flllyasviel\u002FControlNet-v1-1\u002Ftree\u002Fmain) 修复模型。\n\n### 仅掩码选项卡\n\n* 提供仅保存掩码而不进行其他处理的功能，以便随后可以在 AUTOMATIC1111 中的 img2img 的 `修复上传` 功能中，使用您已有的任何模型\u002F扩展\u002F工具来应用该掩码。\n* `将掩码作为图像的 Alpha 通道保存` 按钮：将掩码保存为 RGBA 图像，并将其放入输入图像的 Alpha 通道中。\n* `获取掩码` 按钮：将掩码保存为 RGB 图像。\n* 点击 `获取掩码` 按钮后，您可以使用掩码图像下方的 `发送到 img2img 修复` 按钮，将输入图像和掩码同时发送到 img2img 选项卡。\n\n![UI 图片](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FUminosachi_sd-webui-inpaint-anything_readme_ee43e469df36.png)\n\n## 自动保存图像\n\n* 修复后的图像将自动保存在 `outputs\u002Finpaint-anything` 目录下，对应当前日期的文件夹中。\n* 您可以通过 Web UI 的 `设置` 选项卡中的 `Inpaint Anything` 部分，切换到 `outputs\u002Fimg2img-images` 目录。\n\n## 开发\n\n借助 [Inpaint Anything 库](README_DEV.md)，您可以使用来自其他扩展的草图进行分割并创建掩码。\n\n## 许可证\n\n源代码采用 [Apache 2.0 许可证](LICENSE)授权。\n\n## 参考文献\n\n* Ravi, N., Gabeur, V., Hu, Y.-T., Hu, R., Ryali, C., Ma, T., Khedr, H., Rädel, R., Rolland, C., Gustafson, L., Mintun, E., Pan, J., Alwala, K. V., Carion, N., Wu, C.-Y., Girshick, R., Dollár, P., & Feichtenhofer, C. (2024). [SAM 2：图像与视频中的任意分割](https:\u002F\u002Fai.meta.com\u002Fresearch\u002Fpublications\u002Fsam-2-segment-anything-in-images-and-videos\u002F)。arXiv 预印本。\n* Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T., Whitehead, S., Berg, A. C., Lo, W-Y., Dollár, P., & Girshick, R. (2023). [任意分割](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.02643)。arXiv:2304.02643。\n* Ke, L., Ye, M., Danelljan, M., Liu, Y., Tai, Y-W., Tang, C-K., & Yu, F. (2023). [高质量的任意分割](https:\u002F\u002Farxiv.org\u002Fabs\u002F2306.01567)。arXiv:2306.01567。\n* Zhao, X., Ding, W., An, Y., Du, Y., Yu, T., Li, M., Tang, M., & Wang, J. (2023). [快速任意分割](https:\u002F\u002Farxiv.org\u002Fabs\u002F2306.12156)。arXiv:2306.12156 [cs.CV]。\n* Zhang, C., Han, D., Qiao, Y., Kim, J. U., Bae, S-H., Lee, S., & Hong, C. S. (2023). [更快速的任意分割：面向移动应用的轻量级 SAM](https:\u002F\u002Farxiv.org\u002Fabs\u002F2306.14289)。arXiv:2306.14289。","# sd-webui-inpaint-anything 快速上手指南\n\n`sd-webui-inpaint-anything` 是 Stable Diffusion Web UI (AUTOMATIC1111) 的一款扩展插件。它集成了 **Segment Anything (SAM)** 模型，允许用户通过简单的点击或涂鸦来自动生成高质量蒙版，从而极大提升局部重绘（Inpainting）和外绘（Outpainting）的效率与精度。\n\n## 环境准备\n\n在开始之前，请确保满足以下系统要求和前置依赖：\n\n*   **基础环境**：已安装并正常运行 **AUTOMATIC1111 Stable Diffusion Web UI**。\n    *   版本要求：Web UI 版本需为 **v1.3.0** 或更高。\n*   **显存优化（推荐）**：为了流畅运行 SAM 模型，建议启用 `xformers`。\n    *   启动命令示例：`.\u002Fwebui.sh --xformers` (Linux\u002FMac) 或 `webui.bat --xformers` (Windows)。\n*   **浏览器注意**：请勿使用具有严格隐私保护功能的浏览器（如 DuckDuckGo），否则可能导致无法从草图中获取蒙版数据。建议使用 Chrome 或 Edge。\n*   **网络环境**：首次运行需下载 SAM 系列模型和重绘模型，文件较大，请确保网络连接稳定。\n\n## 安装步骤\n\n请按照以下步骤在 Web UI 中安装该扩展：\n\n1.  启动 Stable Diffusion Web UI，点击顶部导航栏的 **Extensions**（扩展）标签页。\n2.  选择 **Install from URL**（从网址安装）子标签页。\n3.  在 `URL for extension's git repository` 输入框中填入以下地址：\n    ```text\n    https:\u002F\u002Fgithub.com\u002FUminosachi\u002Fsd-webui-inpaint-anything.git\n    ```\n4.  点击 **Install** 按钮等待安装完成。\n5.  安装完成后，切换到 **Installed** 标签页，点击 **Apply and restart UI** 重启 Web UI。\n\n## 基本使用\n\n安装并重启后，您将看到新的 **Inpaint Anything** 标签页。以下是完成一次标准局部重绘的最简流程：\n\n### 1. 下载模型\n进入 `Inpaint Anything` 标签页，点击 **Download model** 按钮。\n*   系统会自动下载默认的 SAM 模型（如 `sam_vit_h`）。\n*   *注意：大尺寸模型（Huge\u002FLarge）效果更好但占用更多显存，可根据硬件情况在模型 ID 下拉框切换。*\n\n### 2. 生成蒙版\n1.  将需要处理的图片拖拽至输入区域。\n2.  点击 **Run Segment Anything** 按钮，等待分割结果生成。\n3.  在生成的图像上，使用画笔工具**点击**或**涂抹**您想要重绘的目标区域。\n    *   按 `S` 键可全屏查看，按 `R` 键重置缩放。\n4.  点击 **Create mask** 按钮，系统将自动提取选区并生成黑白蒙版。\n\n> **蒙版微调技巧**：\n> *   若选区过小，点击 `Expand mask region` 扩大范围。\n> *   若需排除某区域，使用 `Trim mask by sketch` 并在图上涂抹排除区。\n> *   若需增加选区，使用 `Add mask by sketch` 并在图上涂抹增加区。\n\n### 3. 执行重绘\n在页面下方的 **Inpainting Tab** 中进行设置：\n1.  输入正向提示词（Prompt）和负向提示词（Negative Prompt）。\n2.  选择 **Inpainting Model ID**（首次使用会自动下载对应的重绘模型）。\n3.  （可选）勾选 `Mask area Only` 仅对蒙版区域进行修改。\n4.  点击 **Run Inpainting** 开始生成。\n\n生成完成后，图片将自动保存至 `outputs\u002Finpaint-anything\u002F日期文件夹` 中。您也可以直接将结果图拖回主界面进行二次创作。","一位电商设计师需要快速移除产品宣传图中背景里杂乱的路人，同时保持主体商品的光影和细节完美无瑕。\n\n### 没有 sd-webui-inpaint-anything 时\n- **抠图耗时费力**：设计师必须手动使用钢笔工具或画笔在 Photoshop 中逐帧描绘路人轮廓，遇到发丝或复杂边缘时极易出错，单张图片处理需耗费 15 分钟以上。\n- **重绘边界生硬**：传统蒙版难以精准控制修复范围，导致 AI 重绘后商品边缘常出现模糊、断裂或与背景融合不自然的“伪影”。\n- **试错成本高昂**：若对首次重绘效果不满意，需重新手动调整蒙版形状并再次生成，反复修改严重打断创作心流。\n- **复杂场景束手无策**：当背景物体与商品颜色相近或部分遮挡时，手动区分前景与背景极其困难，往往需要高超的合成技巧才能弥补。\n\n### 使用 sd-webui-inpaint-anything 后\n- **点选即得蒙版**：依托 Segment Anything 模型，设计师只需在路人位置轻轻点击或简单涂抹，系统即可毫秒级自动生成高精度分割掩码，将准备时间缩短至 30 秒。\n- **智能边缘优化**：生成的蒙版能自动识别物体细微边界（如头发丝），配合\"Expand mask region\"功能微调范围，确保重绘区域过渡自然，完美保留商品细节。\n- **交互式灵活调整**：若自动分割略有偏差，可直接使用\"Add\u002FTrim mask by sketch\"功能通过笔刷增减区域，无需推翻重来，实时预览让调整过程直观高效。\n- **一键批量重绘**：结合 Stable Diffusion 的强大生成能力，输入提示词后即可针对特定掩码区域进行多次迭代重绘，轻松获得多种背景替换方案供选择。\n\nsd-webui-inpaint-anything 通过将前沿的自动分割技术与生成式重绘无缝衔接，把原本繁琐的手工抠图流程转化为“点选即改”的智能化操作，极大提升了图像编辑的效率与质感。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FUminosachi_sd-webui-inpaint-anything_ee43e469.png","Uminosachi","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FUminosachi_d9f81fd7.png",null,"UminosaAI","https:\u002F\u002Fgithub.com\u002FUminosachi",[80,84,88],{"name":81,"color":82,"percentage":83},"Python","#3572A5",97.7,{"name":85,"color":86,"percentage":87},"JavaScript","#f1e05a",1.6,{"name":89,"color":90,"percentage":91},"Cuda","#3A4E3A",0.6,1290,119,"2026-04-15T06:56:00","Apache-2.0","Linux, macOS, Windows","必需 NVIDIA GPU（推荐），需支持 xformers 以优化显存；显存需求取决于所选 SAM 模型大小（Base\u002FLarge\u002FHuge），Large 和 Huge 模型消耗更多显存；未明确具体 CUDA 版本，但需兼容 Stable Diffusion Web UI 环境","未说明",{"notes":100,"python":101,"dependencies":102},"该工具是 AUTOMATIC1111 Stable Diffusion Web UI 的扩展插件，需先安装主程序（v1.3.0 及以上）。支持多种 SAM 模型（Base, Large, Huge），模型越大显存占用越高。首次运行需下载模型文件（存储在 models 目录或 HuggingFace 缓存中）。建议使用 --xformers 参数启动以节省显存。部分浏览器隐私保护插件可能影响草图掩码获取。Gradio 3.23.0 及以下版本可能导致分割图像显示过小。","未说明（依赖 AUTOMATIC1111 Stable Diffusion Web UI 环境）",[103,104,105,106,107],"Stable Diffusion Web UI (v1.3.0+)","Segment Anything (SAM\u002FSAM2\u002FMobileSAM\u002FFastSAM)","diffusers","Lama Cleaner","sd-webui-controlnet (可选)",[15,27],[110,111,105,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128],"ai-art","anything","diffusion","generative-art","gradio","huggingface","huggingface-diffusers","image-generation","image2image","img2img","inpaint","inpainting","latent-diffusion","segment","segmentation","stable-diffusion","inpaint-anything","segment-anything","extension","2026-03-27T02:49:30.150509","2026-04-20T19:41:04.557647",[132,137,142,147,151,156],{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},45561,"安装扩展后，在 WebUI 界面中找不到 \"Inpaint Anything\" 选项卡怎么办？","请按照以下路径查找并加载扩展：点击顶部菜单的 \"Extensions\"（扩展）> \"Available\"（可用）> 点击 \"Load from:\" 旁边的刷新按钮 > 在列表中搜索 \"Inpaint Anything TAB\" 并点击安装。安装完成后重启 WebUI 即可看到该选项卡。","https:\u002F\u002Fgithub.com\u002FUminosachi\u002Fsd-webui-inpaint-anything\u002Fissues\u002F2",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},45562,"遇到 `ImportError: cannot import name 'unload_model_weights'` 错误导致脚本加载失败怎么办？","这通常是因为 Stable Diffusion WebUI (A1111) 版本过旧或不匹配导致的。建议更新 WebUI 到最新版本。如果不会使用 Git 命令，可以手动下载最新版的 WebUI 压缩包进行覆盖安装，但强烈建议安装 Git 以便未来轻松更新。兼容的版本参考包括 v1.4.0 及以上版本。","https:\u002F\u002Fgithub.com\u002FUminosachi\u002Fsd-webui-inpaint-anything\u002Fissues\u002F62",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},45563,"如何将生成的图片和蒙版保存到 WebUI 默认的输出目录，而不是扩展文件夹中？","该功能已实现。请进入 WebUI 的 \"Settings\"（设置）选项卡，找到 \"Inpaint Anything\" 部分。在保存文件夹选项中，选择 \"img2img-images\"。这样扩展就会遵循 \"Paths for saving\" 中设置的 img2img 输出路径来保存图片和蒙版，方便统一管理。","https:\u002F\u002Fgithub.com\u002FUminosachi\u002Fsd-webui-inpaint-anything\u002Fissues\u002F21",{"id":148,"question_zh":149,"answer_zh":150,"source_url":146},45564,"如何在 A1111 原生的图生图（Img2Img）页面使用本扩展生成的蒙版进行重绘？","该功能已支持。在 \"Inpaint Anything\" 选项卡中处理完图片后，界面上会有按钮可以将生成的蒙版直接发送到 \"Img2Img\" 的 \"Inpaint upload\"（重绘上传）区域。这样您就可以在原生界面中选择任意自定义模型（如 Dreambooth 模型）配合该蒙版进行重绘操作。",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},45565,"在 A1111 的 Dev (开发版) 分支上运行 \"Run Segment Anything\" 时报错怎么办？","此类错误通常发生在 WebUI 的开发版（dev branch）上，因为 API 或底层库可能发生了变更。建议切换回 A1111 的稳定版（main\u002Fmaster 分支）使用。如果必须使用开发版，请等待扩展作者适配新版 Gradio 或 WebUI 的更新，或者在 Issues 中提供详细的报错日志以便作者修复。","https:\u002F\u002Fgithub.com\u002FUminosachi\u002Fsd-webui-inpaint-anything\u002Fissues\u002F44",{"id":157,"question_zh":158,"answer_zh":159,"source_url":160},45566,"如何使用 Canvas Zoom 功能放大 Segment Anything 生成的图像？","Canvas Zoom 功能默认已集成可用。如果您在使用中遇到问题，可能是因为您正在使用 WebUI 的 'dev' 分支，某些修改尚未完全转移至新版本的 Gradio 中。建议切换到稳定版分支，或者关注相关 Canvas Zoom 插件的更新动态。","https:\u002F\u002Fgithub.com\u002FUminosachi\u002Fsd-webui-inpaint-anything\u002Fissues\u002F74",[]]