[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-AILab-CVC--GPT4Tools":3,"tool-AILab-CVC--GPT4Tools":61},[4,18,26,36,44,52],{"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":10,"last_commit_at":24,"category_tags":25,"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":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",144730,2,"2026-04-07T23:26:32",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":10,"last_commit_at":58,"category_tags":59,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,60],"视频",{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":77,"owner_twitter":77,"owner_website":77,"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":113,"github_topics":77,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":115,"updated_at":116,"faqs":117,"releases":128},5320,"AILab-CVC\u002FGPT4Tools","GPT4Tools","GPT4Tools is an intelligent system that can automatically decide, control, and utilize different visual foundation models, allowing the user to interact with images during a conversation.","GPT4Tools 是一个智能系统，旨在让大语言模型（LLM）学会在对话中自主调用多种视觉基础模型。它基于 Vicuna（LLaMA）架构，通过 7.1 万条自构建的指令数据进行微调，能够理解用户的自然语言需求，自动判断并控制不同的视觉工具来处理图像任务。\n\n这一工具主要解决了传统大模型无法直接操作外部视觉算法的痛点。以往用户需要分别使用不同软件进行图像分割、关键点检测或风格迁移等操作，而 GPT4Tools 将这些能力整合进流畅的对话中。用户只需上传图片并用文字描述需求，系统即可自动完成从“理解意图”到“选择工具”再到“执行操作”的全过程，实现无缝的图文交互体验。\n\nGPT4Tools 特别适合 AI 研究人员、开发者以及希望探索多模态应用的设计师使用。其独特的技术亮点在于提出了“自指令”（Self-instruction）方法，允许用户通过简单的微调和 LoRA 技术，教会自己的大语言模型如何使用新工具，极大地降低了定制门槛。此外，项目开源了完整的训练数据集和适配 Vicuna-v1.5 的预训练模型，为社区进一步研究提供了坚实基础。无论是想要快速搭建原型的开发者，还是致力于多模态","GPT4Tools 是一个智能系统，旨在让大语言模型（LLM）学会在对话中自主调用多种视觉基础模型。它基于 Vicuna（LLaMA）架构，通过 7.1 万条自构建的指令数据进行微调，能够理解用户的自然语言需求，自动判断并控制不同的视觉工具来处理图像任务。\n\n这一工具主要解决了传统大模型无法直接操作外部视觉算法的痛点。以往用户需要分别使用不同软件进行图像分割、关键点检测或风格迁移等操作，而 GPT4Tools 将这些能力整合进流畅的对话中。用户只需上传图片并用文字描述需求，系统即可自动完成从“理解意图”到“选择工具”再到“执行操作”的全过程，实现无缝的图文交互体验。\n\nGPT4Tools 特别适合 AI 研究人员、开发者以及希望探索多模态应用的设计师使用。其独特的技术亮点在于提出了“自指令”（Self-instruction）方法，允许用户通过简单的微调和 LoRA 技术，教会自己的大语言模型如何使用新工具，极大地降低了定制门槛。此外，项目开源了完整的训练数据集和适配 Vicuna-v1.5 的预训练模型，为社区进一步研究提供了坚实基础。无论是想要快速搭建原型的开发者，还是致力于多模态交互研究的学者，都能从中获得高效的支持。","# GPT4Tools: Teaching LLM to Use Tools via Self-instruction\n\n[Lin Song](http:\u002F\u002Flinsong.info\u002F), [Yanwei Li](https:\u002F\u002Fyanwei-li.com\u002F), [Rui Yang](https:\u002F\u002Fgithub.com\u002FYangr116), Sijie Zhao, [Yixiao Ge](https:\u002F\u002Fgeyixiao.com\u002F), [Xiu Li](https:\u002F\u002Fwww.sigs.tsinghua.edu.cn\u002Flx\u002F), [Ying Shan](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=4oXBp9UAAAAJ&hl=en)\n\n\nGPT4Tools is a centralized system that can control multiple visual foundation models. \nIt is based on Vicuna (LLaMA), and 71K self-built instruction data.\nBy analyzing the language content, GPT4Tools is capable of automatically deciding, controlling, and utilizing different visual foundation models, allowing the user to interact with images during a conversation.\nWith this approach, GPT4Tools provides a seamless and efficient solution to fulfill various image-related requirements in a conversation.\nDifferent from previous work, we support users teach their own LLM to use tools with simple refinement via self-instruction and LoRA.\n\n\u003Ca href='https:\u002F\u002Fgpt4tools.github.io'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-Page-Green'>\u003C\u002Fa>  \u003Ca href='https:\u002F\u002Fhuggingface.co\u002Fstevengrove\u002Fgpt4tools-vicuna-13b-lora'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Model-blue'>\u003C\u002Fa>  [![YouTube](https:\u002F\u002Fbadges.aleen42.com\u002Fsrc\u002Fyoutube.svg)](https:\u002F\u002Fyoutu.be\u002FQrj94ibQIT8) [![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-Paper-\u003CCOLOR>.svg)](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2305.18752.pdf)\n\n## Updates\n\n* 🔥 We update new code and models adapted to vicuna-v1.5!\n* 🔥 Our paper is accpeted by [NIPS 2023](https:\u002F\u002Fopenreview.net\u002Fpdf?id=cwjh8lqmOL)!\n* 🔥 We now release the \u003Ca href='https:\u002F\u002Farxiv.org\u002Fpdf\u002F2305.18752.pdf'>\u003Cstrong>\u003Cfont color='#008AD7'>paper\u003C\u002Ffont>\u003C\u002Fstrong>\u003C\u002Fa> and new \u003Ca href='https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fstevengrove\u002FGPT4Tools'>\u003Cstrong>\u003Cfont color='#008AD7'>demo\u003C\u002Ffont>\u003C\u002Fstrong>\u003C\u002Fa> with LLAVA, OPT, LlaMA and Vicuna.\n* 🔥 We released pretrained GPT4Tools models with \u003Cstrong>\u003Cfont color=\"#008AD7\">Vicuna-13B\u003C\u002Ffont>\u003C\u002Fstrong> and released the dataset for \u003Cstrong>\u003Cfont color=\"#008AD7\">self-instruction\u003C\u002Ffont>\u003C\u002Fstrong>. Check out the blog and demo.\n\n## Demo\nWe provide some selected examples using GPT4Tools in this section. More examples can be found in our [project page](https:\u002F\u002Fgpt4tools.github.io). Feel free to try our onlin [demo](https:\u002F\u002Fc60eb7e9400930f31b.gradio.live)!\n\n\n\u003Cdiv align=center>\n\u003Cimg width=\"80%\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_786c3008c78d.gif\"\u002F>\n\u003C\u002Fdiv>\n\n\u003Cdetails>\n  \u003Csummary>More demos\u003C\u002Fsummary>\n\n|   |   |\n:-------------------------:|:-------------------------:\n![segment](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_38a7145066c6.png) |  ![detect kps](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_48a612258123.png)\n![solve problem](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_b416c218186f.png)  |  ![style transfer](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_6ada34448452.png)\n\n\u003C\u002Fdetails>\n\n\n---\n## Dataset\n| Data file name | **Size** | OneDrive| Google Driver|\n|:------------------|:--------:| :--------: | :---------:|\n| gpt4tools_71k.json    | 229 MB   | [link](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AqPQkBZ4aeVnhRdryHC9b1NtWJpZ?e=ZHBCqd) | [link](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1JKIT-Or1of7TJuWvmrJpPoOx0cLdcWry\u002Fview?usp=share_link)|\n| gpt4tools_val_seen.json    | --   | [link](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AqPQkBZ4aeVnhT1DPh5qZtSoZjtC?e=bDALfB) | [link](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1nDl7zhtQSx-L12K7151DfQD-XTqh_uzc\u002Fview?usp=sharing)|\n| gpt4tools_test_unseen.json    | --   | [link](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AqPQkBZ4aeVnhTz3dCV77Ps6abzQ?e=ex4ojQ) | [link](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1BHm0HEwYaVdMRYZiDdECy8ozyix607PH\u002Fview?usp=sharing)|\n\n* ```gpt4tools_71k.json``` contains 71K instruction-following data we used for fine-tuning the GPT4Tools model. \n\n* ```gpt4tools_val_seen.json``` is the manually cleaned instruction data used for validation, which includes instructions related to tools of ```gpt4tools_71k.json```.\n\n* ```gpt4tools_test_unseen.json``` cleaned instruction data used for testing, including instructions related to some tools that are absented in ```gpt4tools_71k.json```.\n\n[data.md](.\u002Fasserts\u002Fdocs\u002Fdata.md) shows how to generate, format and clean the data.\n\n\n## Models\nGTP4Tools mainly contains three parts: LLM for instruction, LoRA for adaptation, and Visual Agent for provided functions.\nIt is a flexible and extensible system that can be easily extended to support more tools and functions.\nFor example, users can replace the existing LLM or tools with their own models, or add new tools to the system.\nThe only things needed are finetuned the LoRA with the provided instruction, which teaches LLM to use the provided tools.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_bfa738fb8ef4.png)\n\nGPT4Tools is based on the [Vicuna](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat), we release the LoRA weights of GPT4Tools to comply with the LLaMA model license. You can merge our LoRA weights with the Vicuna weights to obtain the GPT4Tools weights.\n\n\n## Getting Start\n### Env\n```\ngit clone https:\u002F\u002Fgithub.com\u002FAILab-CVC\u002FGPT4Tools\ncd GPT4Tools\npip install -r requirements.txt\n```\n\n### Weights \n1. Download [vicuna-7b-v1.5](https:\u002F\u002Fhuggingface.co\u002Flmsys\u002Fvicuna-7b-v1.5) and [vicuna-13b-v1.5](https:\u002F\u002Fhuggingface.co\u002Flmsys\u002Fvicuna-13b-v1.5).\n```\n# download to your cache dir\npython3 scripts\u002Fdownload.py \\\n\t--model-names \"lmsys\u002Fvicuna-13b-v1.5\" \"lmsys\u002Fvicuna-7b-v1.5\" \\\n\t--cache-dir $your_cache_dir\n```\n\n2. Download gpt4tools LoRA weights following the below links:\n\n| Models | OneDrive| Google Driver| Huggingface|\n|:------------------|:--------: | :---------:| :---------:|\n| vicuna-7b-v1.5-gpt4tools    | [link]() | [link](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1UdA6_iOxXZs2V13adLa_V605Ty19KR4s\u002Fview?usp=sharing) | | \n| vicuna-13b-v1.5-gpt4tools    | [link]() | [link](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1V6r2aoo1ovxMi63yPkUC0fwdz-M-xXwC\u002Fview?usp=sharing)| |\n\nOld weights can be found [here](.\u002Fasserts\u002Fdocs\u002Fweights.md).\n\n### Tools\nGPT4Tools supports 22 tools. Please check [tools.md](docs\u002Ftools.md) for more details.\nWhen using tools for the first time, the weights of tools need to be downloaded to cache. If you don't like stored them on default cache, please revise the shell environment varibles: \n```\nexport TRANSFORMERS_CACHE=${your_transformers_cache}\nexport HUGGINGFACE_HUB_CACHE=${your_diffusers_cache}\n```\nAdditionally, you can also download weights to the custom cache.\n```\n# download huggingface model\npython3 scripts\u002Fdownload.py \\\n\t--model-names \"Salesforce\u002Fblip-image-captioning-base\" \"Salesforce\u002Fblip-vqa-base\" \"timbrooks\u002Finstruct-pix2pix\" \"runwayml\u002Fstable-diffusion-v1-5\" \"runwayml\u002Fstable-diffusion-inpainting\" \"lllyasviel\u002FControlNet\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-canny\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-mlsd\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-hed\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-scribble\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-openpose\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-seg\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-depth\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-normal\" \"sam\" \"groundingdino\" \\\n\t--cache-dir $your_cache_dir\n```\n\n### Serving with Web GUI \nFollowing [scripts\u002Fdemo.sh](.\u002Fscripts\u002Fdemo.sh) or the below code to make a gradio interface on your own devices:\n```\n# Advice for 1 GPU\npython gpt4tools_demo.py \\\n\t--base_model $path_to_vicuna_with_tokenizer \\\n\t--lora_model $path_to_lora_weights \\\n\t--llm_device \"cpu\" \\ \n\t--load \"Text2Box_cuda:0,Segmenting_cuda:0,Inpainting_cuda:0,ImageCaptioning_cuda:0\" \\ \n\t--cache-dir $your_cache_dir \\\n\t--server-port 29509 \\\n\t--share\n```\n\n```\n# Advice for 4 GPUs\npython gpt4tools_demo.py \\\n\t--base_model $path_to_vicuna_with_tokenizer\n\t--lora_model $path_to_lora_weights \\\n\t--llm_device \"cuda:3\" \\\n\t--load \"Text2Box_cuda:0,Segmenting_cuda:0,Inpainting_cuda:0,ImageCaptioning_cuda:0,Text2Image_cuda:1,VisualQuestionAnswering_cuda:1,InstructPix2Pix_cuda:2,SegText2Image_cuda:2,Image2Pose_cpu,PoseText2Image_cuda:2\" \\\n\t--cache-dir $your_cache_dir \\\n\t--server-port 29509 \\\n\t--share\n```\n\nYou can customize the used tools by specifying ```{tools_name}_{devices}``` after args ```--load``` of ```gpt4tools_demo.py```. ```tools_name``` is illustrated in [tools.md](.\u002Fdocs\u002Ftools.md).\n\n### Finetuning\nAfter downloading the ```gpt4tools_71k.json``` to ```.\u002Fdatasets```, you can follow [scripts\u002Ffinetune_lora.sh](scripts\u002Ffinetune_lora.sh) or run the below code to finetune your model:\n```\ndeepspeed train.py \\\n\t--base_model $path_to_vicuna_with_tokenizer \\\n\t--data_path $path_to_gpt4tools_71k.json \\\n\t--deepspeed \"scripts\u002Fzero2.json\" \\\n\t--output_dir output\u002Fgpt4tools \\\n\t--num_epochs 6 \\\n\t--per_device_train_batch_size 1 \\\n\t--per_device_eval_batch_size 4 \\\n\t--gradient_accumulation_steps 16 \\\n\t--model_max_length 2048 \\\n\t--lora_target_modules '[q_proj,k_proj,v_proj,o_proj]' \\\n\t--lora_r 16 \\\n\t--learning_rate 3e-4 \\\n\t--lazy_preprocess True \\\n\t--cache_dir $your_cache_dir \\\n\t--report_to 'tensorboard' \\\n\t--gradient_checkpointing True\n```\n\n| Hyperparameter | Global Batch Size | Learning rate | Max length | Weight decay | LoRA attention dimension (lora_r) | LoRA scaling alpha(lora_alpha) | LoRA dropout (lora_dropout) | Modules to apply LoRA (lora_target_modules)      |\n|:--------------:|:-----------------:|:-------------:|:----------:|:------------:|:---------------------------------:|:----------:|:------------:|:-----------------------------:|\n|    GPT4Tools & Vicuna-13B   |        512        |      3e-4     |    2048    |      0.0     |                 16                |     16     |     0.05     | [q_proj,k_proj,v_proj,o_proj] |\n\nIf you want to evaluate the model's successful rate of using tools, please locate [here](.\u002Fasserts\u002Fdocs\u002Finference.md).\n\n## Acknowledgement\n* [VisualChatGPT](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskMatrix): It connects ChatGPT and a series of Visual Foundation Models to enable sending and receiving images during chatting.\n* [Vicuna](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat): The language ability of Vicuna is fantastic and amazing. And it is open-source!\n* [Alpaca-LoRA](https:\u002F\u002Fgithub.com\u002Ftloen\u002Falpaca-lora): Instruct-tune LLaMA on consumer hardware.\n\nIf you're using our GPT4Tools in your research or applications, please cite:\n```\n@misc{gpt4tools,\n  title = {GPT4Tools: Teaching LLM to Use Tools via Self-instruction},\n  author={Rui Yang, Lin Song, Yanwei Li, Sijie Zhao, Yixiao Ge, Xiu Li, Ying Shan},\n  journal={arXiv preprint arXiv:2305.18752},\n  year={2023}\n}\n```\n","# GPT4Tools：通过自我指令教大型语言模型使用工具\n\n[林松](http:\u002F\u002Flinsong.info\u002F)、[李彦伟](https:\u002F\u002Fyanwei-li.com\u002F)、[杨锐](https:\u002F\u002Fgithub.com\u002FYangr116)、赵思杰、[葛一骁](https:\u002F\u002Fgeyixiao.com\u002F)、[李秀](https:\u002F\u002Fwww.sigs.tsinghua.edu.cn\u002Flx\u002F)、[单颖](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=4oXBp9UAAAAJ&hl=en)\n\n\nGPT4Tools是一个能够控制多个视觉基础模型的集中式系统。\n它基于Vicuna（LLaMA），并使用71K条自建指令数据。通过分析语言内容，GPT4Tools能够自动决定、控制和调用不同的视觉基础模型，从而允许用户在对话过程中与图像进行交互。采用这种方法，GPT4Tools为满足对话中各种图像相关需求提供了一种无缝且高效的解决方案。\n与以往的工作不同，我们支持用户通过简单的自我指令微调和LoRA技术，教会自己的大型语言模型如何使用工具。\n\n\u003Ca href='https:\u002F\u002Fgpt4tools.github.io'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-Page-Green'>\u003C\u002Fa>  \u003Ca href='https:\u002F\u002Fhuggingface.co\u002Fstevengrove\u002Fgpt4tools-vicuna-13b-lora'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Model-blue'>\u003C\u002Fa>  [![YouTube](https:\u002F\u002Fbadges.aleen42.com\u002Fsrc\u002Fyoutube.svg)](https:\u002F\u002Fyoutu.be\u002FQrj94ibQIT8) [![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-Paper-\u003CCOLOR>.svg)](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2305.18752.pdf)\n\n## 更新\n\n* 🔥 我们更新了适配vicuna-v1.5的新代码和模型！\n* 🔥 我们的论文已被[NIPS 2023](https:\u002F\u002Fopenreview.net\u002Fpdf?id=cwjh8lqmOL)接收！\n* 🔥 我们现在发布了包含LLAVA、OPT、LlaMA和Vicuna的\u003Ca href='https:\u002F\u002Farxiv.org\u002Fpdf\u002F2305.18752.pdf'>\u003Cstrong>\u003Cfont color='#008AD7'>论文\u003C\u002Ffont>\u003C\u002Fstrong>\u003C\u002Fa>和新的\u003Ca href='https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fstevengrove\u002FGPT4Tools'>\u003Cstrong>\u003Cfont color='#008AD7'>演示\u003C\u002Ffont>\u003C\u002Fstrong>\u003C\u002Fa>。\n* 🔥 我们发布了基于\u003Cstrong>\u003Cfont color=\"#008AD7\">Vicuna-13B\u003C\u002Ffont>\u003C\u002Fstrong>的预训练GPT4Tools模型，并公开了用于\u003Cstrong>\u003Cfont color=\"#008AD7\">自我指令\u003C\u002Ffont>\u003C\u002Fstrong>的数据集。请查看博客和演示。\n\n## 演示\n本节提供了一些使用GPT4Tools的精选示例。更多示例可在我们的[项目页面](https:\u002F\u002Fgpt4tools.github.io)上找到。欢迎尝试我们的在线[演示](https:\u002F\u002Fc60eb7e9400930f31b.gradio.live)！\n\n\n\u003Cdiv align=center>\n\u003Cimg width=\"80%\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_786c3008c78d.gif\"\u002F>\n\u003C\u002Fdiv>\n\n\u003Cdetails>\n  \u003Csummary>更多演示\u003C\u002Fsummary>\n\n|   |   |\n:-------------------------:|:-------------------------:\n![分割](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_38a7145066c6.png) |  ![关键点检测](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_48a612258123.png)\n![解决问题](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_b416c218186f.png)  |  ![风格迁移](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_6ada34448452.png)\n\n\u003C\u002Fdetails>\n\n\n---\n## 数据集\n| 数据文件名 | **大小** | OneDrive| Google Driver|\n|:------------------|:--------:| :--------: | :---------:|\n| gpt4tools_71k.json    | 229 MB   | [链接](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AqPQkBZ4aeVnhRdryHC9b1NtWJpZ?e=ZHBCqd) | [链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1JKIT-Or1of7TJuWvmrJpPoOx0cLdcWry\u002Fview?usp=share_link)|\n| gpt4tools_val_seen.json    | --   | [链接](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AqPQkBZ4aeVnhT1DPh5qZtSoZjtC?e=bDALfB) | [链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1nDl7zhtQSx-L12K7151DfQD-XTqh_uzc\u002Fview?usp=sharing)|\n| gpt4tools_test_unseen.json    | --   | [链接](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AqPQkBZ4aeVnhTz3dCV77Ps6abzQ?e=ex4ojQ) | [链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1BHm0HEwYaVdMRYZiDdECy8ozyix607PH\u002Fview?usp=sharing)|\n\n* ```gpt4tools_71k.json``` 包含我们用于微调GPT4Tools模型的71K条指令遵循数据。\n\n* ```gpt4tools_val_seen.json``` 是用于验证的手动清理指令数据，其中包括与```gpt4tools_71k.json```中的工具相关的指令。\n\n* ```gpt4tools_test_unseen.json``` 是用于测试的清理指令数据，包括一些在```gpt4tools_71k.json```中未出现的工具相关的指令。\n\n[data.md](.\u002Fasserts\u002Fdocs\u002Fdata.md) 展示了如何生成、格式化和清理数据。\n\n\n## 模型\nGTP4Tools主要由三部分组成：用于指令处理的LLM、用于适配的LoRA，以及提供功能的视觉智能体。这是一个灵活且可扩展的系统，可以轻松扩展以支持更多工具和功能。例如，用户可以用自己的模型替换现有的LLM或工具，或者向系统添加新工具。唯一需要做的就是使用提供的指令对LoRA进行微调，从而教会LLM如何使用这些工具。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_readme_bfa738fb8ef4.png)\n\nGPT4Tools基于[Vicuna](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat)，我们发布GPT4Tools的LoRA权重以遵守LLaMA模型的许可协议。您可以将我们的LoRA权重与Vicuna权重合并，以获得GPT4Tools的权重。\n\n\n## 开始使用\n### 环境\n```\ngit clone https:\u002F\u002Fgithub.com\u002FAILab-CVC\u002FGPT4Tools\ncd GPT4Tools\npip install -r requirements.txt\n```\n\n### 权重 \n1. 下载[vicuna-7b-v1.5](https:\u002F\u002Fhuggingface.co\u002Flmsys\u002Fvicuna-7b-v1.5)和[vicuna-13b-v1.5](https:\u002F\u002Fhuggingface.co\u002Flmsys\u002Fvicuna-13b-v1.5)。\n```\n# 下载到您的缓存目录\npython3 scripts\u002Fdownload.py \\\n\t--model-names \"lmsys\u002Fvicuna-13b-v1.5\" \"lmsys\u002Fvicuna-7b-v1.5\" \\\n\t--cache-dir $your_cache_dir\n```\n\n2. 按照以下链接下载gpt4tools LoRA权重：\n\n| 模型 | OneDrive| Google Driver| Huggingface|\n|:------------------|:--------: | :---------:| :---------:|\n| vicuna-7b-v1.5-gpt4tools    | [链接]() | [链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1UdA6_iOxXZs2V13adLa_V605Ty19KR4s\u002Fview?usp=sharing) | | \n| vicuna-13b-v1.5-gpt4tools    | [链接]() | [链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1V6r2aoo1ovxMi63yPkUC0fwdz-M-xXwC\u002Fview?usp=sharing)| |\n\n旧版权重可在[这里](.\u002Fasserts\u002Fdocs\u002Fweights.md)找到。\n\n### 工具\nGPT4Tools支持22种工具。请参阅[tools.md](docs\u002Ftools.md)以获取更多详细信息。首次使用工具时，需要将工具的权重下载到缓存中。如果您不想将其存储在默认缓存中，请修改Shell环境变量：\n```\nexport TRANSFORMERS_CACHE=${your_transformers_cache}\nexport HUGGINGFACE_HUB_CACHE=${your_diffusers_cache}\n```\n此外，您也可以将权重下载到自定义缓存中。\n```\n# 下载Huggingface模型\npython3 scripts\u002Fdownload.py \\\n\t--model-names \"Salesforce\u002Fblip-image-captioning-base\" \"Salesforce\u002Fblip-vqa-base\" \"timbrooks\u002Finstruct-pix2pix\" \"runwayml\u002Fstable-diffusion-v1-5\" \"runwayml\u002Fstable-diffusion-inpainting\" \"lllyasviel\u002FControlNet\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-canny\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-mlsd\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-hed\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-scribble\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-openpose\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-seg\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-depth\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-normal\" \"sam\" \"groundingdino\" \\\n\t--cache-dir $your_cache_dir\n```\n\n### 通过 Web GUI 提供服务\n按照 [scripts\u002Fdemo.sh](.\u002Fscripts\u002Fdemo.sh) 或以下代码，在您自己的设备上搭建一个 Gradio 界面：\n```\n# 单 GPU 建议配置\npython gpt4tools_demo.py \\\n\t--base_model $path_to_vicuna_with_tokenizer \\\n\t--lora_model $path_to_lora_weights \\\n\t--llm_device \"cpu\" \\ \n\t--load \"Text2Box_cuda:0,Segmenting_cuda:0,Inpainting_cuda:0,ImageCaptioning_cuda:0\" \\ \n\t--cache-dir $your_cache_dir \\\n\t--server-port 29509 \\\n\t--share\n```\n\n```\n# 四 GPU 建议配置\npython gpt4tools_demo.py \\\n\t--base_model $path_to_vicuna_with_tokenizer\n\t--lora_model $path_to_lora_weights \\\n\t--llm_device \"cuda:3\" \\\n\t--load \"Text2Box_cuda:0,Segmenting_cuda:0,Inpainting_cuda:0,ImageCaptioning_cuda:0,Text2Image_cuda:1,VisualQuestionAnswering_cuda:1,InstructPix2Pix_cuda:2,SegText2Image_cuda:2,Image2Pose_cpu,PoseText2Image_cuda:2\" \\\n\t--cache-dir $your_cache_dir \\\n\t--server-port 29509 \\\n\t--share\n```\n\n您可以通过在 `gpt4tools_demo.py` 的 `--load` 参数后指定 `{tools_name}_{devices}` 来自定义使用的工具。`tools_name` 的具体说明请参阅 [tools.md](.\u002Fdocs\u002Ftools.md)。\n\n### 微调\n将 `gpt4tools_71k.json` 下载到 `.\u002Fdatasets` 目录后，您可以按照 [scripts\u002Ffinetune_lora.sh](scripts\u002Ffinetune_lora.sh) 中的步骤，或运行以下命令来微调您的模型：\n```\ndeepspeed train.py \\\n\t--base_model $path_to_vicuna_with_tokenizer \\\n\t--data_path $path_to_gpt4tools_71k.json \\\n\t--deepspeed \"scripts\u002Fzero2.json\" \\\n\t--output_dir output\u002Fgpt4tools \\\n\t--num_epochs 6 \\\n\t--per_device_train_batch_size 1 \\\n\t--per_device_eval_batch_size 4 \\\n\t--gradient_accumulation_steps 16 \\\n\t--model_max_length 2048 \\\n\t--lora_target_modules '[q_proj,k_proj,v_proj,o_proj]' \\\n\t--lora_r 16 \\\n\t--learning_rate 3e-4 \\\n\t--lazy_preprocess True \\\n\t--cache_dir $your_cache_dir \\\n\t--report_to 'tensorboard' \\\n\t--gradient_checkpointing True\n```\n\n| 超参数                     | 全局批量大小 | 学习率    | 最大长度 | 权重衰减 | LoRA 注意力维度 (lora_r) | LoRA 缩放因子 (lora_alpha) | LoRA 掉落率 (lora_dropout) | 应用 LoRA 的模块 (lora_target_modules)      |\n|:--------------------------:|:------------:|:---------:|:--------:|:--------:|:-----------------------:|:----------:|:----------:|:-------------------------------------:|\n| GPT4Tools & Vicuna-13B   |        512        |      3e-4     |    2048    |      0.0     |                 16                |     16     |     0.05     | [q_proj,k_proj,v_proj,o_proj] |\n\n如果您想评估模型使用工具的成功率，请参阅 [此处](.\u002Fasserts\u002Fdocs\u002Finference.md)。\n\n## 致谢\n* [VisualChatGPT](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskMatrix)：它连接了 ChatGPT 和一系列视觉基础模型，实现了聊天过程中图像的发送与接收。\n* [Vicuna](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat)：Vicuna 的语言能力非常出色且令人惊叹，而且它是开源的！\n* [Alpaca-LoRA](https:\u002F\u002Fgithub.com\u002Ftloen\u002Falpaca-lora)：可在消费级硬件上对 LLaMA 进行指令微调。\n\n如果您在研究或应用中使用了我们的 GPT4Tools，请引用以下文献：\n```\n@misc{gpt4tools,\n  title = {GPT4Tools: Teaching LLM to Use Tools via Self-instruction},\n  author={Rui Yang, Lin Song, Yanwei Li, Sijie Zhao, Yixiao Ge, Xiu Li, Ying Shan},\n  journal={arXiv preprint arXiv:2305.18752},\n  year={2023}\n}\n```","# GPT4Tools 快速上手指南\n\nGPT4Tools 是一个基于 Vicuna (LLaMA) 的集中式系统，能够通过自指令（Self-instruction）和 LoRA 微调，教会大语言模型自动决策、控制并利用多种视觉基础模型（如检测、分割、生成等），实现多模态对话交互。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**: Linux (推荐 Ubuntu 20.04+)\n- **Python**: 3.8 或更高版本\n- **GPU**: 建议至少 1 张 NVIDIA GPU (显存需求视加载的模型数量而定，单卡运行建议 24GB+，多卡可分布式加载工具)\n- **CUDA**: 适配当前 PyTorch 版本的 CUDA 驱动\n\n### 前置依赖\n确保已安装 `git` 和 `pip`。若需加速下载，建议配置国内镜像源（如清华源）。\n\n## 安装步骤\n\n### 1. 克隆项目\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FAILab-CVC\u002FGPT4Tools\ncd GPT4Tools\n```\n\n### 2. 安装 Python 依赖\n```bash\npip install -r requirements.txt\n```\n> **提示**: 若下载缓慢，可添加 `-i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple` 参数使用清华镜像源。\n\n### 3. 下载基础模型权重\n下载 Vicuna 基础模型到本地缓存目录（请将 `$your_cache_dir` 替换为实际路径）：\n```bash\npython3 scripts\u002Fdownload.py \\\n\t--model-names \"lmsys\u002Fvicuna-13b-v1.5\" \"lmsys\u002Fvicuna-7b-v1.5\" \\\n\t--cache-dir $your_cache_dir\n```\n\n### 4. 下载 GPT4Tools LoRA 权重\n从 Google Drive 下载对应的 LoRA 权重文件（以 13B 为例）：\n- **vicuna-13b-v1.5-gpt4tools**: [下载链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1V6r2aoo1ovxMi63yPkUC0fwdz-M-xXwC\u002Fview?usp=sharing)\n- **vicuna-7b-v1.5-gpt4tools**: [下载链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1UdA6_iOxXZs2V13adLa_V605Ty19KR4s\u002Fview?usp=sharing)\n\n下载后请记录解压后的路径，后续启动时需指定。\n\n### 5. 下载视觉工具模型（可选）\n首次运行时系统会自动下载所需的视觉模型（如 BLIP, Stable Diffusion, ControlNet 等）。若需预下载或自定义缓存路径，可设置环境变量并执行：\n```bash\nexport TRANSFORMERS_CACHE=${your_transformers_cache}\nexport HUGGINGFACE_HUB_CACHE=${your_diffusers_cache}\n\npython3 scripts\u002Fdownload.py \\\n\t--model-names \"Salesforce\u002Fblip-image-captioning-base\" \"Salesforce\u002Fblip-vqa-base\" \"timbrooks\u002Finstruct-pix2pix\" \"runwayml\u002Fstable-diffusion-v1-5\" \"runwayml\u002Fstable-diffusion-inpainting\" \"lllyasviel\u002FControlNet\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-canny\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-mlsd\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-hed\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-scribble\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-openpose\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-seg\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-depth\" \"fusing\u002Fstable-diffusion-v1-5-controlnet-normal\" \"sam\" \"groundingdino\" \\\n\t--cache-dir $your_cache_dir\n```\n\n## 基本使用\n\n### 启动 Web GUI 演示\n以下命令将启动一个 Gradio 界面，允许用户在浏览器中与 GPT4Tools 进行多模态交互。\n\n#### 单显卡方案 (推荐 24GB+ 显存)\n```bash\npython gpt4tools_demo.py \\\n\t--base_model $path_to_vicuna_with_tokenizer \\\n\t--lora_model $path_to_lora_weights \\\n\t--llm_device \"cpu\" \\ \n\t--load \"Text2Box_cuda:0,Segmenting_cuda:0,Inpainting_cuda:0,ImageCaptioning_cuda:0\" \\ \n\t--cache-dir $your_cache_dir \\\n\t--server-port 29509 \\\n\t--share\n```\n*注：将 `$path_to_vicuna_with_tokenizer` 替换为 Vicuna 模型路径，`$path_to_lora_weights` 替换为下载的 LoRA 权重路径。`--llm_device \"cpu\"` 可将大语言模型放在 CPU 以节省显存给视觉工具。*\n\n#### 多显卡方案 (例如 4 张卡)\n```bash\npython gpt4tools_demo.py \\\n\t--base_model $path_to_vicuna_with_tokenizer\n\t--lora_model $path_to_lora_weights \\\n\t--llm_device \"cuda:3\" \\\n\t--load \"Text2Box_cuda:0,Segmenting_cuda:0,Inpainting_cuda:0,ImageCaptioning_cuda:0,Text2Image_cuda:1,VisualQuestionAnswering_cuda:1,InstructPix2Pix_cuda:2,SegText2Image_cuda:2,Image2Pose_cpu,PoseText2Image_cuda:2\" \\\n\t--cache-dir $your_cache_dir \\\n\t--server-port 29509 \\\n\t--share\n```\n\n启动成功后，终端会显示本地访问地址（如 `http:\u002F\u002F127.0.0.1:29509`）或公共分享链接。打开浏览器即可上传图片并进行自然语言交互（例如：“请检测图中的猫”、“把背景换成海滩”等）。\n\n> **提示**: 可通过 `--load` 参数自定义加载的工具及其所在的设备，具体工具名称请参考项目文档 `docs\u002Ftools.md`。","一位电商运营专员正在处理大量新品上架图片，需要快速完成物体检测、背景移除及风格统一等复杂编辑任务。\n\n### 没有 GPT4Tools 时\n- **工具切换繁琐**：用户需在检测模型、分割工具和修图软件间反复跳转，无法在一个界面完成连贯操作。\n- **技术门槛高**：非技术人员难以判断何时调用何种视觉模型（如关键点检测或语义分割），常因选错工具导致返工。\n- **交互效率低下**：无法通过自然语言直接指令图片处理，必须手动调整参数或绘制掩码，耗时且易出错。\n- **流程断裂**：多步骤任务（如“先找出商品再换背景”）需人工串联，缺乏自动化决策能力，严重拖慢上架速度。\n\n### 使用 GPT4Tools 后\n- **一站式智能调度**：GPT4Tools 自动分析对话意图，无缝调用底层视觉大模型，用户在单一对话框即可完成全流程。\n- **零代码自然交互**：只需输入“把这件衣服的背景换成海滩并标记出纽扣位置”，系统即自动决策并执行检测与编辑。\n- **自适应任务规划**：面对复杂指令，GPT4Tools 能自主拆解步骤（先检测后分割再生成），无需用户干预中间过程。\n- **低成本定制扩展**：团队可利用自指令数据微调专属模型，让 GPT4Tools 快速适应特定品类的特殊修图需求。\n\nGPT4Tools 通过将自然语言理解与视觉模型控制深度融合，让非专业用户也能像专家一样高效驾驭复杂的图像工作流。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAILab-CVC_GPT4Tools_38a71450.png","AILab-CVC","TencentAILab-CVC","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FAILab-CVC_f4830cd5.png","Tencent AI Lab - Computer Vision Center",null,"https:\u002F\u002Fgithub.com\u002FAILab-CVC",[80,84,88],{"name":81,"color":82,"percentage":83},"Python","#3572A5",88,{"name":85,"color":86,"percentage":87},"Jupyter Notebook","#DA5B0B",11,{"name":89,"color":90,"percentage":91},"Shell","#89e051",1.1,771,57,"2026-04-02T21:40:16","NOASSERTION","Linux","必需。支持多 GPU 并行（示例中展示了 1 卡或 4 卡配置）。需 NVIDIA GPU 以运行视觉基础模型（如 Stable Diffusion, ControlNet, SAM 等）和 Vicuna LLM。显存需求取决于加载的模型数量：单卡运行部分工具建议 8GB+，全量运行或多卡分布式部署推荐 24GB+ (如 A10\u002FA100\u002F3090\u002F4090)。CUDA 版本需与 PyTorch 版本兼容（通常要求 CUDA 11.7+ 或 12.1+）。","未说明（建议 32GB+ 以处理大型视觉模型和多模态数据）",{"notes":100,"python":101,"dependencies":102},"1. 本项目基于 Vicuna (LLaMA)，需自行下载 Vicuna-7b-v1.5 或 13b-v1.5 基座模型权重，并合并提供的 LoRA 权重使用。\n2. 系统集成了 22 种视觉工具（如 SAM, GroundingDINO, ControlNet, Stable Diffusion 系列），首次运行时会自动下载这些模型的权重，需预留充足磁盘空间（预计数十 GB）。\n3. 可通过设置环境变量 TRANSFORMERS_CACHE 和 HUGGINGFACE_HUB_CACHE 自定义模型缓存路径。\n4. 支持通过命令行参数 --load 灵活指定加载哪些工具及其运行的 GPU 设备编号，实现多卡负载均衡。\n5. 训练部分依赖 DeepSpeed，需配置相应的 JSON 配置文件（如 zero2.json）。","未说明（通常要求 Python 3.8+ 以适配 PyTorch 2.0+ 和 Transformers）",[103,104,105,106,107,108,109,110,111,112],"torch","transformers","diffusers","accelerate","deepspeed","gradio","peft","bitsandbytes","sentencepiece","protobuf",[35,15,13,114],"其他","2026-03-27T02:49:30.150509","2026-04-08T10:01:13.242957",[118,123],{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},24120,"数据集中的上下文样本（context samples）是如何生成的？是使用 GPT-3.5 还是手动规则？","上下文样本的生成涉及将图像路径视为伪参数（pseudo argument）。如果在演示中需要特定行为（例如在多轮对话中不希望用上一轮的输出图像路径更新输入图像路径），可以固定图像路径或尝试自定义逻辑来实现目标，具体可参考 generate_annotation.py 中的相关函数逻辑。","https:\u002F\u002Fgithub.com\u002FAILab-CVC\u002FGPT4Tools\u002Fissues\u002F26",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},24121,"数据集中使用的图片和描述（captions）来自哪里？","图片主要来自 COCO 数据集。对于每个图像的 5 个描述，项目使用了全部 5 个描述，而不是随机选择一个。此外，用户也可以使用 llava-instruction 数据集来生成更密集的描述（dense captions）。","https:\u002F\u002Fgithub.com\u002FAILab-CVC\u002FGPT4Tools\u002Fissues\u002F25",[]]