docs: make Chinese README the default
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
<!-- WEHUB_ZH_README -->
|
||||
> [!NOTE]
|
||||
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
|
||||
> [English](./README.en.md) · [原始项目](https://github.com/deepseek-ai/Janus) · [上游 README](https://github.com/deepseek-ai/Janus/blob/HEAD/README.md)
|
||||
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
|
||||
|
||||
<!-- markdownlint-disable first-line-h1 -->
|
||||
<!-- markdownlint-disable html -->
|
||||
<!-- markdownlint-disable no-duplicate-header -->
|
||||
@@ -8,14 +14,14 @@
|
||||
<hr>
|
||||
|
||||
<div align="center">
|
||||
<h1>🚀 Janus-Series: Unified Multimodal Understanding and Generation Models</h1>
|
||||
<h1>🚀 Janus 系列:统一多模态理解与生成模型</h1>
|
||||
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
|
||||
<a href="https://www.deepseek.com/" target="_blank">
|
||||
<img alt="Homepage" src="images/badge.svg" />
|
||||
<img alt="主页" src="images/badge.svg" />
|
||||
</a>
|
||||
</a>
|
||||
<a href="https://huggingface.co/deepseek-ai" target="_blank">
|
||||
@@ -42,73 +48,71 @@
|
||||
<div align="center">
|
||||
|
||||
<a href="LICENSE-CODE">
|
||||
<img alt="Code License" src="https://img.shields.io/badge/Code_License-MIT-f5de53?&color=f5de53">
|
||||
<img alt="代码许可" src="https://img.shields.io/badge/Code_License-MIT-f5de53?&color=f5de53">
|
||||
</a>
|
||||
<a href="LICENSE-MODEL">
|
||||
<img alt="Model License" src="https://img.shields.io/badge/Model_License-Model_Agreement-f5de53?&color=f5de53">
|
||||
<img alt="模型许可" src="https://img.shields.io/badge/Model_License-Model_Agreement-f5de53?&color=f5de53">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<p align="center">
|
||||
<a href="#2-model-download"><b>📥 Model Download</b></a> |
|
||||
<a href="#3-quick-start"><b>⚡ Quick Start</b></a> |
|
||||
<a href="#4-license"><b>📜 License</b></a> |
|
||||
<a href="#5-citation"><b>📖 Citation</b></a> <br>
|
||||
<a href="#2-model-download"><b>📥 模型下载</b></a> |
|
||||
<a href="#3-quick-start"><b>⚡ 快速开始</b></a> |
|
||||
<a href="#4-license"><b>📜 许可协议</b></a> |
|
||||
<a href="#5-citation"><b>📖 引用</b></a> <br>
|
||||
<!-- 📄 Paper Link (<a href="https://arxiv.org/abs/2410.13848"><b>Janus</b></a>, <a href="https://arxiv.org/abs/2410.13848"><b>JanusFlow</b></a>) | -->
|
||||
🤗 Online Demo (<a href="https://huggingface.co/spaces/deepseek-ai/Janus-Pro-7B"><b>Janus-Pro-7B</b></a>, <a href="https://huggingface.co/spaces/deepseek-ai/Janus-1.3B"><b>Janus</b></a>, <a href="https://huggingface.co/spaces/deepseek-ai/JanusFlow-1.3B"><b>JanusFlow</b></a>)
|
||||
🤗 在线演示(<a href="https://huggingface.co/spaces/deepseek-ai/Janus-Pro-7B"><b>Janus-Pro-7B</b></a>、<a href="https://huggingface.co/spaces/deepseek-ai/Janus-1.3B"><b>Janus</b></a>、<a href="https://huggingface.co/spaces/deepseek-ai/JanusFlow-1.3B"><b>JanusFlow</b></a>)
|
||||
</p>
|
||||
|
||||
|
||||
## News
|
||||
## 新闻
|
||||
|
||||
**2025.01.27**: Janus-Pro is released, an advanced version of Janus, improving both multimodal understanding and visual generation significantly. See [paper](./janus_pro_tech_report.pdf)
|
||||
**2025.01.27**:Janus-Pro 正式发布,这是 Janus 的进阶版本,在多模态理解与视觉生成两方面均有显著提升。详见[论文](./janus_pro_tech_report.pdf)
|
||||
|
||||
**2024.11.13**: JanusFlow is released, a new unified model with rectified flow for image generation. See [paper](https://arxiv.org/abs/2411.07975), [demo](https://huggingface.co/spaces/deepseek-ai/JanusFlow-1.3B) and [usage](https://github.com/deepseek-ai/Janus?tab=readme-ov-file#janusflow).
|
||||
**2024.11.13**:JanusFlow 正式发布,这是一款采用 rectified flow 进行图像生成的全新统一模型。详见[论文](https://arxiv.org/abs/2411.07975), [demo](https://huggingface.co/spaces/deepseek-ai/JanusFlow-1.3B) 和[用法](https://github.com/deepseek-ai/Janus?tab=readme-ov-file#janusflow).
|
||||
|
||||
**2024.10.23**: Evaluation code for reproducing the multimodal understanding results from the paper has been added to VLMEvalKit. Please refer to [this link]( https://github.com/open-compass/VLMEvalKit/pull/541).
|
||||
**2024.10.23**:用于复现论文中多模态理解评估结果的代码已加入 VLMEvalKit。请参阅[此链接]( https://github.com/open-compass/VLMEvalKit/pull/541).
|
||||
|
||||
**2024.10.20**: (1) Fix a bug in [tokenizer_config.json](https://huggingface.co/deepseek-ai/Janus-1.3B/blob/main/tokenizer_config.json). The previous version caused classifier-free guidance to not function properly, resulting in relatively poor visual generation quality. (2) Release Gradio demo ([online demo](https://huggingface.co/spaces/deepseek-ai/Janus-1.3B) and [local](#gradio-demo)).
|
||||
**2024.10.20**:(1)修复了 [tokenizer_config.json](https://huggingface.co/deepseek-ai/Janus-1.3B/blob/main/tokenizer_config.json). 中的一个 bug。先前版本导致 classifier-free guidance 无法正常工作,从而使视觉生成质量相对较差。(2)发布 Gradio 演示([在线演示](https://huggingface.co/spaces/deepseek-ai/Janus-1.3B) 和[本地](#gradio-demo))。
|
||||
|
||||
|
||||
## 1. Introduction
|
||||
## 1. 简介
|
||||
|
||||
<a href="./janus_pro_tech_report.pdf"><b>Janus-Pro: Unified Multimodal Understanding and
|
||||
Generation with Data and Model Scaling</b></a>
|
||||
<a href="./janus_pro_tech_report.pdf"><b>Janus-Pro:基于数据与模型扩展的统一多模态理解与生成</b></a>
|
||||
|
||||
**Janus-Pro** is an advanced version of the previous work Janus. Specifically, Janus-Pro incorporates (1) an optimized training strategy, (2) expanded training data, and (3) scaling to larger model size. With these improvements, Janus-Pro achieves significant advancements in both multimodal understanding and text-to-image instruction-following capabilities, while also enhancing the stability of text-to-image generation.
|
||||
**Janus-Pro** 是此前工作 Janus 的进阶版本。具体而言,Janus-Pro 引入了(1)优化的训练策略,(2)扩展的训练数据,以及(3)更大规模的模型。凭借这些改进,Janus-Pro 在多模态理解与文本到图像指令遵循能力方面均取得显著进展,同时也提升了文本到图像生成的稳定性。
|
||||
|
||||
<div align="center">
|
||||
<img alt="image" src="images/teaser_januspro.png" style="width:90%;">
|
||||
</div>
|
||||
|
||||
|
||||
<a href="https://arxiv.org/abs/2410.13848"><b>Janus: Decoupling Visual Encoding for Unified Multimodal Understanding and Generation</b></a>
|
||||
<a href="https://arxiv.org/abs/2410.13848"><b>Janus:解耦视觉编码以实现统一多模态理解与生成</b></a>
|
||||
|
||||
**Janus** is a novel autoregressive framework that unifies multimodal understanding and generation. It addresses the limitations of previous approaches by decoupling visual encoding into separate pathways, while still utilizing a single, unified transformer architecture for processing. The decoupling not only alleviates the conflict between the visual encoder’s roles in understanding and generation, but also enhances the framework’s flexibility. Janus surpasses previous unified model and matches or exceeds the performance of task-specific models. The simplicity, high flexibility, and effectiveness of Janus make it a strong candidate for next-generation unified multimodal models.
|
||||
**Janus** 是一种新颖的自回归(autoregressive)框架,将多模态理解与生成统一于一体。它通过将视觉编码解耦为独立路径,同时仍使用单一统一的 Transformer 架构进行处理,从而克服了以往方法的局限性。这种解耦不仅缓解了视觉编码器在理解与生成任务中的角色冲突,还增强了框架的灵活性。Janus 超越了此前的统一模型,并在性能上达到或超过面向特定任务的模型。Janus 的简洁性、高灵活性与有效性,使其成为下一代统一多模态模型的有力候选。
|
||||
|
||||
<div align="center">
|
||||
<img alt="image" src="images/teaser.png" style="width:90%;">
|
||||
</div>
|
||||
|
||||
<a href="https://arxiv.org/abs/2411.07975"><b>JanusFlow: Harmonizing Autoregression and Rectified Flow for Unified Multimodal Understanding and Generation</b></a>
|
||||
<a href="https://arxiv.org/abs/2411.07975"><b>JanusFlow:融合自回归与 Rectified Flow 的统一多模态理解与生成</b></a>
|
||||
|
||||
**JanusFlow** introduces a minimalist architecture that integrates autoregressive language models with rectified flow, a state-of-the-art method in generative modeling. Our key finding demonstrates that rectified flow can be straightforwardly trained within the large language model framework, eliminating the need for complex architectural modifications. Extensive experiments show that JanusFlow achieves comparable or superior performance to specialized models in their respective domains, while significantly outperforming existing unified approaches across standard benchmarks. This work represents a step toward more efficient and versatile vision-language models.
|
||||
**JanusFlow** 提出了一种极简架构,将自回归语言模型与 rectified flow(生成建模领域的先进方法)相结合。我们的关键发现表明,rectified flow 可以直接在大语言模型框架内训练,无需复杂的架构改动。大量实验表明,JanusFlow 在各自领域达到与专用模型相当甚至更优的性能,同时在标准基准测试中显著优于现有统一方法。这项工作朝着更高效、更通用的视觉-语言模型迈出了一步。
|
||||
|
||||
<div align="center">
|
||||
<img alt="image" src="images/teaser_janusflow.png" style="width:90%;">
|
||||
</div>
|
||||
|
||||
|
||||
## 2. Model Download
|
||||
## 2. 模型下载
|
||||
|
||||
We release Janus to the public to support a broader and more diverse range of research within both academic and commercial communities.
|
||||
Please note that the use of this model is subject to the terms outlined in [License section](#5-license). Commercial usage is
|
||||
permitted under these terms.
|
||||
我们公开发布 Janus,以支持学术界与商业社区中更广泛、更多样化的研究。
|
||||
请注意,本模型的使用须遵守[许可协议](#5-license)一节中的条款。在这些条款下允许商业使用。
|
||||
|
||||
### Huggingface
|
||||
|
||||
| Model | Sequence Length | Download |
|
||||
| 模型 | 序列长度 | 下载 |
|
||||
|-----------------------|-----------------|-----------------------------------------------------------------------------|
|
||||
| Janus-1.3B | 4096 | [🤗 Hugging Face](https://huggingface.co/deepseek-ai/Janus-1.3B) |
|
||||
| JanusFlow-1.3B | 4096 | [🤗 Hugging Face](https://huggingface.co/deepseek-ai/JanusFlow-1.3B) |
|
||||
@@ -117,22 +121,22 @@ permitted under these terms.
|
||||
|
||||
|
||||
|
||||
## 3. Quick Start
|
||||
## 3. 快速开始
|
||||
<details>
|
||||
<summary><h3>Janus-Pro</h3></summary>
|
||||
|
||||
### Installation
|
||||
### 安装
|
||||
|
||||
On the basis of `Python >= 3.8` environment, install the necessary dependencies by running the following command:
|
||||
在 `Python >= 3.8` 环境的基础上,运行以下命令安装所需依赖:
|
||||
|
||||
```shell
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
|
||||
### Simple Inference Example
|
||||
### 简单推理示例
|
||||
|
||||
#### Multimodal Understanding
|
||||
#### 多模态理解
|
||||
```python
|
||||
|
||||
import torch
|
||||
@@ -185,7 +189,7 @@ print(f"{prepare_inputs['sft_format'][0]}", answer)
|
||||
|
||||
```
|
||||
|
||||
#### Text-to-Image Generation
|
||||
#### 文本生成图像(Text-to-Image Generation)
|
||||
```python
|
||||
import os
|
||||
import PIL.Image
|
||||
@@ -286,11 +290,10 @@ generate(
|
||||
)
|
||||
```
|
||||
|
||||
### Gradio Demo
|
||||
We have deployed online demo in [Huggingface](https://huggingface.co/spaces/deepseek-ai/Janus-Pro-7B).
|
||||
### Gradio 演示
|
||||
我们已在 [Huggingface](https://huggingface.co/spaces/deepseek-ai/Janus-Pro-7B). 上部署了在线演示。
|
||||
|
||||
|
||||
For the local gradio demo, you can run with the following command:
|
||||
对于本地 Gradio 演示,你可以使用以下命令运行:
|
||||
|
||||
```
|
||||
pip install -e .[gradio]
|
||||
@@ -298,7 +301,7 @@ pip install -e .[gradio]
|
||||
python demo/app_januspro.py
|
||||
```
|
||||
|
||||
Have Fun!
|
||||
玩得开心!
|
||||
|
||||
</details>
|
||||
|
||||
@@ -307,18 +310,18 @@ Have Fun!
|
||||
<details>
|
||||
<summary><h3>Janus</h3></summary>
|
||||
|
||||
### Installation
|
||||
### 安装
|
||||
|
||||
On the basis of `Python >= 3.8` environment, install the necessary dependencies by running the following command:
|
||||
在 `Python >= 3.8` 环境的基础上,通过运行以下命令安装必要的依赖:
|
||||
|
||||
```shell
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
|
||||
### Simple Inference Example
|
||||
### 简单推理示例
|
||||
|
||||
#### Multimodal Understanding
|
||||
#### 多模态理解(Multimodal Understanding)
|
||||
```python
|
||||
|
||||
import torch
|
||||
@@ -371,7 +374,7 @@ print(f"{prepare_inputs['sft_format'][0]}", answer)
|
||||
|
||||
```
|
||||
|
||||
#### Text-to-Image Generation
|
||||
#### 文本生成图像
|
||||
```python
|
||||
import os
|
||||
import PIL.Image
|
||||
@@ -473,10 +476,9 @@ generate(
|
||||
```
|
||||
|
||||
### Gradio Demo
|
||||
We have deployed online demo in [Huggingface](https://huggingface.co/spaces/deepseek-ai/Janus-1.3B).
|
||||
我们已在 [Huggingface](https://huggingface.co/spaces/deepseek-ai/Janus-1.3B). 部署了在线演示。
|
||||
|
||||
|
||||
For the local gradio demo, you can run with the following command:
|
||||
对于本地 Gradio 演示,你可以使用以下命令运行:
|
||||
|
||||
```
|
||||
pip install -e .[gradio]
|
||||
@@ -484,18 +486,18 @@ pip install -e .[gradio]
|
||||
python demo/app.py
|
||||
```
|
||||
|
||||
Have Fun!
|
||||
尽情使用吧!
|
||||
|
||||
### FastAPI Demo
|
||||
It's easy to run a FastAPI server to host an API server running the same functions as gradio.
|
||||
运行 FastAPI 服务器很容易,可用于托管与 Gradio 功能相同的 API 服务。
|
||||
|
||||
To start FastAPI server, run the following command:
|
||||
要启动 FastAPI 服务器,请运行以下命令:
|
||||
|
||||
```
|
||||
python demo/fastapi_app.py
|
||||
```
|
||||
|
||||
To test the server, you can open another terminal and run:
|
||||
要测试服务器,你可以打开另一个终端并运行:
|
||||
|
||||
```
|
||||
python demo/fastapi_client.py
|
||||
@@ -505,21 +507,21 @@ python demo/fastapi_client.py
|
||||
<details>
|
||||
<summary><h3>JanusFlow</h3></summary>
|
||||
|
||||
### Installation
|
||||
### 安装
|
||||
|
||||
On the basis of `Python >= 3.8` environment, install the necessary dependencies by running the following command:
|
||||
在 `Python >= 3.8` 环境的基础上,通过运行以下命令安装必要的依赖:
|
||||
|
||||
```shell
|
||||
pip install -e .
|
||||
pip install diffusers[torch]
|
||||
```
|
||||
|
||||
### 🤗 Huggingface Online Demo
|
||||
Check out the demo in [this link](https://huggingface.co/spaces/deepseek-ai/JanusFlow-1.3B).
|
||||
### 🤗 Huggingface 在线演示
|
||||
请通过[此链接](https://huggingface.co/spaces/deepseek-ai/JanusFlow-1.3B). 查看演示。
|
||||
|
||||
### Simple Inference Example
|
||||
### 简单推理示例
|
||||
|
||||
#### Multimodal Understanding
|
||||
#### 多模态理解
|
||||
```python
|
||||
|
||||
import torch
|
||||
@@ -571,7 +573,7 @@ print(f"{prepare_inputs['sft_format'][0]}", answer)
|
||||
|
||||
```
|
||||
|
||||
#### Text-to-Image Generation
|
||||
#### 文本生成图像(Text-to-Image Generation)
|
||||
```python
|
||||
import os
|
||||
import PIL.Image
|
||||
@@ -698,7 +700,7 @@ generate(
|
||||
```
|
||||
|
||||
### Gradio Demo
|
||||
For the local gradio demo, you can run with the following command:
|
||||
对于本地 Gradio 演示,你可以使用以下命令运行:
|
||||
|
||||
```
|
||||
pip install -e .[gradio]
|
||||
@@ -706,15 +708,15 @@ pip install -e .[gradio]
|
||||
python demo/app_janusflow.py
|
||||
```
|
||||
|
||||
Have Fun!
|
||||
尽情使用吧!
|
||||
|
||||
</details>
|
||||
|
||||
## 4. License
|
||||
## 4. 许可证
|
||||
|
||||
This code repository is licensed under [the MIT License](https://github.com/deepseek-ai/DeepSeek-LLM/blob/HEAD/LICENSE-CODE). The use of Janus models is subject to [DeepSeek Model License](https://github.com/deepseek-ai/DeepSeek-LLM/blob/HEAD/LICENSE-MODEL).
|
||||
本代码仓库采用 [MIT License](https://github.com/deepseek-ai/DeepSeek-LLM/blob/HEAD/LICENSE-CODE). 授权。Janus 模型的使用须遵守 [DeepSeek Model License](https://github.com/deepseek-ai/DeepSeek-LLM/blob/HEAD/LICENSE-MODEL).
|
||||
|
||||
## 5. Citation
|
||||
## 5. 引用
|
||||
|
||||
```bibtex
|
||||
@article{chen2025janus,
|
||||
@@ -739,6 +741,6 @@ This code repository is licensed under [the MIT License](https://github.com/deep
|
||||
}
|
||||
```
|
||||
|
||||
## 6. Contact
|
||||
## 6. 联系方式
|
||||
|
||||
If you have any questions, please raise an issue or contact us at [service@deepseek.com](mailto:service@deepseek.com).
|
||||
如有任何问题,请提交 issue 或通过 [service@deepseek.com](mailto:service@deepseek.com) 联系我们。
|
||||
|
||||
Reference in New Issue
Block a user