# AutoFigure-Edit **Repository Path**: chuang_lin/AutoFigure-Edit ## Basic Information - **Project Name**: AutoFigure-Edit - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-29 - **Last Updated**: 2026-03-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
# AutoFigure-edit: Generating and Editing Publication-Ready Scientific Illustrations [ICLR 2026]
[](https://openreview.net/forum?id=5N3z9JQJKq)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/)
[](https://huggingface.co/datasets/WestlakeNLP/FigureBench)
从方法文本到可编辑的 SVG
AutoFigure-edit 是 AutoFigure 的新一代版本。它能将论文的方法部分自动转化为完全可编辑的 SVG 插图,并支持在嵌入式 SVG 编辑器中进行微调。
|
| **[CycleResearcher](https://github.com/zhu-minjun/Researcher) / [Style 2](https://arxiv.org/pdf/2503.18102)**
|
| **[CycleResearcher](https://github.com/zhu-minjun/Researcher) / [Style 3](https://arxiv.org/pdf/2510.14512)**
|
| **[DeepReviewer](https://github.com/zhu-minjun/Researcher) / [Style 1](https://arxiv.org/pdf/2510.09558)**
|
| **[DeepReviewer](https://github.com/zhu-minjun/Researcher) / [Style 2](https://arxiv.org/pdf/2503.18102)**
|
| **[DeepReviewer](https://github.com/zhu-minjun/Researcher) / [Style 3](https://arxiv.org/pdf/2510.14512)**
|
| **[DeepScientist](https://github.com/ResearAI/DeepScientist) / [Style 1](https://arxiv.org/pdf/2510.09558)**
|
| **[DeepScientist](https://github.com/ResearAI/DeepScientist) / [Style 2](https://arxiv.org/pdf/2503.18102)**
|
| **[DeepScientist](https://github.com/ResearAI/DeepScientist) / [Style 3](https://arxiv.org/pdf/2510.14512)**
|
---
## 🚀 工作原理
AutoFigure-edit 的处理流程通过四个阶段将原始生成的位图转化为可编辑的 SVG:
在起始页面左侧粘贴论文的方法文本。在右侧配置生成选项:
* **供应商 (Provider):** 选择 LLM 供应商(OpenRouter、Bianxie 或 Gemini)。
* **优化 (Optimize):** 设置 SVG 模板的优化迭代次数(日常使用建议设为 `0`)。
* **参考图片 (Reference Image):** 上传目标图片以启用风格迁移功能。
* **SAM3 后端:** 选择本地 SAM3 或 fal.ai API(API Key 可选)。
### 2. 画布与编辑器
生成结果会直接加载到集成的 [SVG-Edit](https://github.com/SVG-Edit/svgedit) 画布中,支持全功能的矢量编辑。
* **状态与日志:** 左上角查看实时进度,右上角按钮查看详细执行日志。
* **素材抽屉 (Artifacts):** 点击右下角的悬浮按钮展开 **素材面板**。这里包含所有中间产物(图标、SVG 模板等)。你可以直接将任何素材 **拖拽** 到画布上进行自定义创作。
---
## 🧩 SAM3 安装说明
AutoFigure-edit 依赖 SAM3,但本项目**未**直接包含它。请遵循官方 SAM3 安装指南和先决条件。上游仓库目前针对 GPU 构建要求 Python 3.12+、PyTorch 2.7+ 和 CUDA 12.6。
SAM3 权重文件托管在 Hugging Face 上,下载前可能需要申请访问权限并进行认证(例如 `huggingface-cli login`)。
- SAM3 仓库: https://github.com/facebookresearch/sam3
- SAM3 Hugging Face: https://huggingface.co/facebook/sam3
### SAM3 API 模式(无需本地安装)
如果您不想在本地安装 SAM3,可以使用 API 后端(Web Demo 也支持)。**我们推荐使用 [Roboflow](https://roboflow.com/),因为它可以免费使用。**
**方案 A: fal.ai**
```bash
export FAL_KEY="your-fal-key"
python autofigure2.py \
--method_file paper.txt \
--output_dir outputs/demo \
--provider bianxie \
--api_key YOUR_KEY \
--sam_backend fal
```
**方案 B: Roboflow**
```bash
export ROBOFLOW_API_KEY="your-roboflow-key"
python autofigure2.py \
--method_file paper.txt \
--output_dir outputs/demo \
--provider bianxie \
--api_key YOUR_KEY \
--sam_backend roboflow
```
可选 CLI 参数(API):
- `--sam_api_key`(覆盖 `FAL_KEY`/`ROBOFLOW_API_KEY`)
- `--sam_max_masks`(默认 32,仅 fal.ai 后端)
## ⚙️ 配置
### 支持的 LLM 供应商
| 供应商 | Base URL | 备注 |
|----------|----------|------|
| **OpenRouter** | `openrouter.ai/api/v1` | 支持 Gemini/Claude/其他模型 |
| **Bianxie** | `api.bianxie.ai/v1` | 兼容 OpenAI 接口 |
| **Gemini (Google)** | `generativelanguage.googleapis.com/v1beta` | Google 官方 Gemini API(`google-genai`) |
常用 CLI 参数:
- `--provider` (openrouter | bianxie | gemini)
- `--image_model`, `--svg_model`
- `--sam_prompt` (逗号分隔的提示词)
- `--sam_backend` (local | fal | roboflow | api)
- `--sam_api_key` (API Key,默认读取 `FAL_KEY` 或 `ROBOFLOW_API_KEY`)
- `--sam_max_masks` (fal.ai 最大 masks,默认 32)
- `--merge_threshold` (0 禁用合并)
- `--optimize_iterations` (0 禁用优化)
- `--reference_image_path` (可选)
---
## 📁 项目结构
![]() |
![]() |