[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-joanrod--star-vector":3,"tool-joanrod--star-vector":61},[4,18,26,36,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},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 真正成长为懂上",151918,2,"2026-04-12T11:33:05",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":106,"forks":107,"last_commit_at":108,"license":109,"difficulty_score":10,"env_os":110,"env_gpu":111,"env_ram":112,"env_deps":113,"category_tags":122,"github_topics":124,"view_count":32,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":129,"updated_at":130,"faqs":131,"releases":132},6935,"joanrod\u002Fstar-vector","star-vector","StarVector is a foundation model for SVG generation that transforms vectorization into a code generation task. Using a vision-language modeling architecture, StarVector processes both visual and textual inputs to produce high-quality SVG code with remarkable precision.","StarVector 是一款专为生成可缩放矢量图形（SVG）打造的基础模型，它创新地将图像矢量化任务转化为代码生成任务。借助视觉 - 语言建模架构，StarVector 能够同时理解图片内容和文字描述，直接输出高质量、高精度的 SVG 代码，实现从“图到码”或“文到码”的灵活转换。\n\n传统矢量化工具往往只关注曲线拟合，缺乏对图像语义的理解，导致生成的图形细节丢失或结构混乱。StarVector 通过多模态大模型技术，不仅还原形状，更能理解图形背后的逻辑与结构，显著减少了伪影和错误，提升了生成结果的可编辑性与实用性。\n\n这款工具非常适合设计师、前端开发者以及 AI 研究人员使用。设计师可以利用它快速将草图或位图转为可编辑的矢量素材；开发者能将其集成到工作流中，自动化生成图标或界面元素；研究人员则可基于其开源的模型（如 1B 和 8B 版本）及专用数据集（SVG-Stack、SVG-Bench），深入探索多模态代码生成的前沿方向。作为一篇获 CVPR 2025 收录的成果，StarVector 展现了 AI 在创意生产领域的巨大潜力，让矢量图形创作变得更加智能高效。","\u003Cdiv align=\"center\">\n  \u003Ch1>💫 StarVector: Generating Scalable Vector Graphics Code from Images and Text\u003C\u002Fh1>\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjoanrod_star-vector_readme_736dedabb669.png\" alt=\"starvector\" style=\"width: 800px; display: block; margin-left: auto; margin-right: auto;\"\u002F>\n\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.11556\" target=\"_blank\">\n    \u003Cimg alt=\"arXiv\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-StarVector-red?logo=arxiv\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fstarvector.github.io\u002F\" target=\"_blank\">\n    \u003Cimg alt=\"Website\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🌎_Website-starvector.github.io-blue.svg\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-1b-im2svg\" target=\"_blank\">\n    \u003Cimg alt=\"HF Models: StarVector\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Model-StarVector--1B-ffc107?color=ffc107&logoColor=white\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-8b-im2svg\" target=\"_blank\">\n    \u003Cimg alt=\"HF Models: StarVector\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Model-StarVector--8B-ffc107?color=ffc107&logoColor=white\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-stack\" target=\"_blank\">\n    \u003Cimg alt=\"HF Dataset: SVG-Stack\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Data-SVG--Stack-ffc107?color=ffc107&logoColor=white\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fstarvector\u002Fstarvector-svg-datasets-svg-bench-67811204a76475be4dd66d09\" target=\"_blank\">\n    \u003Cimg alt=\"HF Dataset: SVG-Bench\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Benchmark-SVG--Bench-ffc107?color=ffc107&logoColor=white\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\n\u003Cdiv style=\"font-family: charter;\">\n    \u003Ca href=\"https:\u002F\u002Fjoanrod.github.io\" target=\"_blank\">Juan A. Rodriguez\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fabhaypuri.github.io\u002Fportfolio\u002F\" target=\"_blank\">Abhay Puri\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fshubhamagarwal92.github.io\u002F\" target=\"_blank\">Shubham Agarwal\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.ca\u002Fcitations?user=8vRS7F0AAAAJ&hl=en\" target=\"_blank\">Issam H. Laradji\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.es\u002Fcitations?user=IwBx73wAAAAJ&hl=ca\" target=\"_blank\">Pau Rodriguez\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.es\u002Fcitations?user=1jHvtfsAAAAJ&hl=ca\" target=\"_blank\">David Vazquez\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=1ScWJOoAAAAJ&hl=en\" target=\"_blank\">Chris Pal\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=aVfyPAoAAAAJ&hl=en\" target=\"_blank\">Marco Pedersoli\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003C\u002Fdiv>\n\n## 🔥 News\n- Sep 2025:  **RLRF Accepted at NeurIPS 2025**,\n   - Our follow-up work to StarVector, RLRF, has been accepted to NeurIPS 2025! Check out the paper [[Link](https:\u002F\u002Farxiv.org\u002Fabs\u002F2505.20793)]\n- March 2025: **StarVector Accepted at CVPR 2025**,\n  - StarVector has been accepted at CVPR 2025! Check out the paper [[Link](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.11556)]\n  - Check out our website for more information [[Link](https:\u002F\u002Fstarvector.github.io\u002F)]\n  - StarVector models are now available on HuggingFace! [[Link](https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-1b-im2svg)] [[Link](https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-8b-im2svg)]\n  - SVGBench and SVG-Stack datasets are now available on HuggingFace Datasets! [[Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-bench)] [[Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-stack)]\n  \n## 🚀 Introduction\nStarVector is a multimodal vision-language model for Scalable Vector Graphics (SVG) generation. It can be used to perform image2SVG and text2SVG generation. We pose image generation as a code generation task, using the power of multimodal VLMs\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjoanrod_star-vector_readme_e5334992790c.png\" alt=\"starvector\" style=\"width: 900px; display: block; margin-left: auto; margin-right: auto;\" \u002F>\n\u003C\u002Fdiv>\n\n> **Abstract**: Scalable Vector Graphics (SVGs) are vital for modern image rendering due to their scalability and versatility. Previous SVG generation methods have focused on curve-based vectorization, lacking semantic understanding, often producing artifacts, and struggling with SVG primitives beyond \\textit{path} curves. To address these issues, we introduce StarVector, a multimodal large language model for SVG generation. It performs image vectorization by understanding image semantics and using SVG primitives for compact, precise outputs. Unlike traditional methods, StarVector works directly in the SVG code space, leveraging visual understanding to apply accurate SVG primitives. To train StarVector, we create SVG-Stack, a diverse dataset of 2M samples that enables generalization across vectorization tasks and precise use of primitives like ellipses, polygons, and text. We address challenges in SVG evaluation, showing that pixel-based metrics like MSE fail to capture the unique qualities of vector graphics. We introduce SVG-Bench, a benchmark across 10 datasets, and 3 tasks: Image-to-SVG, Text-to-SVG generation, and diagram generation. Using this setup, StarVector achieves state-of-the-art performance, producing more compact and semantically rich SVGs.\n\n### Multimodal Architecture\n\nStarVector uses a multimodal architecture to process images and text. When performing Image-to-SVG (or image vectorization), the image is projected into visual tokens, and SVG code is generated. When performing Text-to-SVG, the model only receives the text instruction (no image is provided), and a novel SVG is created. The LLM is based of StarCoder, which we leverage to transfer coding skills to SVG generation.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjoanrod_star-vector_readme_765f2cc78a45.png\" alt=\"starvector\" style=\"width: 700px; display: block; margin-left: auto; margin-right: auto;\" \u002F>\n\u003C\u002Fdiv>\n\n## 📖 Table of Contents\n- [💿 Installation](#installation)\n- [🏎️ Quick Start - Image2SVG Generation](#quick-start---image2svg-generation)\n- [🎨 Models](#models)\n- [📊 Datasets](#datasets---svg-bench)\n- [🏋️‍♂️ Training](#training)\n- [🏆 Evaluation on SVG-Bench](#validation-on-svg-benchmarks-svg-bench)\n- [🧩 Demo](#starvector-demo)\n- [📚 Citation](#citation)\n- [📝 License](#license)\n\n\n## Installation\n\n1. Clone this repository and navigate to star-vector folder\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fjoanrod\u002Fstar-vector.git\ncd star-vector\n```\n\n2. Install Package\n```Shell\nconda create -n starvector python=3.11.3 -y\nconda activate starvector\npip install --upgrade pip  # enable PEP 660 support\npip install -e .\n```\n\n3. Install additional packages for training\n```\npip install -e \".[train]\"\n```\n\n### Upgrade to latest code base\n\n```Shell\ngit pull\npip install -e .\n```\n\n## Quick Start - Image2SVG Generation\n\n```Python\nfrom PIL import Image\nfrom starvector.model.starvector_arch import StarVectorForCausalLM\nfrom starvector.data.util import process_and_rasterize_svg\n\nmodel_name = \"starvector\u002Fstarvector-8b-im2svg\"\n\nstarvector = StarVectorForCausalLM.from_pretrained(model_name)\n\nstarvector.cuda()\nstarvector.eval()\n\nimage_pil = Image.open('assets\u002Fexamples\u002Fsample-0.png')\nimage = starvector.process_images([image_pil])[0].cuda()\nbatch = {\"image\": image}\n\nraw_svg = starvector.generate_im2svg(batch, max_length=1000)[0]\nsvg, raster_image = process_and_rasterize_svg(raw_svg)\n```\n\n### Use it from HuggingFace AutoModel\n\n```Python\nfrom PIL import Image\nfrom transformers import AutoModelForCausalLM, AutoTokenizer, AutoProcessor\nfrom starvector.data.util import process_and_rasterize_svg\nimport torch\n\nmodel_name = \"starvector\u002Fstarvector-8b-im2svg\"\n\nstarvector = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, trust_remote_code=True)\nprocessor = starvector.model.processor\ntokenizer = starvector.model.svg_transformer.tokenizer\n\nstarvector.cuda()\nstarvector.eval()\n\nimage_pil = Image.open('assets\u002Fexamples\u002Fsample-18.png')\n\nimage = processor(image_pil, return_tensors=\"pt\")['pixel_values'].cuda()\nif not image.shape[0] == 1:\n    image = image.squeeze(0)\nbatch = {\"image\": image}\n\nraw_svg = starvector.generate_im2svg(batch, max_length=4000)[0]\nsvg, raster_image = process_and_rasterize_svg(raw_svg)\n```\n\n\n## Models\n\nWe provide [Hugging Face 🤗 model checkpoints](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fstarvector\u002Fstarvector-models-6783b22c7bd4b43d13cb5289) for image2SVG vectorization, for 💫 StarVector-8B and 💫 StarVector-1B. These are the results on SVG-Bench, using the DinoScore metric.\n\n| Method        | SVG-Stack | SVG-Fonts | SVG-Icons | SVG-Emoji | SVG-Diagrams |\n|---------------|-----------|-----------|-----------|-----------|--------------|\n| AutoTrace    | 0.942     | 0.954     | 0.946     | 0.975     | 0.874        |\n| Potrace      | 0.898     | 0.967     | 0.972     | 0.882     | 0.875        |\n| VTracer      | 0.954     | 0.964     | 0.940     | 0.981     | 0.882        |\n| Im2Vec        | 0.692     | 0.733     | 0.754     | 0.732     | -            |\n| LIVE          | 0.934     | 0.956     | 0.959     | 0.969     | 0.870        |\n| DiffVG        | 0.810     | 0.821     | 0.952     | 0.814     | 0.822        |\n| GPT-4-V       | 0.852     | 0.842     | 0.848     | 0.850     | -            |\n| 💫 StarVector-1B (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-1b-im2svg)) | 0.926     | 0.978     | 0.975     | 0.929     | 0.943        |\n| 💫 StarVector-8B (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-8b-im2svg)) | **0.966** | **0.982** | **0.984** | **0.981** | **0.959**    |\n\n*Note*: StarVector models will not work for natural images or illustrations, as they have not been trained on those images. They excel in vectorizing icons, logotypes, technical diagrams, graphs, and charts.\n\n## Datasets - SVG-Bench\nSVG-Bench is a benchmark for evaluating SVG generation models. It contains 10 datasets, and 3 tasks: Image-to-SVG, Text-to-SVG, and Diagram-to-SVG.\n\nSee our [Huggingface 🤗 Dataset Collection](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fstarvector\u002Fstarvector-svg-datasets-67811204a76475be4dd66d09)  \n\n| Dataset         |  Train  | Val   | Test | Token Length     | SVG Primitives | Annotation     |\n|-----------------|--------|-------|------|------------------|----------------|----------------|\n| SVG-Stack (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-stack)) | 2.1M   | 108k  | 5.7k | 1,822 ± 1,808    | All            | [Captions](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Ftext2svg-stack)        |\n| SVG-Stack_sim (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-stack-simple)) | 601k   | 30.1k | 1.5k | 2k ± 918         | Vector path    | -        |\n| SVG-Diagrams (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-diagrams)) | -      | -     | 472  | 3,486 ± 1,918    | All            | -        |\n| SVG-Fonts (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-fonts)) | 1.8M   | 91.5k | 4.8k | 2,121 ± 1,868    | Vector path    | Font letter      |\n| SVG-Fonts_sim (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-fonts-simple)) | 1.4M   | 71.7k | 3.7k | 1,722 ± 723      | Vector path    | Font letter      |\n| SVG-Emoji (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-emoji)) | 8.7k   | 667   | 668  | 2,551 ± 1,805    | All            | -          |\n| SVG-Emoji_sim (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-emoji-simple)) | 580    | 57    | 96   | 2,448 ± 1,026    | Vector Path    | -          |\n| SVG-Icons (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-icons)) | 80.4k  | 6.2k  | 2.4k | 2,449 ± 1,543    | Vector path    | -              |\n| SVG-Icons_sim (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-icons-simple)) | 80,435 | 2,836 | 1,277| 2,005 ± 824      | Vector path    | -              |\n| SVG-FIGR (🤗 [Link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002FFIGR-SVG)) | 270k   | 27k   | 3k   | 5,342 ± 2,345    | Vector path    | Class, Caption | \n\n\n>We offer a summary of statistics about the datasets used in our training and evaluation experiments. This datasets are included in SVG-Bench. The subscript _sim_ stands for the simplified version of the dataset, as required by some baselines.\n\n## Training\n\n### Confirm dependencies are installed\n\n```bash\npip install -e \".[train]\"\n```\n\n### Set environment variables\nWe recommend setting the following environment variables:\n\n```bash\n  export HF_HOME=\u003Cpath to the folder where you want to store the models>\n  export HF_TOKEN=\u003Cyour huggingface token>\n  export WANDB_API_KEY=\u003Cyour wandb token>\n  export OUTPUT_DIR=\u003Cpath\u002Fto\u002Foutput>\n```\n\ncd the root of the repository.\n\n```Shell\ncd star-vector\n```\n\n### Image2SVG Pretraining (Stage 1)\n\nWe have different training approaches for StarVector-1B and StarVector-8B. StarVector-1B can be trained using Deepspeed, while StarVector-8B requires FSDP.\n\n#### StarVector-1B Training\n\nYou can use the following command to train StarVector-1B on SVG-Stack for the Image2SVG vectorization task, using Deepspeed and Accelerate\n\n```bash\n# StarVector-1B\naccelerate launch --config_file configs\u002Faccelerate\u002Fdeepspeed-8-gpu.yaml starvector\u002Ftrain\u002Ftrain.py config=configs\u002Fmodels\u002Fstarvector-1b\u002Fim2svg-stack.yaml\n```\n\n#### StarVector-8B Training\n\nYou can use the following command to train StarVector-8B on SVG-Stack for the Image2SVG vectorization task, using FSDP and Accelerate. We provide the torchrun command to support multi-nodes and multi-GPUs.\n\n```bash\n# StarVector-8B\ntorchrun \\\n  --nproc-per-node=8 \\\n  --nnodes=1 \\\n  starvector\u002Ftrain\u002Ftrain.py \\\n  config=configs\u002Fmodels\u002Fstarvector-8b\u002Fim2svg-stack.yaml\n```\n\n\n### Finetuning StarVector (Stage 2)\n\nAfter pretraining StarVector on image vectorization, we finetune it on additional SVG tasks like Text2SVG, and SVG-Bench datasets.\n\n#### Text2SVG Finetuning\n\n```bash\n# StarVector-1B\naccelerate launch --config_file config\u002Faccelerate\u002Fdeepspeed-8-gpu.yaml starvector\u002Ftrain\u002Ftrain.py config=configs\u002Fmodels\u002Fstarvector-1b\u002Ftext2svg-stack.yaml\n\n# StarVector-8B\ntorchrun \\\n  --nproc-per-node=8 \\\n  --nnodes=1 \\\n  starvector\u002Ftrain\u002Ftrain.py \\\n  config=configs\u002Fmodels\u002Fstarvector-8b\u002Ftext2svg-stack.yaml\n```\n\n#### SVG-Bench Finetuning\n\n```bash\n# StarVector-1B\naccelerate launch --config_file config\u002Faccelerate\u002Fdeepspeed-8-gpu.yaml starvector\u002Ftrain\u002Ftrain.py config=configs\u002Fmodels\u002Fstarvector-1b\u002Fim2svg-{fonts,icons,emoji}.yaml\n\n# StarVector-8B\ntorchrun \\\n  --nproc-per-node=8 \\\n  --nnodes=1 \\\n  starvector\u002Ftrain\u002Ftrain.py \\\n  config=configs\u002Fmodels\u002Fstarvector-8b\u002Fim2svg-{fonts,icons,emoji}.yaml\n```\n\nWe also provide shell scripts in `scripts\u002Ftrain\u002F*` \n\n## Validation on SVG Benchmarks (⭐ SVG-Bench)\n\nWe validate StarVector on ⭐ SVG-Bench Benchmark. We provide the SVGValidator class that allows you to run StarVector using **1) the HuggingFace generation backend** or **2) the VLLM backend**. The later is substantially faster thanks to the use of Paged Attention. \n\n### HuggingFace Generation Backend\nLet's start with the evaluation for StarVector-1B and StarVector-8B on SVG-Stack, using the HuggingFace generation backend (StarVectorHFAPIValidator). To override the input arguments, you can add cli args following the yaml file structure.\n\n```bash\n# StarVector-1B on SVG-Stack, using the HuggingFace backend \npython starvector\u002Fvalidation\u002Fvalidate.py \\\nconfig=configs\u002Fgeneration\u002Fhf\u002Fstarvector-1b\u002Fim2svg.yaml \\\ndataset.dataset_name=starvector\u002Fsvg-stack\n\n# StarVector-8B on SVG-Stack, using the vanilla HuggingFace generation API\npython starvector\u002Fvalidation\u002Fvalidate.py \\\nconfig=configs\u002Fgeneration\u002Fhf\u002Fstarvector-8b\u002Fim2svg.yaml \\\ndataset.dataset_name=starvector\u002Fsvg-stack\n```\n\n### vLLM Backend\n\nFor using the vLLM backend (StarVectorVLLMAPIValidator), first install our StarVector fork of VLLM, [here](https:\u002F\u002Fgithub.com\u002Fstarvector\u002Fvllm).\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fstarvector\u002Fvllm.git\ncd vllm\npip install -e .\n```\n\nThen, launch the using the vllm config file (it uses StarVectorVLLMValidator):\n\n```bash\n# StarVector-1B\npython starvector\u002Fvalidation\u002Fvalidate.py \\\nconfig=configs\u002Fgeneration\u002Fvllm\u002Fstarvector-1b\u002Fim2svg.yaml \\\ndataset.dataset_name=starvector\u002Fsvg-stack\n\n# StarVector-8B\npython starvector\u002Fvalidation\u002Fvalidate.py \\\nconfig=configs\u002Fgeneration\u002Fvllm\u002Fstarvector-8b\u002Fim2svg.yaml \\\ndataset.dataset_name=starvector\u002Fsvg-stack\n```\n\nWe provide evaluation scripts in `scripts\u002Feval\u002F*`\n\n\n## StarVector Demo\n\nThe demo provides two options for converting images to SVG code:\n1. HuggingFace generation functionality\n2. VLLM (recommended) - offers faster generation speed\n\n### Option 1: HuggingFace Generation with Gradio Web UI\n\nWe provide a Gradio web UI for you to play with our model.\n\n#### Launch a controller\n```Shell\npython -m starvector.serve.controller --host 0.0.0.0 --port 10000\n```\n\n#### Launch a gradio web server.\n```Shell\npython -m starvector.serve.gradio_web_server --controller http:\u002F\u002Flocalhost:10000 --model-list-mode reload --port 7000\n```\nYou just launched the Gradio web interface. Now, you can open the web interface with the URL printed on the screen. You may notice that there is no model in the model list. Do not worry, as we have not launched any model worker yet. It will be automatically updated when you launch a model worker.\n\n#### Launch a model worker\n\nThis is the actual *worker* that performs the inference on the GPU.  Each worker is responsible for a single model specified in `--model-path`.\n\n```Shell\npython -m starvector.serve.model_worker --host 0.0.0.0 --controller http:\u002F\u002Flocalhost:10000 --port 40000 --worker http:\u002F\u002Flocalhost:40000 --model-path joanrodai\u002Fstarvector-1.4b\n```\nWait until the process finishes loading the model and you see \"Uvicorn running on ...\".  Now, refresh your Gradio web UI, and you will see the model you just launched in the model list.\n\nYou can launch as many workers as you want, and compare between different model checkpoints in the same Gradio interface. Please keep the `--controller` the same, and modify the `--port` and `--worker` to a different port number for each worker.\n\n\n```Shell\nvllm serve starvector\u002Fstarvector-8b-im2svg --chat-template configs\u002Fchat-template.jinja --trust-remote-code --port 8001 --max-model-len 16000\n\npython -m starvector.serve.model_worker --host 0.0.0.0 --controller http:\u002F\u002Flocalhost:10000 --port \u003Cdifferent from 40000, say 40001> --worker http:\u002F\u002Flocalhost:\u003Cchange accordingly, i.e. 40001> --model-path \u003Cckpt2>\n```\n\n#### Option 2: Launch VLLM\n\n0. Remember to clone the starvector\u002Fvllm fork (it has modifications for starvector).\n\n```Shell\ngit clone https:\u002F\u002Fgithub.com\u002Fstarvector\u002Fvllm.git\ncd vllm\npip install -e .\n```\n\n1. Call this to launch the VLLM endpoint\n\n\n```Shell\nvllm serve starvector\u002Fstarvector-1b-im2svg --chat-template configs\u002Fchat-template.jinja --trust-remote-code --port 8000 --max-model-len 8192\n```\n\n2. Create the demo for VLLM\n\n```Shell\npython -m starvector.serve.vllm_api_gradio.controller --host 0.0.0.0 --port 10000\npython -m starvector.serve.vllm_api_gradio.gradio_web_server --controller http:\u002F\u002Flocalhost:10000 --model-list-mode reload --port 7000\npython -m starvector.serve.vllm_api_gradio.model_worker --host 0.0.0.0 --controller http:\u002F\u002Flocalhost:10000 --port 40000 --worker http:\u002F\u002Flocalhost:40000 --model-name starvector\u002Fstarvector-1b-im2svg --vllm-base-url http:\u002F\u002Flocalhost:8000\n```\n\n3. Add more models by serving them with VLLM and calling a new model worker\n\n```Shell\nvllm serve starvector\u002Fstarvector-8b-im2svg --chat-template configs\u002Fchat-template.jinja --trust-remote-code --port 8001 --max-model-len 16384\n\npython -m starvector.serve.vllm_api_gradio.model_worker --host 0.0.0.0 --controller http:\u002F\u002Flocalhost:10000 --port 40001 --worker http:\u002F\u002Flocalhost:40001 --model-name starvector\u002Fstarvector-8b-im2svg --vllm-base-url http:\u002F\u002Flocalhost:8001\n```\n\n## Citation\n```\n@misc{rodriguez2024starvector,\n      title={StarVector: Generating Scalable Vector Graphics Code from Images and Text}, \n      author={Juan A. Rodriguez and Abhay Puri and Shubham Agarwal and Issam H. Laradji and Pau Rodriguez and Sai Rajeswar and David Vazquez and Christopher Pal and Marco Pedersoli},\n      year={2024},\n      eprint={2312.11556},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.11556}, \n}\n```\n\n## License\nThis project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details.\n","\u003Cdiv align=\"center\">\n  \u003Ch1>💫 StarVector：从图像和文本生成可缩放矢量图形代码\u003C\u002Fh1>\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjoanrod_star-vector_readme_736dedabb669.png\" alt=\"starvector\" style=\"width: 800px; display: block; margin-left: auto; margin-right: auto;\"\u002F>\n\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.11556\" target=\"_blank\">\n    \u003Cimg alt=\"arXiv\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-StarVector-red?logo=arxiv\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fstarvector.github.io\u002F\" target=\"_blank\">\n    \u003Cimg alt=\"Website\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Website-starvector.github.io-blue.svg\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-1b-im2svg\" target=\"_blank\">\n    \u003Cimg alt=\"HF Models: StarVector\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Model-StarVector--1B-ffc107?color=ffc107&logoColor=white\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-8b-im2svg\" target=\"_blank\">\n    \u003Cimg alt=\"HF Models: StarVector\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Model-StarVector--8B-ffc107?color=ffc107&logoColor=white\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-stack\" target=\"_blank\">\n    \u003Cimg alt=\"HF Dataset: SVG-Stack\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Data-SVG--Stack-ffc107?color=ffc107&logoColor=white\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fstarvector\u002Fstarvector-svg-datasets-svg-bench-67811204a76475be4dd66d09\" target=\"_blank\">\n    \u003Cimg alt=\"HF Dataset: SVG-Bench\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20_Benchmark-SVG--Bench-ffc107?color=ffc107&logoColor=white\" height=\"25\" \u002F>\n\u003C\u002Fa>\n\n\u003Cdiv style=\"font-family: charter;\">\n    \u003Ca href=\"https:\u002F\u002Fjoanrod.github.io\" target=\"_blank\">Juan A. Rodriguez\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fabhaypuri.github.io\u002Fportfolio\u002F\" target=\"_blank\">Abhay Puri\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fshubhamagarwal92.github.io\u002F\" target=\"_blank\">Shubham Agarwal\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.ca\u002Fcitations?user=8vRS7F0AAAAJ&hl=en\" target=\"_blank\">Issam H. Laradji\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.es\u002Fcitations?user=IwBx73wAAAAJ&hl=ca\" target=\"_blank\">Pau Rodriguez\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.es\u002Fcitations?user=1jHvtfsAAAAJ&hl=ca\" target=\"_blank\">David Vazquez\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=1ScWJOoAAAAJ&hl=en\" target=\"_blank\">Chris Pal\u003C\u002Fa>,\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=aVfyPAoAAAAJ&hl=en\" target=\"_blank\">Marco Pedersoli\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003C\u002Fdiv>\n\n## 🔥 新闻\n- 2025年9月：**RLRF被NeurIPS 2025接收**，\n   - 我们对StarVector的后续工作RLRF已被NeurIPS 2025接收！请查看论文[[链接](https:\u002F\u002Farxiv.org\u002Fabs\u002F2505.20793)]\n- 2025年3月：**StarVector被CVPR 2025接收**，\n  - StarVector已被CVPR 2025接收！请查看论文[[链接](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.11556)]\n  - 更多信息请访问我们的网站[[链接](https:\u002F\u002Fstarvector.github.io\u002F)]\n  - StarVector模型现已在HuggingFace上线！[[链接](https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-1b-im2svg)] [[链接](https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-8b-im2svg)]\n  - SVGBench和SVG-Stack数据集现已在HuggingFace Datasets上线！[[链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-bench)] [[链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-stack)]\n  \n## 🚀 简介\nStarVector是一个用于可缩放矢量图形（SVG）生成的多模态视觉-语言模型。它可以用于执行图像到SVG和文本到SVG的生成任务。我们将图像生成问题建模为代码生成任务，充分利用多模态VLM的强大能力。\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjoanrod_star-vector_readme_e5334992790c.png\" alt=\"starvector\" style=\"width: 900px; display: block; margin-left: auto; margin-right: auto;\" \u002F>\n\u003C\u002Fdiv>\n\n> **摘要**：可缩放矢量图形（SVG）因其可缩放性和多功能性，在现代图像渲染中至关重要。以往的SVG生成方法主要集中在基于曲线的矢量化上，缺乏语义理解，常常产生伪影，并且难以处理除路径曲线之外的SVG图元。为了解决这些问题，我们提出了StarVector，一个用于SVG生成的多模态大型语言模型。它通过理解图像语义并使用SVG图元来实现紧凑、精确的输出，从而完成图像矢量化。与传统方法不同，StarVector直接在SVG代码空间中工作，利用视觉理解来准确应用SVG图元。为了训练StarVector，我们创建了SVG-Stack，一个包含200万样本的多样化数据集，能够实现跨矢量化任务的泛化，并精确使用椭圆、多边形和文本等图元。我们还解决了SVG评估中的挑战，表明基于像素的指标如MSE无法捕捉矢量图形的独特特性。为此，我们引入了SVG-Bench，一个涵盖10个数据集和3项任务的基准测试：图像到SVG、文本到SVG生成以及图表生成。借助这一设置，StarVector实现了最先进的性能，生成了更加紧凑且语义丰富的SVG。\n\n### 多模态架构\n\nStarVector采用多模态架构来处理图像和文本。在进行图像到SVG转换（即图像矢量化）时，图像会被投影为视觉标记，然后生成SVG代码。而在进行文本到SVG转换时，模型仅接收文本指令（不提供图像），并生成全新的SVG。该LLM基于StarCoder，我们利用其编码技能来实现SVG生成。\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjoanrod_star-vector_readme_765f2cc78a45.png\" alt=\"starvector\" style=\"width: 700px; display: block; margin-left: auto; margin-right: auto;\" \u002F>\n\u003C\u002Fdiv>\n\n## 📖 目录\n- [💿 安装](#installation)\n- [🏎️ 快速入门 - 图像到SVG生成](#quick-start---image2svg-generation)\n- [🎨 模型](#models)\n- [📊 数据集](#datasets---svg-bench)\n- [🏋️‍♂️ 训练](#training)\n- [🏆 SVG-Bench上的评估](#validation-on-svg-benchmarks-svg-bench)\n- [🧩 演示](#starvector-demo)\n- [📚 引用](#citation)\n- [📝 许可证](#license)\n\n\n## 安装\n\n1. 克隆本仓库并进入star-vector文件夹\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fjoanrod\u002Fstar-vector.git\ncd star-vector\n```\n\n2. 安装软件包\n```Shell\nconda create -n starvector python=3.11.3 -y\nconda activate starvector\npip install --upgrade pip  # 启用PEP 660支持\npip install -e .\n```\n\n3. 安装额外的训练相关包\n```\npip install -e \".[train]\"\n```\n\n### 升级到最新代码库\n\n```Shell\ngit pull\npip install -e .\n```\n\n## 快速入门 - 图像转 SVG 生成\n\n```Python\nfrom PIL import Image\nfrom starvector.model.starvector_arch import StarVectorForCausalLM\nfrom starvector.data.util import process_and_rasterize_svg\n\nmodel_name = \"starvector\u002Fstarvector-8b-im2svg\"\n\nstarvector = StarVectorForCausalLM.from_pretrained(model_name)\n\nstarvector.cuda()\nstarvector.eval()\n\nimage_pil = Image.open('assets\u002Fexamples\u002Fsample-0.png')\nimage = starvector.process_images([image_pil])[0].cuda()\nbatch = {\"image\": image}\n\nraw_svg = starvector.generate_im2svg(batch, max_length=1000)[0]\nsvg, raster_image = process_and_rasterize_svg(raw_svg)\n```\n\n### 从 HuggingFace AutoModel 使用\n\n```Python\nfrom PIL import Image\nfrom transformers import AutoModelForCausalLM, AutoTokenizer, AutoProcessor\nfrom starvector.data.util import process_and_rasterize_svg\nimport torch\n\nmodel_name = \"starvector\u002Fstarvector-8b-im2svg\"\n\nstarvector = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, trust_remote_code=True)\nprocessor = starvector.model.processor\ntokenizer = starvector.model.svg_transformer.tokenizer\n\nstarvector.cuda()\nstarvector.eval()\n\nimage_pil = Image.open('assets\u002Fexamples\u002Fsample-18.png')\n\nimage = processor(image_pil, return_tensors=\"pt\")['pixel_values'].cuda()\nif not image.shape[0] == 1:\n    image = image.squeeze(0)\nbatch = {\"image\": image}\n\nraw_svg = starvector.generate_im2svg(batch, max_length=4000)[0]\nsvg, raster_image = process_and_rasterize_svg(raw_svg)\n```\n\n\n## 模型\n\n我们提供了用于图像转 SVG 矢量化处理的 [Hugging Face 🤗 模型检查点](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fstarvector\u002Fstarvector-models-6783b22c7bd4b43d13cb5289)，分别适用于 💫 StarVector-8B 和 💫 StarVector-1B。以下是使用 DinoScore 指标在 SVG-Bench 上的评估结果。\n\n| 方法        | SVG-Stack | SVG-Fonts | SVG-Icons | SVG-Emoji | SVG-Diagrams |\n|---------------|-----------|-----------|-----------|-----------|--------------|\n| AutoTrace    | 0.942     | 0.954     | 0.946     | 0.975     | 0.874        |\n| Potrace      | 0.898     | 0.967     | 0.972     | 0.882     | 0.875        |\n| VTracer      | 0.954     | 0.964     | 0.940     | 0.981     | 0.882        |\n| Im2Vec        | 0.692     | 0.733     | 0.754     | 0.732     | -            |\n| LIVE          | 0.934     | 0.956     | 0.959     | 0.969     | 0.870        |\n| DiffVG        | 0.810     | 0.821     | 0.952     | 0.814     | 0.822        |\n| GPT-4-V       | 0.852     | 0.842     | 0.848     | 0.850     | -            |\n| 💫 StarVector-1B (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-1b-im2svg)) | 0.926     | 0.978     | 0.975     | 0.929     | 0.943        |\n| 💫 StarVector-8B (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fstarvector\u002Fstarvector-8b-im2svg)) | **0.966** | **0.982** | **0.984** | **0.981** | **0.959**    |\n\n*注*: StarVector 模型不适用于自然图像或插图，因为它们并未针对此类图像进行训练。这些模型在矢量化图标、标志、技术图表、图形和统计图方面表现出色。\n\n## 数据集 - SVG-Bench\nSVG-Bench 是一个用于评估 SVG 生成模型的基准测试。它包含 10 个数据集和 3 项任务：图像转 SVG、文本转 SVG 和图表转 SVG。\n\n请参阅我们的 [Huggingface 🤗 数据集合集](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fstarvector\u002Fstarvector-svg-datasets-67811204a76475be4dd66d09)  \n\n| 数据集         | 训练集  | 验证集   | 测试集 | Token 长度     | SVG 原语 | 注释     |\n|-----------------|--------|-------|------|------------------|----------------|----------------|\n| SVG-Stack (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-stack)) | 2.1M   | 108k  | 5.7k | 1,822 ± 1,808    | 全部            | [字幕](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Ftext2svg-stack)        |\n| SVG-Stack_sim (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-stack-simple)) | 601k   | 30.1k | 1.5k | 2k ± 918         | 向量路径    | -        |\n| SVG-Diagrams (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-diagrams)) | -      | -     | 472  | 3,486 ± 1,918    | 全部            | -        |\n| SVG-Fonts (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-fonts)) | 1.8M   | 91.5k | 4.8k | 2,121 ± 1,868    | 向量路径    | 字体字母      |\n| SVG-Fonts_sim (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-fonts-simple)) | 1.4M   | 71.7k | 3.7k | 1,722 ± 723      | 向量路径    | 字体字母      |\n| SVG-Emoji (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-emoji)) | 8.7k   | 667   | 668  | 2,551 ± 1,805    | 全部            | -          |\n| SVG-Emoji_sim (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-emoji-simple)) | 580    | 57    | 96   | 2,448 ± 1,026    | 向量路径    | -          |\n| SVG-Icons (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-icons)) | 80.4k  | 6.2k  | 2.4k | 2,449 ± 1,543    | 向量路径    | -              |\n| SVG-Icons_sim (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002Fsvg-icons-simple)) | 80,435 | 2,836 | 1,277| 2,005 ± 824      | 向量路径    | -              |\n| SVG-FIGR (🤗 [链接](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fstarvector\u002FFIGR-SVG)) | 270k   | 27k   | 3k   | 5,342 ± 2,345    | 向量路径    | 类别、标题 | \n\n\n我们提供了关于我们训练和评估实验中所使用的数据集的统计数据概览。这些数据集均包含在 SVG-Bench 中。下标 _sim_ 表示数据集的简化版本，这是某些基线方法所要求的。\n\n## 训练\n\n### 确认依赖项已安装\n\n```bash\npip install -e \".[train]\"\n```\n\n### 设置环境变量\n我们建议设置以下环境变量：\n\n```bash\n  export HF_HOME=\u003C您希望存储模型的文件夹路径>\n  export HF_TOKEN=\u003C您的 Hugging Face 令牌>\n  export WANDB_API_KEY=\u003C您的 WandB 令牌>\n  export OUTPUT_DIR=\u003C输出路径>\n```\n\n进入仓库根目录。\n\n```Shell\ncd star-vector\n```\n\n### 图像转 SVG 预训练（阶段 1）\n\n我们为 StarVector-1B 和 StarVector-8B 提供了不同的训练方法。StarVector-1B 可以使用 Deepspeed 进行训练，而 StarVector-8B 则需要 FSDP。\n\n#### StarVector-1B 训练\n\n您可以使用以下命令，通过 Deepspeed 和 Accelerate 在 SVG-Stack 数据集上对 StarVector-1B 进行图像转 SVG 矢量化任务的预训练：\n\n```bash\n# StarVector-1B\naccelerate launch --config_file configs\u002Faccelerate\u002Fdeepspeed-8-gpu.yaml starvector\u002Ftrain\u002Ftrain.py config=configs\u002Fmodels\u002Fstarvector-1b\u002Fim2svg-stack.yaml\n```\n\n#### StarVector-8B 训练\n\n您可以使用以下命令，通过 FSDP 和 Accelerate 在 SVG-Stack 数据集上对 StarVector-8B 进行图像转 SVG 矢量化任务的预训练。我们还提供了 torchrun 命令，以支持多节点和多 GPU 的训练：\n\n```bash\n# StarVector-8B\ntorchrun \\\n  --nproc-per-node=8 \\\n  --nnodes=1 \\\n  starvector\u002Ftrain\u002Ftrain.py \\\n  config=configs\u002Fmodels\u002Fstarvector-8b\u002Fim2svg-stack.yaml\n```\n\n\n### 微调 StarVector（阶段 2）\n\n在对 StarVector 进行图像矢量化预训练之后，我们会对其在其他 SVG 任务上进行微调，例如文本转 SVG 以及 SVG-Bench 数据集。\n\n#### 文本转 SVG 微调\n\n```bash\n# StarVector-1B\naccelerate launch --config_file configs\u002Faccelerate\u002Fdeepspeed-8-gpu.yaml starvector\u002Ftrain\u002Ftrain.py config=configs\u002Fmodels\u002Fstarvector-1b\u002Ftext2svg-stack.yaml\n```\n\n#### SVG-Bench 微调\n\n```bash\n# StarVector-8B\ntorchrun \\\n  --nproc-per-node=8 \\\n  --nnodes=1 \\\n  starvector\u002Ftrain\u002Ftrain.py \\\n  config=configs\u002Fmodels\u002Fstarvector-8b\u002Fsvg-bench-stack.yaml\n```\n\n# StarVector-1B\naccelerate launch --config_file config\u002Faccelerate\u002Fdeepspeed-8-gpu.yaml starvector\u002Ftrain\u002Ftrain.py config=configs\u002Fmodels\u002Fstarvector-1b\u002Ftext2svg-stack.yaml\n\n# StarVector-8B\ntorchrun \\\n  --nproc-per-node=8 \\\n  --nnodes=1 \\\n  starvector\u002Ftrain\u002Ftrain.py \\\n  config=configs\u002Fmodels\u002Fstarvector-8b\u002Ftext2svg-stack.yaml\n```\n\n#### SVG-Bench 微调\n\n```bash\n# StarVector-1B\naccelerate launch --config_file config\u002Faccelerate\u002Fdeepspeed-8-gpu.yaml starvector\u002Ftrain\u002Ftrain.py config=configs\u002Fmodels\u002Fstarvector-1b\u002Fim2svg-{fonts,icons,emoji}.yaml\n\n# StarVector-8B\ntorchrun \\\n  --nproc-per-node=8 \\\n  --nnodes=1 \\\n  starvector\u002Ftrain\u002Ftrain.py \\\n  config=configs\u002Fmodels\u002Fstarvector-8b\u002Fim2svg-{fonts,icons,emoji}.yaml\n```\n\n我们还在 `scripts\u002Ftrain\u002F*` 中提供了 Shell 脚本。\n\n## 在 SVG 基准上的验证（⭐ SVG-Bench）\n\n我们在 ⭐ SVG-Bench 基准上对 StarVector 进行了验证。我们提供了一个 SVGValidator 类，允许您使用 **1) HuggingFace 生成后端** 或 **2) VLLM 后端** 来运行 StarVector。后者由于采用了分页注意力机制，速度显著更快。\n\n### HuggingFace 生成后端\n\n我们先从 StarVector-1B 和 StarVector-8B 在 SVG-Stack 上的评估开始，使用 HuggingFace 生成后端（StarVectorHFAPIValidator）。要覆盖输入参数，您可以按照 YAML 文件的结构添加 CLI 参数。\n\n```bash\n# StarVector-1B 在 SVG-Stack 上，使用 HuggingFace 后端\npython starvector\u002Fvalidation\u002Fvalidate.py \\\nconfig=configs\u002Fgeneration\u002Fhf\u002Fstarvector-1b\u002Fim2svg.yaml \\\ndataset.dataset_name=starvector\u002Fsvg-stack\n\n# StarVector-8B 在 SVG-Stack 上，使用原生 HuggingFace 生成 API\npython starvector\u002Fvalidation\u002Fvalidate.py \\\nconfig=configs\u002Fgeneration\u002Fhf\u002Fstarvector-8b\u002Fim2svg.yaml \\\ndataset.dataset_name=starvector\u002Fsvg-stack\n```\n\n### vLLM 后端\n\n要使用 vLLM 后端（StarVectorVLLMAPIValidator），请先安装我们基于 VLLM 的 StarVector 分支，[这里](https:\u002F\u002Fgithub.com\u002Fstarvector\u002Fvllm)。\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fstarvector\u002Fvllm.git\ncd vllm\npip install -e .\n```\n\n然后，使用 vllm 配置文件启动（它使用 StarVectorVLLMValidator）：\n\n```bash\n# StarVector-1B\npython starvector\u002Fvalidation\u002Fvalidate.py \\\nconfig=configs\u002Fgeneration\u002Fvllm\u002Fstarvector-1b\u002Fim2svg.yaml \\\ndataset.dataset_name=starvector\u002Fsvg-stack\n\n# StarVector-8B\npython starvector\u002Fvalidation\u002Fvalidate.py \\\nconfig=configs\u002Fgeneration\u002Fvllm\u002Fstarvector-8b\u002Fim2svg.yaml \\\ndataset.dataset_name=starvector\u002Fsvg-stack\n```\n\n我们在 `scripts\u002Feval\u002F*` 中提供了评估脚本。\n\n## StarVector 演示\n\n演示提供了两种将图像转换为 SVG 代码的方式：\n1. HuggingFace 生成功能\n2. VLLM（推荐）——提供更快的生成速度\n\n### 选项 1：使用 Gradio Web UI 的 HuggingFace 生成\n\n我们提供了一个 Gradio Web UI，供您体验我们的模型。\n\n#### 启动控制器\n```Shell\npython -m starvector.serve.controller --host 0.0.0.0 --port 10000\n```\n\n#### 启动 Gradio Web 服务器。\n```Shell\npython -m starvector.serve.gradio_web_server --controller http:\u002F\u002Flocalhost:10000 --model-list-mode reload --port 7000\n```\n\n现在您已经启动了 Gradio 网页界面。您可以打开屏幕上显示的 URL 来访问该界面。您可能会注意到模型列表中还没有任何模型。不用担心，因为我们还没有启动任何模型工作进程。当您启动一个模型工作进程时，模型列表会自动更新。\n\n#### 启动模型工作进程\n\n这是实际在 GPU 上执行推理的 *工作进程*。每个工作进程负责 `--model-path` 中指定的单个模型。\n\n```Shell\npython -m starvector.serve.model_worker --host 0.0.0.0 --controller http:\u002F\u002Flocalhost:10000 --port 40000 --worker http:\u002F\u002Flocalhost:40000 --model-path joanrodai\u002Fstarvector-1.4b\n```\n\n等待进程完成模型加载，并看到“Uvicorn 正在运行…”的消息。此时刷新您的 Gradio 网页界面，您就会在模型列表中看到刚刚启动的模型。\n\n您可以根据需要启动任意数量的工作进程，并在同一 Gradio 界面中比较不同的模型检查点。请确保 `--controller` 保持一致，而将 `--port` 和 `--worker` 分别设置为不同的端口号以区分各个工作进程。\n\n```Shell\nvllm serve starvector\u002Fstarvector-8b-im2svg --chat-template configs\u002Fchat-template.jinja --trust-remote-code --port 8001 --max-model-len 16000\n\npython -m starvector.serve.model_worker --host 0.0.0.0 --controller http:\u002F\u002Flocalhost:10000 --port \u003C不同于40000，比如40001> --worker http:\u002F\u002Flocalhost:\u003C相应地更改，即40001> --model-path \u003Cckpt2>\n```\n\n#### 选项 2：启动 VLLM\n\n0. 请记住克隆 starvector\u002Fvllm 分支（其中包含针对 StarVector 的修改）。\n\n```Shell\ngit clone https:\u002F\u002Fgithub.com\u002Fstarvector\u002Fvllm.git\ncd vllm\npip install -e .\n```\n\n1. 调用以下命令来启动 VLLM 端点：\n\n```Shell\nvllm serve starvector\u002Fstarvector-1b-im2svg --chat-template configs\u002Fchat-template.jinja --trust-remote-code --port 8000 --max-model-len 8192\n```\n\n2. 创建 VLLM 演示：\n\n```Shell\npython -m starvector.serve.vllm_api_gradio.controller --host 0.0.0.0 --port 10000\npython -m starvector.serve.vllm_api_gradio.gradio_web_server --controller http:\u002F\u002Flocalhost:10000 --model-list-mode reload --port 7000\npython -m starvector.serve.vllm_api_gradio.model_worker --host 0.0.0.0 --controller http:\u002F\u002Flocalhost:10000 --port 40000 --worker http:\u002F\u002Flocalhost:40000 --model-name starvector\u002Fstarvector-1b-im2svg --vllm-base-url http:\u002F\u002Flocalhost:8000\n```\n\n3. 通过 VLLM 提供更多模型并调用新的模型工作进程来添加更多模型：\n\n```Shell\nvllm serve starvector\u002Fstarvector-8b-im2svg --chat-template configs\u002Fchat-template.jinja --trust-remote-code --port 8001 --max-model-len 16384\n\npython -m starvector.serve.vllm_api_gradio.model_worker --host 0.0.0.0 --controller http:\u002F\u002Flocalhost:10000 --port 40001 --worker http:\u002F\u002Flocalhost:40001 --model-name starvector\u002Fstarvector-8b-im2svg --vllm-base-url http:\u002F\u002Flocalhost:8001\n```\n\n## 引用\n```\n@misc{rodriguez2024starvector,\n      title={StarVector: 从图像和文本生成可缩放矢量图形代码}, \n      author={Juan A. Rodriguez 和 Abhay Puri、Shubham Agarwal、Issam H. Laradji、Pau Rodriguez、Sai Rajeswar、David Vazquez、Christopher Pal 和 Marco Pedersoli},\n      year={2024},\n      eprint={2312.11556},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.11556}, \n}\n```\n\n## 许可证\n本项目采用 Apache License, Version 2.0 许可证——详情请参阅 [LICENSE](LICENSE) 文件。","# StarVector 快速上手指南\n\nStarVector 是一个多模态视觉 - 语言模型，专为生成可缩放矢量图形（SVG）代码而设计。它支持从图像生成 SVG（Image-to-SVG）和从文本生成 SVG（Text-to-SVG），将图像生成任务转化为代码生成任务。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux 或 macOS (Windows 用户建议使用 WSL2)\n*   **Python 版本**: 3.11.3 (推荐严格匹配以避免依赖冲突)\n*   **包管理器**: Conda (推荐) 或 Pip\n*   **GPU**: 推荐使用 NVIDIA GPU 并安装对应的 CUDA 驱动（用于加速推理和训练）\n*   **前置依赖**: Git\n\n## 安装步骤\n\n### 1. 克隆项目代码\n首先从 GitHub 克隆仓库并进入项目目录：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fjoanrod\u002Fstar-vector.git\ncd star-vector\n```\n\n### 2. 创建并激活虚拟环境\n使用 Conda 创建名为 `starvector` 的独立环境：\n\n```bash\nconda create -n starvector python=3.11.3 -y\nconda activate starvector\n```\n\n### 3. 安装核心依赖\n升级 pip 以支持最新安装标准，并安装项目核心包：\n\n```bash\npip install --upgrade pip\npip install -e .\n```\n\n> **提示**：如果您计划进行模型训练，请额外运行以下命令安装训练依赖：\n> ```bash\n> pip install -e \".[train]\"\n> ```\n\n### 4. 更新代码（可选）\n如果需要获取最新代码库：\n\n```bash\ngit pull\npip install -e .\n```\n\n## 基本使用：图像转 SVG (Image2SVG)\n\n以下是最简单的使用示例，展示如何加载预训练模型并将图片转换为 SVG 代码。本示例使用 Hugging Face `AutoModel` 接口，兼容性更好。\n\n### Python 代码示例\n\n```python\nfrom PIL import Image\nfrom transformers import AutoModelForCausalLM, AutoTokenizer, AutoProcessor\nfrom starvector.data.util import process_and_rasterize_svg\nimport torch\n\n# 1. 指定模型名称 (提供 1B 和 8B 两个版本)\nmodel_name = \"starvector\u002Fstarvector-8b-im2svg\"\n\n# 2. 加载模型 (使用 float16 节省显存)\nstarvector = AutoModelForCausalLM.from_pretrained(\n    model_name, \n    torch_dtype=torch.float16, \n    trust_remote_code=True\n)\n\n# 获取处理器和分词器\nprocessor = starvector.model.processor\ntokenizer = starvector.model.svg_transformer.tokenizer\n\n# 3. 将模型移至 GPU 并设置为评估模式\nstarvector.cuda()\nstarvector.eval()\n\n# 4. 加载输入图像\n# 请确保 'assets\u002Fexamples\u002Fsample-18.png' 替换为您本地的图片路径\nimage_pil = Image.open('assets\u002Fexamples\u002Fsample-18.png')\n\n# 5. 预处理图像\nimage = processor(image_pil, return_tensors=\"pt\")['pixel_values'].cuda()\nif not image.shape[0] == 1:\n    image = image.squeeze(0)\n    \nbatch = {\"image\": image}\n\n# 6. 生成 SVG 代码\n# max_length 控制生成代码的最大长度，可根据图像复杂度调整\nraw_svg = starvector.generate_im2svg(batch, max_length=4000)[0]\n\n# 7. 后处理：整理 SVG 格式并生成对应的栅格化预览图\nsvg_code, raster_image = process_and_rasterize_svg(raw_svg)\n\n# 打印生成的 SVG 代码前 200 个字符\nprint(svg_code[:200]) \n```\n\n### 注意事项\n*   **适用场景**: StarVector 擅长处理图标、Logo、技术图表、图形和图表等矢量风格图像。**不适用于**自然风景照片或复杂插画。\n*   **模型选择**: \n    *   `starvector-8b-im2svg`: 性能更强，适合高精度需求（需较大显存）。\n    *   `starvector-1b-im2svg`: 速度更快，显存占用更低，适合资源受限环境。\n*   **网络加速**: 加载模型时默认连接 Hugging Face。国内用户若下载缓慢，可配置 `HF_ENDPOINT` 环境变量使用镜像源：\n    ```bash\n    export HF_ENDPOINT=https:\u002F\u002Fhf-mirror.com\n    ```","某电商设计团队需要将数百张手绘的产品草图快速转化为可无限放大的矢量图标，以适配不同分辨率的移动端界面。\n\n### 没有 star-vector 时\n- 设计师必须手动使用贝塞尔曲线工具逐点描摹草图，单张图标耗时超过 30 分钟，效率极低。\n- 自动位图转矢量的传统算法往往生成冗余节点，导致文件体积庞大且边缘出现锯齿或断裂伪影。\n- 生成的矢量路径缺乏语义结构，所有元素被合并为单一图层，后续修改颜色或形状极其困难。\n- 无法通过文字指令调整风格，若需统一整套图标的线条粗细或圆角风格，只能重复人工重绘。\n\n### 使用 star-vector 后\n- 直接上传手绘草图或输入“简约风格的咖啡杯图标”文本，star-vector 秒级输出高质量 SVG 代码，效率提升数十倍。\n- 基于视觉 - 语言模型架构，生成的路径节点精简精准，完美还原设计意图且无失真伪影。\n- 输出的代码具备清晰的语义分组（如将杯身、把手、蒸汽分为独立组），开发者可直接通过 CSS 操控各部分属性。\n- 支持多模态交互，设计师可随时追加“加粗轮廓”或“改为扁平化”等文本指令，star-vector 即时迭代生成新方案。\n\nstar-vector 将繁琐的矢量绘制工作转化为高效的代码生成任务，让非专业绘图人员也能轻松获得工业级的可扩展图形资源。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjoanrod_star-vector_736dedab.png","joanrod","Joan Rodriguez","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fjoanrod_9937cc54.jpg","QuiverAI, Mila, StarVector","QuiverAI","Montreal",null,"joanrod_ai","joanrod.github.io","https:\u002F\u002Fgithub.com\u002Fjoanrod",[83,87,91,95,99,102],{"name":84,"color":85,"percentage":86},"Python","#3572A5",98.3,{"name":88,"color":89,"percentage":90},"Shell","#89e051",0.7,{"name":92,"color":93,"percentage":94},"Jupyter Notebook","#DA5B0B",0.5,{"name":96,"color":97,"percentage":98},"JavaScript","#f1e05a",0.2,{"name":100,"color":101,"percentage":98},"Dockerfile","#384d54",{"name":103,"color":104,"percentage":105},"Jinja","#a52a22",0,4356,241,"2026-04-12T11:52:47","Apache-2.0","Linux, macOS, Windows","必需（代码示例使用 .cuda()），建议使用支持 CUDA 的 NVIDIA GPU。显存需求：运行 1B 模型建议 8GB+，运行 8B 模型建议 24GB+（配合 float16 精度）。CUDA 版本未明确说明，需匹配安装的 PyTorch 版本。","未说明（建议 16GB+ 以处理大型数据集和模型加载）",{"notes":114,"python":115,"dependencies":116},"1. 官方推荐使用 Conda 创建名为 'starvector' 的虚拟环境并指定 Python 3.11.3 版本。\n2. 项目基于 StarCoder 架构，利用多模态大语言模型生成 SVG 代码。\n3. 提供 1B 和 8B 两种参数量模型，8B 模型在 SVG-Bench 基准测试中表现最佳。\n4. 模型主要针对图标、徽标、技术图表等矢量图形优化，不适用于自然图像或普通插画。\n5. 训练额外依赖可通过 pip install -e '.[train]' 安装。","3.11.3",[117,118,119,120,121],"torch","transformers","Pillow","accelerate","peft",[35,123,14],"其他",[125,126,127,128],"llm","multimodal-large-language-models","svg","vlm","2026-03-27T02:49:30.150509","2026-04-13T04:24:05.254530",[],[]]