Janus-DeepSeek
Описание
Janus-Series: Unified Multimodal Understanding and Generation Models
Языки
- Python98,5%
- Makefile1,5%
🚀 Janus-Series: Unified Multimodal Understanding and Generation Models
📥 Model Download |
⚡ Quick Start |
📜 License |
📖 Citation
🤗 Online Demo (Janus-Pro-7B, Janus, JanusFlow)
News
2025.01.27: Janus-Pro is released, an advanced version of Janus, improving both multimodal understanding and visual generation significantly. See paper
2024.11.13: JanusFlow is released, a new unified model with rectified flow for image generation. See paper, demo and usage.
2024.10.23: Evaluation code for reproducing the multimodal understanding results from the paper has been added to VLMEvalKit. Please refer to this link.
2024.10.20: (1) Fix a bug in 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 and local).
1. Introduction
Janus-Pro: Unified Multimodal Understanding and Generation with Data and Model Scaling
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: Decoupling Visual Encoding for Unified Multimodal Understanding and Generation
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.
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.
2. Model Download
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. Commercial usage is permitted under these terms.
Huggingface
| Model | Sequence Length | Download |
|---|---|---|
| Janus-1.3B | 4096 | 🤗 Hugging Face |
| JanusFlow-1.3B | 4096 | 🤗 Hugging Face |
| Janus-Pro-1B | 4096 | 🤗 Hugging Face |
| Janus-Pro-7B | 4096 | 🤗 Hugging Face |
3. Quick Start
Janus-Pro
Installation
On the basis of environment, install the necessary dependencies by running the following command:
Simple Inference Example
Multimodal Understanding
Text-to-Image Generation
Gradio Demo
We have deployed online demo in Huggingface.
For the local gradio demo, you can run with the following command:
pip install -e .[gradio]
python demo/app_januspro.py
Have Fun!
Janus
Installation
On the basis of environment, install the necessary dependencies by running the following command:
Simple Inference Example
Multimodal Understanding
Text-to-Image Generation
Gradio Demo
We have deployed online demo in Huggingface.
For the local gradio demo, you can run with the following command:
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.
To start FastAPI server, run the following command:
python demo/fastapi_app.py
To test the server, you can open another terminal and run:
python demo/fastapi_client.py
JanusFlow
Installation
On the basis of environment, install the necessary dependencies by running the following command:
🤗 Huggingface Online Demo
Check out the demo in this link.
Simple Inference Example
Multimodal Understanding
Text-to-Image Generation
Gradio Demo
For the local gradio demo, you can run with the following command:
pip install -e .[gradio]
python demo/app_janusflow.py
Have Fun!
4. License
This code repository is licensed under the MIT License. The use of Janus models is subject to DeepSeek Model License.
5. Citation
6. Contact
If you have any questions, please raise an issue or contact us at service@deepseek.com.