[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-OmniSVG--OmniSVG":3,"tool-OmniSVG--OmniSVG":62},[4,18,26,35,44,53],{"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},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108111,2,"2026-04-08T11:23:26",[14,15,13],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":10,"last_commit_at":41,"category_tags":42,"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",[43,15,13,14],"语言模型",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"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,52],"视频",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":59,"last_commit_at":60,"category_tags":61,"status":17},5646,"opencv","opencv\u002Fopencv","OpenCV 是一个功能强大的开源计算机视觉库，被誉为机器视觉领域的“瑞士军刀”。它主要解决让计算机“看懂”图像和视频的核心难题，提供了从基础的图像读取、色彩转换、边缘检测，到复杂的人脸识别、物体追踪、3D 重建及深度学习模型部署等全方位算法支持。无论是处理静态图片还是分析实时视频流，OpenCV 都能高效完成特征提取与模式识别任务。\n\n这款工具特别适合计算机视觉开发者、人工智能研究人员以及机器人工程师使用。对于希望将视觉感知能力集成到应用中的软件工程师，或是需要快速验证算法原型的学术研究者，OpenCV 都是不可或缺的基础设施。虽然普通用户通常不会直接操作代码，但日常生活中使用的扫码支付、美颜相机和自动驾驶系统，背后往往都有它的身影。\n\nOpenCV 的独特亮点在于其卓越的性能与广泛的兼容性。它采用 C++ 编写以确保高速运算，同时提供 Python、Java 等多种语言接口，极大降低了开发门槛。库中内置了数千种优化算法，并支持跨平台运行，能够无缝对接各类硬件加速器。作为社区驱动的项目，OpenCV 拥有活跃的生态系统和丰富的学习资源，持续推动着视觉技术的前沿发展。",86988,1,"2026-04-08T16:06:22",[14,15],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":65,"owner_name":73,"owner_avatar_url":74,"owner_bio":73,"owner_company":73,"owner_location":73,"owner_email":73,"owner_twitter":73,"owner_website":73,"owner_url":75,"languages":76,"stars":85,"forks":86,"last_commit_at":87,"license":88,"difficulty_score":10,"env_os":89,"env_gpu":90,"env_ram":91,"env_deps":92,"category_tags":101,"github_topics":73,"view_count":32,"oss_zip_url":73,"oss_zip_packed_at":73,"status":17,"created_at":103,"updated_at":104,"faqs":105,"releases":136},5863,"OmniSVG\u002FOmniSVG","OmniSVG","[NeurIPS 2025] OmniSVG is the first family of end-to-end multimodal SVG generators that leverage pre-trained Vision-Language Models (VLMs), capable of generating complex and detailed SVGs, from simple icons to intricate anime characters.","OmniSVG 是首个端到端的多模态可缩放矢量图形（SVG）生成模型系列，能够根据文本描述或图像参考，直接生成从简约图标到复杂动漫角色等各种精细的 SVG 文件。它有效解决了传统 AI 绘图工具多仅能生成位图、难以编辑且放大易失真的痛点，让创作者能直接获得无限缩放不失真、便于后续编辑修改的矢量素材。\n\n这款工具非常适合设计师、插画师、前端开发者以及 AI 研究人员使用。设计师可利用它快速产出高质量矢量图标和插图素材；开发者能将其集成到工作流中自动化生成界面资源；研究人员则可基于其开源的代码、数据集（如 MMSVG）及评测基准（MMSVGBench）进行深入探索。\n\nOmniSVG 的核心技术亮点在于创新性地利用了预训练的视觉 - 语言大模型（VLMs），实现了真正的端到端生成。它不仅支持复杂的细节刻画，还发布了包括 4B 和 8B 参数量的多个模型版本，并提供了完善的训练代码与 Hugging Face 在线演示，极大地降低了矢量图形生成的门槛，推动了多模态内容创作的发展。","\u003C!-- \u003Cdiv align= \"center\">\n    \u003Ch1> Official repo for OmniSVG\u003C\u002Fh1>\n\n\u003C\u002Fdiv> -->\n\n\u003Ch3 align=\"center\">\u003Cstrong>OmniSVG: A Unified Scalable Vector Graphics Generation Model\u003C\u002Fstrong>\u003C\u002Fh3>\n\n\n\u003Cdiv align=\"center\">\n\u003Ca href='https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.06263'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2504.06263-b31b1b.svg'>\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n \u003Ca href='https:\u002F\u002Fomnisvg.github.io\u002F'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-Page-Green'>\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_8B\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Weights-HF-orange\">\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FOmniSVG\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Dataset%20-HF-orange\">\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVGBench\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Bench-HF-orange\">\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FOmniSVG\u002FOmniSVG-3B\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Demo%20-HF-orange\">\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href='https:\u002F\u002Fgithub.com\u002FOpenVGLab\u002FOmniSVG-train'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTraining-Code-blue?logo=github'>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## 🔥🔥🔥 News !!\n- [2026\u002F03\u002F02] 🔥 We have released the first Lottie generation model -- **OmniLottie**, checkout [OpenVGLab\u002FOmniLottie](https:\u002F\u002Fgithub.com\u002FOpenVGLab\u002FOmniLottie)\n- [2025\u002F12\u002F31] 👋 We have released the training code of OmniSVG， Check out [OpenVGLab\u002FOmniSVG-Train](https:\u002F\u002Fgithub.com\u002FOpenVGLab\u002FOmniSVG-train)\n- [2025\u002F12\u002F22] We have updated **MMSVG-Icon** (264K→904K) and **MMSVG-Illustration** (66K→255K) datasets with enhanced captions and PNG previews! Check out [MMSVG-Icon](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVG-Icon) and [MMSVG-Illustration](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVG-Illustration).\n- [2025\u002F12\u002F02] We have released the **OmniSVG1.1_8B** weights and updated **OmniSVG1.1_4B** model weights! Check out [OmniSVG1.1_8B](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_8B) and [OmniSVG1.1_4B](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_4B).\n- [2025\u002F12\u002F02] We have released **MMSVGBench** benchmark dataset and evaluation code! Check out [MMSVGBench](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVGBench) and [Evaluation](https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG?tab=readme-ov-file#5-evaluation).\n- [2025\u002F09\u002F18] OmniSVG is accepted to **NeurIPS 2025**🔥! See you in San Diego!\n- [2025\u002F07\u002F22] 👋 We have released the Huggingface Demo. 🤗[Demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FOmniSVG\u002FOmniSVG-3B).\n- [2025\u002F07\u002F22] 👋 We have released the inference code and model weight of MMSVG-Icon and MMSVG-Illustration dataset. 🤗[Weight](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG).\n- [2025\u002F04\u002F09] 👋 Release MMSVG-Icon and MMSVG-Illustration 🤗[Dataset](https:\u002F\u002Fhuggingface.co\u002FOmniSVG).\n- [2025\u002F04\u002F09] 👋 Upload paper and init project. [Read](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.06263)\n\n\n\u003Cp align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_readme_06769744e8c1.gif\" alt=\"Demo GIF\" width=\"720px\" \u002F>\n\u003C\u002Fp>\n\n## 🧩 Community Contributions\nIf you are developing \u002F using OmniSVG in your projects, or you want to contribute to OmniSVG, please let us know 🎉.\n\n- If you find data issues when using MMSVG dataset, please drop an issue in this [form](https:\u002F\u002Fnpqawhh9ht.feishu.cn\u002Fwiki\u002FKHv2wDqAxiSV8skpkANcbmlwnqc?from=from_copylink).\n- 👋 OmniSVG ComfyUI Plugin by [@smthemex](https:\u002F\u002Fgithub.com\u002Fsmthemex) [ComfyUI_OmniSVG](https:\u002F\u002Fgithub.com\u002Fsmthemex\u002FComfyUI_OmniSVG).\n\n## 📑 Open-source Plan\n- [x] Project Page & Technical Report\n- [x] MMSVG-Icon and MMSVG-Illustration Dataset Release\n- [x] Inference Code & Model Weight of MMSVG-Icon and MMSVG-Illustration Dataset\n- [x] Online Demo (Gradio deployed on Huggingface)\n- [x] Model Weight of OmniSVG1.1_8B Release\n- [x] Model Weight of OmniSVG1.1_4B Release\n- [x] MMSVGBench Benchmark & Evaluation Code Release\n\n\n\n## 1. Introduction\n\n**OmniSVG** is the first family of end-to-end multimodal SVG generators that leverage pre-trained Vision-Language Models (VLMs), capable of generating complex and detailed SVGs, from simple icons to intricate anime characters. We also introduce MMSVG-2M, a multimodal dataset with two million richly annotated SVG assets, along with a standardized evaluation protocol for conditional SVG generation tasks. \n\n\n## 2. Models Downloading\n| Model                       | Download link                   | Size       | Update date |                                                                                     \n|-----------------------------|-------------------------------|------------|------|\n| OmniSVG1.1_8B | [Huggingface](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_8B)    | 17.2 GB | 2025-12-02  |\n| OmniSVG1.1_4B | [Huggingface](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_4B)    | 7.69 GB | 2025-12-02  |\n| OmniSVG-3B | [Huggingface](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG)    | 8.49 GB | 2025-07-22  | \n\n\n\n##  3. Dependencies and Installation\nThe dependencies configured according to the following instructions provide an environment equipped for inference\n\n### 3.1 Clone the Repository\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG.git\ncd OmniSVG\n```\n\n### 3.2 Create Conda Environment\nCreate and activate a new conda environment with Python 3.10:\n```bash\nconda create -n omnisvg python=3.10\nconda activate omnisvg\n```\n\n### 3.3 Install Dependencies\n\n#### System Dependencies\nBefore installing Python packages, you need to install Cairo library which is required by `CairoSVG` in our dependencies:\n\n**macOS:**\n```bash\nbrew install cairo\n```\n\n**Linux (Ubuntu\u002FDebian):**\n```bash\nsudo apt update\nsudo apt install libcairo2 libcairo2-dev\n```\n\n> **Note:** Installing Cairo system library beforehand helps prevent potential build errors when installing `CairoSVG` via pip.\n\n#### Python Dependencies\nWe have tested our environment with CUDA 12.1. You can install CUDA 12.1 by following the [CUDA Toolkit installation guide](https:\u002F\u002Fdeveloper.nvidia.com\u002Fcuda-12-1-0-download-archive).\n\nInstall PyTorch with CUDA 12.1 support:\n```bash\npip install torch==2.3.0+cu121 torchvision==0.18.0+cu121 --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu121\n```\n\nInstall remaining dependencies:\n```bash\npip install -r requirements.txt\n```\n\n## 4. Inference Script\n\n|                                                  | GPU Memory Usage | Time per 256\u002F512\u002F1024\u002F2048\u002F4096 tokens |\n| ------------------------------------------------ | ---------------- | ----------------- |\n| OmniSVG1.1_8B     | 26G              | 5.38\u002F9.02\u002F20.11\u002F40.34\u002F98.11 seconds       |\n| OmniSVG1.1_4B     | 17G              | 4.08\u002F8.68\u002F18.07\u002F37.51\u002F82.70 seconds       |\n| OmniSVG-3B     | 17G              | 4.08\u002F8.68\u002F18.07\u002F37.51\u002F82.70 seconds       |\n\n\n\u003Cfont color=\"red\">**Note: The inference time shown here is measured per OmniSVG SVG tokens, while the inference time reported in our paper is measured per XML code tokens for fair comparison with baseline methods.**\u003C\u002Ffont> \n\n### Quick Start\n\n**Download Model Weights**\n\nFirst, install the Hugging Face CLI tool:\n```bash\npip install huggingface-hub\n```\n\n**Download the model from Hugging Face:**\n```bash\n# Download OmniSVG1.1-8B\nhuggingface-cli download OmniSVG\u002FOmniSVG1.1_8B --local-dir \u002FPATH\u002FTO\u002FOmniSVG1.1_8B\n\n# Download OmniSVG1.1-4B\nhuggingface-cli download OmniSVG\u002FOmniSVG1.1_4B --local-dir \u002FPATH\u002FTO\u002FOmniSVG1.1_4B\n\n# Download OmniSVG-3B (legacy)\nhuggingface-cli download OmniSVG\u002FOmniSVG --local-dir \u002FPATH\u002FTO\u002FOmniSVG-3B\n```\n\n### Text-to-SVG Generation\n\n**Basic usage - Generate SVG from txt file:**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text --save-all-candidates\n```\n\n**Use 4B model:**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text --model-size 4B --save-all-candidates\n```\n\n**Generate more candidates and save PNG:**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --num-candidates 8 --save-png --save-all-candidates\n```\n\n**Custom generation parameters:**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --temperature 0.5 --top-p 0.9 --top-k 50 --repetition-penalty 1.05\n```\n\n**Use local model:**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --model-path \u002Fpath\u002Fto\u002Fqwen --weight-path \u002Fpath\u002Fto\u002Fomnisvg\n```\n\n### Image-to-SVG Generation\n\n```bash\npython inference.py --task image-to-svg --input .\u002Fexamples --output .\u002Foutput_image --save-all-candidates\n```\n\n### Interactive Demo\n\nWe provide an interactive generation interface using Gradio:\n\n- **Local Deployment**\n  ```bash\n  python app.py\n  ```\n\n- **Online Demo**\n  \n  Try our live demo on [Hugging Face Spaces](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FOmniSVG\u002FOmniSVG-3B)\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_readme_82c030877389.png\" alt=\"cmd\" height=\"256px\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_readme_a6c601a42f02.gif\" alt=\"Demo GIF\" height=\"256px\" style=\"margin-right: 10px;\" \u002F>\n\u003C\u002Fdiv>\n\n\n\n## 5. Evaluation\n\nWe provide **MMSVGBench** for standardized evaluation of SVG generation models.\n\n**Download MMSVGBench:**\n```bash\nhuggingface-cli download OmniSVG\u002FMMSVGBench --repo-type dataset --local-dir \u002FPATH\u002FTO\u002FMMSVGBench\n```\n\n### Benchmark Overview\n\nMMSVGBench is a **purely synthetic benchmark** where all prompts and images are generated using GPT models, ensuring the data is **unseen** during model training for fair generalization evaluation. The generation procedure MMSVGBench's prompt is logged, for example the [text2svg prompt log](https:\u002F\u002Fchatgpt.com\u002Fshare\u002F68f773e9-2814-8002-99ed-5e2980e9b9bf). \n\n| Task | Complexity Level | Samples | Description |\n|------|------------------|---------|-------------|\n| Text-to-SVG | Icon | 150 | Simple icons (1-2 elements) |\n| Text-to-SVG | Illustration | 150 | Complex illustrations (1-3 interacting elements) |\n| Image-to-SVG | Icon | 150 | GPT-4o generated icon images |\n| Image-to-SVG | Illustration | 150 | GPT-4o generated illustration images |\n\n**Key Advantages of Synthetic Design:**\n- ✅ **True generalization test** — models cannot have seen these samples during training\n- ✅ **Controlled diversity** — systematic coverage of styles and semantic categories  \n- ✅ **Fairness** — no model has unfair advantage from training data overlap\n\nThe evaluation code is available in the `metrics` directory. For more details about MMSVGBench construction and evaluation metrics, please check [MMSVGBench](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVGBench\u002Fblob\u002Fmain\u002FREADME.md).\n\n\n\n## 6. License\nOmniSVG is licensed under the [**Apache License 2.0**](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0), while MMSVG dataset is under [**Creative Commons Attribution Non Commercial Share Alike 4.0 License**](https:\u002F\u002Fspdx.org\u002Flicenses\u002FCC-BY-NC-SA-4.0). You can find the license files in the respective github and HuggingFace repositories.\n\n\n\n## Citation\n\n```bibtex\n@article{yang2025omnisvg,\n  title={OmniSVG: A Unified Scalable Vector Graphics Generation Model}, \n  author={Yiying Yang and Wei Cheng and Sijin Chen and Xianfang Zeng and Jiaxu Zhang and Liao Wang and Gang Yu and Xinjun Ma and Yu-Gang Jiang},\n  journal={arXiv preprint arxiv:2504.06263},\n  year={2025}\n}\n```\n\n## Acknowledgments\nWe thank the following excellent open-source works:\n\n[IconShop](https:\u002F\u002Ficon-shop.github.io\u002F): is the first advanced work that leverages LLMs to generate monochrome, icon-level SVGs. We referred to its parametric implementation.\n\nHere is the list of highly related concurrent works:\n\n[LLM4SVG](https:\u002F\u002Farxiv.org\u002Fabs\u002F2412.11102): treats SVG coordinates as number strings and predicts decimal part for higher spatial accuracy.\n\n[StarVector](https:\u002F\u002Fstarvector.github.io\u002F): equips LLM with an image encoder for Image-to-SVG generation.\n\n## Star History\n\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_readme_b5fcdf276305.png)](https:\u002F\u002Fwww.star-history.com\u002F#OmniSVG\u002FOmniSVG&Date)\n\n","\u003C!-- \u003Cdiv align= \"center\">\n    \u003Ch1> OmniSVG 官方仓库\u003C\u002Fh1>\n\n\u003C\u002Fdiv> -->\n\n\u003Ch3 align=\"center\">\u003Cstrong>OmniSVG：统一的可缩放矢量图形生成模型\u003C\u002Fstrong>\u003C\u002Fh3>\n\n\n\u003Cdiv align=\"center\">\n\u003Ca href='https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.06263'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2504.06263-b31b1b.svg'>\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n \u003Ca href='https:\u002F\u002Fomnisvg.github.io\u002F'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-Page-Green'>\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_8B\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Weights-HF-orange\">\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FOmniSVG\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Dataset%20-HF-orange\">\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVGBench\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Bench-HF-orange\">\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FOmniSVG\u002FOmniSVG-3B\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Demo%20-HF-orange\">\u003C\u002Fa> &nbsp;&nbsp;&nbsp;&nbsp;\n\u003Ca href='https:\u002F\u002Fgithub.com\u002FOpenVGLab\u002FOmniSVG-train'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTraining-Code-blue?logo=github'>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## 🔥🔥🔥 最新消息！！\n- [2026\u002F03\u002F02] 🔥 我们发布了首个 Lottie 动画生成模型——**OmniLottie**，详情请见 [OpenVGLab\u002FOmniLottie](https:\u002F\u002Fgithub.com\u002FOpenVGLab\u002FOmniLottie)\n- [2025\u002F12\u002F31] 👋 我们已发布 OmniSVG 的训练代码，请查看 [OpenVGLab\u002FOmniSVG-Train](https:\u002F\u002Fgithub.com\u002FOpenVGLab\u002FOmniSVG-train)\n- [2025\u002F12\u002F22] 我们更新了 **MMSVG-Icon**（26.4万→90.4万）和 **MMSVG-Illustration**（6.6万→25.5万）数据集，增加了更丰富的描述和 PNG 预览图！详情请见 [MMSVG-Icon](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVG-Icon) 和 [MMSVG-Illustration](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVG-Illustration)。\n- [2025\u002F12\u002F02] 我们发布了 **OmniSVG1.1_8B** 模型权重，并更新了 **OmniSVG1.1_4B** 模型权重！详情请见 [OmniSVG1.1_8B](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_8B) 和 [OmniSVG1.1_4B](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_4B)。\n- [2025\u002F12\u002F02] 我们发布了 **MMSVGBench** 基准数据集及评估代码！详情请见 [MMSVGBench](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVGBench) 和 [评估](https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG?tab=readme-ov-file#5-evaluation)。\n- [2025\u002F09\u002F18] OmniSVG 被 **NeurIPS 2025** 接收啦🔥！圣地亚哥见！\n- [2025\u002F07\u002F22] 👋 我们发布了 Huggingface 演示。🤗[演示](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FOmniSVG\u002FOmniSVG-3B)。\n- [2025\u002F07\u002F22] 👋 我们发布了 MMSVG-Icon 和 MMSVG-Illustration 数据集的推理代码及模型权重。🤗[权重](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG)。\n- [2025\u002F04\u002F09] 👋 发布了 MMSVG-Icon 和 MMSVG-Illustration 数据集。🤗[数据集](https:\u002F\u002Fhuggingface.co\u002FOmniSVG)。\n- [2025\u002F04\u002F09] 👋 上传论文并启动项目。[阅读](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.06263)\n\n\n\u003Cp align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_readme_06769744e8c1.gif\" alt=\"Demo GIF\" width=\"720px\" \u002F>\n\u003C\u002Fp>\n\n## 🧩 社区贡献\n如果您正在项目中开发或使用 OmniSVG，或者希望为 OmniSVG 做出贡献，请随时告知我们🎉。\n\n- 如果您在使用 MMSVG 数据集时发现任何问题，请通过此 [表格](https:\u002F\u002Fnpqawhh9ht.feishu.cn\u002Fwiki\u002FKHv2wDqAxiSV8skpkANcbmlwnqc?from=from_copylink) 提交反馈。\n- 👋 [@smthemex](https:\u002F\u002Fgithub.com\u002Fsmthemex) 开发的 OmniSVG ComfyUI 插件 [ComfyUI_OmniSVG](https:\u002F\u002Fgithub.com\u002Fsmthemex\u002FComfyUI_OmniSVG)。\n\n## 📑 开源计划\n- [x] 项目主页与技术报告\n- [x] MMSVG-Icon 和 MMSVG-Illustration 数据集发布\n- [x] MMSVG-Icon 和 MMSVG-Illustration 数据集的推理代码及模型权重\n- [x] 在线演示（基于 Gradio 的 Huggingface 空间）\n- [x] OmniSVG1.1_8B 模型权重发布\n- [x] OmniSVG1.1_4B 模型权重发布\n- [x] MMSVGBench 基准测试与评估代码发布\n\n\n\n## 1. 引言\n\n**OmniSVG** 是首个端到端多模态 SVG 生成器系列，它利用预训练的视觉-语言模型（VLM），能够生成复杂而精细的 SVG 图形，从简单的图标到精美的动漫角色皆可胜任。同时，我们还推出了 MMSVG-2M 多模态数据集，包含两百万个标注丰富的 SVG 资源，并制定了一套标准化的条件式 SVG 生成任务评估协议。\n\n\n## 2. 模型下载\n| 模型                       | 下载链接                   | 大小       | 更新日期 |                                                                                     \n|-----------------------------|-------------------------------|------------|------|\n| OmniSVG1.1_8B | [Huggingface](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_8B)    | 17.2 GB | 2025-12-02  |\n| OmniSVG1.1_4B | [Huggingface](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG1.1_4B)    | 7.69 GB | 2025-12-02  |\n| OmniSVG-3B | [Huggingface](https:\u002F\u002Fhuggingface.co\u002FOmniSVG\u002FOmniSVG)    | 8.49 GB | 2025-07-22  | \n\n\n\n##  3. 依赖与安装\n按照以下说明配置的依赖项将为您提供一个适合推理的环境。\n\n### 3.1 克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG.git\ncd OmniSVG\n```\n\n### 3.2 创建 Conda 环境\n创建并激活一个使用 Python 3.10 的新 Conda 环境：\n```bash\nconda create -n omnisvg python=3.10\nconda activate omnisvg\n```\n\n### 3.3 安装依赖\n\n#### 系统依赖\n在安装 Python 包之前，您需要先安装 `CairoSVG` 所需的 Cairo 库：\n\n**macOS:**\n```bash\nbrew install cairo\n```\n\n**Linux（Ubuntu\u002FDebian）:**\n```bash\nsudo apt update\nsudo apt install libcairo2 libcairo2-dev\n```\n\n> **提示:** 提前安装 Cairo 系统库有助于避免在通过 pip 安装 `CairoSVG` 时可能出现的构建错误。\n\n#### Python 依赖\n我们已在 CUDA 12.1 环境下测试过我们的运行环境。您可以按照 [CUDA Toolkit 安装指南](https:\u002F\u002Fdeveloper.nvidia.com\u002Fcuda-12-1-0-download-archive) 安装 CUDA 12.1。\n\n安装支持 CUDA 12.1 的 PyTorch：\n```bash\npip install torch==2.3.0+cu121 torchvision==0.18.0+cu121 --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu121\n```\n\n安装其余依赖：\n```bash\npip install -r requirements.txt\n```\n\n## 4. 推理脚本\n\n|                                                  | GPU 内存占用 | 每 256\u002F512\u002F1024\u002F2048\u002F4096 个 token 的耗时 |\n| ------------------------------------------------ | ---------------- | ----------------- |\n| OmniSVG1.1_8B     | 26G              | 5.38\u002F9.02\u002F20.11\u002F40.34\u002F98.11 秒       |\n| OmniSVG1.1_4B     | 17G              | 4.08\u002F8.68\u002F18.07\u002F37.51\u002F82.70 秒       |\n| OmniSVG-3B     | 17G              | 4.08\u002F8.68\u002F18.07\u002F37.51\u002F82.70 秒       |\n\n\n\u003Cfont color=\"red\">**注意：此处显示的推理时间是基于 OmniSVG SVG tokens 计算的，而我们在论文中报告的推理时间则是基于 XML 代码 tokens 计算的，以便与基线方法进行公平比较。**\u003C\u002Ffont>\n\n### 快速入门\n\n**下载模型权重**\n\n首先，安装 Hugging Face CLI 工具：\n```bash\npip install huggingface-hub\n```\n\n**从 Hugging Face 下载模型：**\n```bash\n# 下载 OmniSVG1.1-8B\nhuggingface-cli download OmniSVG\u002FOmniSVG1.1_8B --local-dir \u002FPATH\u002FTO\u002FOmniSVG1.1_8B\n\n# 下载 OmniSVG1.1-4B\nhuggingface-cli download OmniSVG\u002FOmniSVG1.1_4B --local-dir \u002FPATH\u002FTO\u002FOmniSVG1.1_4B\n\n# 下载 OmniSVG-3B（旧版）\nhuggingface-cli download OmniSVG\u002FOmniSVG --local-dir \u002FPATH\u002FTO\u002FOmniSVG-3B\n```\n\n### 文本到 SVG 生成\n\n**基本用法 - 从文本文件生成 SVG：**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text --save-all-candidates\n```\n\n**使用 4B 模型：**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text --model-size 4B --save-all-candidates\n```\n\n**生成更多候选并保存 PNG：**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --num-candidates 8 --save-png --save-all-candidates\n```\n\n**自定义生成参数：**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --temperature 0.5 --top-p 0.9 --top-k 50 --repetition-penalty 1.05\n```\n\n**使用本地模型：**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --model-path \u002Fpath\u002Fto\u002Fqwen --weight-path \u002Fpath\u002Fto\u002Fomnisvg\n```\n\n### 图像到 SVG 生成\n\n```bash\npython inference.py --task image-to-svg --input .\u002Fexamples --output .\u002Foutput_image --save-all-candidates\n```\n\n### 交互式演示\n\n我们提供了基于 Gradio 的交互式生成界面：\n\n- **本地部署**\n  ```bash\n  python app.py\n  ```\n\n- **在线演示**\n  \n  请在 [Hugging Face Spaces](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FOmniSVG\u002FOmniSVG-3B) 上体验我们的实时演示。\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_readme_82c030877389.png\" alt=\"cmd\" height=\"256px\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_readme_a6c601a42f02.gif\" alt=\"Demo GIF\" height=\"256px\" style=\"margin-right: 10px;\" \u002F>\n\u003C\u002Fdiv>\n\n\n\n## 5. 评估\n\n我们提供了 **MMSVGBench**，用于对 SVG 生成模型进行标准化评估。\n\n**下载 MMSVGBench：**\n```bash\nhuggingface-cli download OmniSVG\u002FMMSVGBench --repo-type dataset --local-dir \u002FPATH\u002FTO\u002FMMSVGBench\n```\n\n### 基准概述\n\nMMSVGBench 是一个 **纯合成基准**，其中所有提示和图像均使用 GPT 模型生成，确保数据在模型训练期间 **未被见过**，从而实现公平的泛化能力评估。MMSVGBench 的生成过程会记录提示信息，例如 [text2svg 提示日志](https:\u002F\u002Fchatgpt.com\u002Fshare\u002F68f773e9-2814-8002-99ed-5e2980e9b9bf)。\n\n| 任务 | 复杂度级别 | 样本数 | 描述 |\n|------|------------------|---------|-------------|\n| 文本到 SVG | 图标 | 150 | 简单图标（1-2 个元素） |\n| 文本到 SVG | 描绘图 | 150 | 复杂描绘图（1-3 个相互作用的元素） |\n| 图像到 SVG | 图标 | 150 | GPT-4o 生成的图标图像 |\n| 图像到 SVG | 描绘图 | 150 | GPT-4o 生成的描绘图图像 |\n\n**合成设计的关键优势：**\n- ✅ **真正的泛化测试** — 模型在训练过程中不可能见过这些样本\n- ✅ **可控的多样性** — 系统性地覆盖多种风格和语义类别\n- ✅ **公平性** — 不存在因训练数据重叠而导致的不公平优势\n\n评估代码位于 `metrics` 目录中。有关 MMSVGBench 构建及评估指标的更多详细信息，请参阅 [MMSVGBench](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FOmniSVG\u002FMMSVGBench\u002Fblob\u002Fmain\u002FREADME.md)。\n\n\n\n## 6. 许可证\nOmniSVG 采用 **Apache License 2.0** 许可证，而 MMSVG 数据集则采用 **Creative Commons Attribution Non Commercial Share Alike 4.0 License**。许可证文件可在相应的 GitHub 和 Hugging Face 仓库中找到。\n\n\n\n## 引用\n```bibtex\n@article{yang2025omnisvg,\n  title={OmniSVG: 一种统一的可扩展矢量图形生成模型}, \n  author={Yiying Yang 和 Wei Cheng 和 Sijin Chen 和 Xianfang Zeng 和 Jiaxu Zhang 和 Liao Wang 和 Gang Yu 和 Xinjun Ma 和 Yu-Gang Jiang},\n  journal={arXiv 预印本 arxiv:2504.06263},\n  year={2025}\n}\n```\n\n## 致谢\n我们感谢以下优秀的开源项目：\n\n[IconShop](https:\u002F\u002Ficon-shop.github.io\u002F)：是首个利用大语言模型生成单色图标级 SVG 的先进工作。我们参考了其参数化实现。\n\n以下是高度相关的同期研究：\n\n[LLM4SVG](https:\u002F\u002Farxiv.org\u002Fabs\u002F2412.11102)：将 SVG 坐标视为数字字符串，并预测小数部分以提高空间精度。\n\n[StarVector](https:\u002F\u002Fstarvector.github.io\u002F)：为大语言模型配备了图像编码器，用于图像到 SVG 的生成。\n\n## 星标历史\n\n\n[![星标历史图表](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_readme_b5fcdf276305.png)](https:\u002F\u002Fwww.star-history.com\u002F#OmniSVG\u002FOmniSVG&Date)","# OmniSVG 快速上手指南\n\nOmniSVG 是一个统一的端到端多模量可缩放矢量图形（SVG）生成模型，能够根据文本描述或参考图像生成从简单图标到复杂动漫角色的 SVG 文件。\n\n## 1. 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux (Ubuntu\u002FDebian) 或 macOS\n*   **Python 版本**: 3.10\n*   **GPU**: 推荐 NVIDIA GPU (显存需求见下文)，支持 CUDA 12.1\n*   **系统依赖**: 必须预先安装 `Cairo` 库，否则 `CairoSVG` 包安装会失败。\n\n**安装系统依赖命令：**\n\n*   **macOS:**\n    ```bash\n    brew install cairo\n    ```\n*   **Linux (Ubuntu\u002FDebian):**\n    ```bash\n    sudo apt update\n    sudo apt install libcairo2 libcairo2-dev\n    ```\n\n> **注意**: 请务必在安装 Python 包之前完成上述系统库的安装。\n\n## 2. 安装步骤\n\n### 2.1 克隆项目\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG.git\ncd OmniSVG\n```\n\n### 2.2 创建并激活 Conda 环境\n```bash\nconda create -n omnisvg python=3.10\nconda activate omnisvg\n```\n\n### 2.3 安装 PyTorch (CUDA 12.1)\n官方测试环境为 CUDA 12.1。如果您需要国内加速，可尝试使用清华源或其他镜像源替换索引地址。\n\n**官方源安装：**\n```bash\npip install torch==2.3.0+cu121 torchvision==0.18.0+cu121 --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu121\n```\n\n**国内加速示例 (清华源)：**\n```bash\npip install torch==2.3.0+cu121 torchvision==0.18.0+cu121 --index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\u002Fcu121\n```\n*(注：如果镜像源无特定 CUDA 版本 wheel 包，请回退到官方源或手动下载对应 whl 文件安装)*\n\n### 2.4 安装其他依赖\n```bash\npip install -r requirements.txt\n```\n*(建议同时配置 pip 国内镜像以加快下载速度，例如：`pip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`)*\n\n### 2.5 下载模型权重\n使用 Hugging Face CLI 下载模型。国内用户若无法直接连接 HF，建议使用镜像站（如 `hf-mirror.com`）或手动下载后放入本地目录。\n\n**设置镜像环境变量 (可选，针对国内网络优化):**\n```bash\nexport HF_ENDPOINT=https:\u002F\u002Fhf-mirror.com\n```\n\n**下载模型 (以 4B 版本为例，显存需求约 17GB):**\n```bash\nhuggingface-cli download OmniSVG\u002FOmniSVG1.1_4B --local-dir .\u002Fmodels\u002FOmniSVG1.1_4B\n```\n\n*其他可用模型:*\n*   `OmniSVG\u002FOmniSVG1.1_8B` (需约 26GB 显存)\n*   `OmniSVG\u002FOmniSVG` (即 3B 版本，需约 17GB 显存)\n\n## 3. 基本使用\n\n### 文生图 (Text-to-SVG)\n\n准备一个包含提示词的文本文件 `prompts.txt` (每行一个提示词)，然后运行：\n\n**使用默认模型 (8B):**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text --save-all-candidates\n```\n\n**指定使用 4B 模型:**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text --model-size 4B --save-all-candidates\n```\n\n**生成多个候选方案并保存为 PNG 预览:**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --num-candidates 8 --save-png --save-all-candidates\n```\n\n**自定义生成参数 (温度、Top-P 等):**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --temperature 0.5 --top-p 0.9 --top-k 50 --repetition-penalty 1.05\n```\n\n**使用本地已下载的模型路径:**\n```bash\npython inference.py --task text-to-svg --input prompts.txt --output .\u002Foutput_text \\\n    --model-path \u002Fpath\u002Fto\u002Fqwen --weight-path \u002Fpath\u002Fto\u002Fomnisvg\n```\n\n### 图生图 (Image-to-SVG)\n\n将输入图片放在 `.\u002Fexamples` 文件夹中，运行：\n\n```bash\npython inference.py --task image-to-svg --input .\u002Fexamples --output .\u002Foutput_image --save-all-candidates\n```\n\n### 启动交互式 Demo (Gradio)\n\n在本地启动 Web 界面进行可视化操作：\n\n```bash\npython app.py\n```\n\n启动后，终端会显示本地访问地址（通常为 `http:\u002F\u002F127.0.0.1:7860`），在浏览器打开即可使用。","某独立游戏开发团队正在为一款复古风格 RPG 制作大量需要无限缩放且文件体积极小的 UI 图标与角色立绘。\n\n### 没有 OmniSVG 时\n- 设计师需手动使用 Illustrator 逐帧绘制矢量路径，从简单图标到复杂动漫角色耗时极长，严重拖慢迭代速度。\n- 若尝试用现有 AI 生成位图再转矢量，得到的 SVG 路径杂乱无章、锚点冗余，无法直接用于生产环境。\n- 难以保持美术风格统一，不同成员绘制的图标在笔触粗细和色彩风格上存在明显割裂感。\n- 修改需求响应慢，一旦策划调整角色配色或细节，几乎需要重新绘制整个矢量文件。\n\n### 使用 OmniSVG 后\n- 团队只需输入“像素风宝剑图标”或“赛博朋克女战士”等自然语言描述，OmniSVG 即可端到端生成结构清晰、细节丰富的专业级 SVG 代码。\n- 生成的矢量图形路径简洁优化，锚点分布合理，无需人工清理即可直接集成到游戏引擎中。\n- 利用预训练视觉语言模型的理解能力，OmniSVG 能精准捕捉并复现指定的艺术风格，确保全套素材高度一致。\n- 面对修改需求，开发者仅需微调提示词（如“将盔甲改为金色”），OmniSVG 能在秒级内输出更新后的完美矢量图。\n\nOmniSVG 通过将复杂的多模态理解转化为精准的矢量生成，彻底重构了从创意构思到高质量 SVG 落地的生产管线。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FOmniSVG_OmniSVG_31f7032e.png",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FOmniSVG_809d0ff6.png","https:\u002F\u002Fgithub.com\u002FOmniSVG",[77,81],{"name":78,"color":79,"percentage":80},"Python","#3572A5",98.3,{"name":82,"color":83,"percentage":84},"kvlang","#1da6e0",1.7,2450,89,"2026-04-08T05:44:32","Apache-2.0","Linux, macOS","需要 NVIDIA GPU，显存需求：OmniSVG1.1_8B 需 26GB，OmniSVG1.1_4B 和 OmniSVG-3B 需 17GB，CUDA 12.1","未说明",{"notes":93,"python":94,"dependencies":95},"安装 Python 依赖前需先安装系统级 Cairo 库（macOS 使用 brew install cairo，Linux 使用 apt install libcairo2-dev）。模型权重较大（8B 版本约 17.2GB），请确保磁盘空间充足。推理时间随生成 token 数量显著增加。","3.10",[96,97,98,99,100],"torch==2.3.0+cu121","torchvision==0.18.0+cu121","CairoSVG","huggingface-hub","gradio",[15,102],"其他","2026-03-27T02:49:30.150509","2026-04-09T20:52:37.622338",[106,111,116,121,126,131],{"id":107,"question_zh":108,"answer_zh":109,"source_url":110},26593,"模型权重和推理代码何时发布？在哪里可以下载？","模型权重已通过 Hugging Face Space 发布，访问地址为：https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FOmniSVG\u002FOmniSVG-3B。推理代码正在与 Hugging Face 集成中，旨在简化下游微调和生成任务，预计很快就会随模型权重一同完全开源，请密切关注更新。","https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG\u002Fissues\u002F14",{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},26594,"OmniSVG 是如何进行 SVG 令牌化（tokenization）的？序列顺序重要吗？","SVG 令牌化中序列顺序至关重要，目前采用自然顺序而非随机打乱，原因如下：\n1. SVG 渲染遵循严格的 Z 轴排序，后续路径会自然遮挡先前路径，随机顺序会破坏这种视觉层级。\n2. 后续的填充命令依赖于先前的路径定义，打乱顺序可能导致依赖关系断裂并生成无效的 SVG。\n3. 现有研究（如 arXiv:2007.11301）表明自然绘图顺序能带来更好的性能。\n虽然位置信息已嵌入令牌中以避免坐标幻觉，但保持正确的序列顺序对于保证 SVG 的有效性不可或缺。","https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG\u002Fissues\u002F9",{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},26595,"如何获取 Image2SVG 数据集中的原始参考图像？","项目方确认原始参考图像对于角色插图等任务至关重要。目前正准备发布一个完整的数据集，其中将包含：\n1. 原始高分辨率图像\n2. 对应的 SVG 矢量文件\n3. 文本描述\u002F标题\n具体的数据集发布时间表将很快公布。","https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG\u002Fissues\u002F4",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},26596,"在 mmsvgbench 的 compute_dino 文件中，gt_img 变量代表什么？","`gt_img` 代表**真实图像（ground truth image）**，即原始输入图像。\n具体说明：\n- DINO 指标用于计算真实图像与生成图像（由输出的 SVG 渲染而成）之间的余弦相似度。\n- 该指标仅针对**图像转 SVG（image-to-svg）**任务进行计算，目的是评估将栅格图像转换为 SVG 表示的效果。\n- 在此语境下，`gt_img` 就是我们要转换的那个输入图像。","https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG\u002Fissues\u002F42",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},26597,"数据是否进行了归一化处理？为什么输出结果都是 200x200？","是的，数据已经过归一化处理。所有原始数据都被处理为 200x200 的 viewBox。\n固定分辨率的原因包括：\n1. 使训练和模型输出更加稳定。\n2. 这是此前许多相关工作（如 MeshXL、Point Diffusion、LLaMAgen）采用的通用做法。\n项目提供的数据已默认归一化到 200x200 分辨率，用户可直接放心使用，无需额外编写归一化脚本。","https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG\u002Fissues\u002F23",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},26598,"使用提供的文本描述复现 Text-to-SVG 结果时效果不佳，原因是什么？","MMSVG 数据集中的标题（caption）风格通常比用户输入的复杂描述要简洁得多。直接使用过于复杂的描述可能导致生成效果偏离预期。\n建议尝试使用更简洁、直接的描述方式，或者参考官方基于真实标签（GT）运行的结果示例。项目方表示即将提供对文本输入更具鲁棒性的模型版本。","https:\u002F\u002Fgithub.com\u002FOmniSVG\u002FOmniSVG\u002Fissues\u002F20",[]]