/ Модель

Характеристики

Контекст
16 384 токена
Лицензия
MIT
Архитектура
janus · dense
Библиотека
transformers
Опубликована
1 мар 2025

Janus-Pro-1B

Мультимодальная модель3 профессии

Janus-Pro-1B — мультимодальная модель для понимания изображений и генерации изображений по тексту.

16 850скачиваний за 30 дней16лайковвеса обновлены18 мар 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Janus-Pro-1B — мультимодальная авторегрессионная модель семейства Janus, представленная в сообществе deepseek-community. Она объединяет понимание изображений и генерацию изображений в единой модели на базе трансформера, используя отдельные визуальные пути для этих задач. Для понимания изображений применяется энкодер SigLIP-L с поддержкой входа 384 × 384 пикселя; для генерации — визуальный токенизатор с коэффициентом уменьшения разрешения 16. Модель построена на базе DeepSeek-LLM, однако README не уточняет, какой именно вариант использован в этой версии на 1B.

Модель предназначена для ответов на вопросы по изображениям и генерации изображений по текстовым запросам. Репозиторий использует библиотеку Transformers и формат Safetensors; лицензия — MIT. Карточка описывает объединённые мультимодальные возможности, но не приводит подробных результатов оценки именно этой версии.

Сценарии применения

  • ответы на вопросы по содержимому изображения
  • описание и интерпретация изображений
  • генерация изображений по текстовому запросу

Ограничения

README не приводит количественных оценок качества или подробных ограничений для версии 1B. Входное разрешение визуального энкодера указано как 384 × 384 пикселя.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

1. Introduction

Janus-Pro 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-Pro surpasses previous unified model and matches or exceeds the performance of task-specific models. The simplicity, high flexibility, and effectiveness of Janus-Pro make it a strong candidate for next-generation unified multimodal models.

Github Repository

2. Model Summary

Janus-Pro is a unified understanding and generation MLLM, which decouples visual encoding for multimodal understanding and generation. Janus-Pro is constructed based on the DeepSeek-LLM-1.5b-base/DeepSeek-LLM-7b-base.

For multimodal understanding, it uses the SigLIP-L as the vision encoder, which supports 384 x 384 image input. For image generation, Janus-Pro uses the tokenizer from here with a downsample rate of 16.

3. Usage Examples

Single Image Inference

Here is an example of visual understanding with a single image.

import torch  
from PIL import Image  
import requests  
from transformers import JanusForConditionalGeneration, JanusProcessor  

model_id = "deepseek-community/Janus-Pro-1B"

# Prepare input for generation
messages = [
    {
        "role": "user",
        "content": [
            {'type': 'image', 'url': 'http://images.cocodataset.org/val2017/000000039769.jpg'},
            {'type': 'text', 'text': "What do you see in this image?"}
        ]
    },
]

# Set generation mode to 'text' to perform text generation
processor = JanusProcessor.from_pretrained(model_id)
model = JanusForConditionalGeneration.from_pretrained(
    model_id, torch_dtype=torch.bfloat16, device_map="auto"
)

inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    generation_mode="text",
    tokenize=True,
    return_dict=True,
    return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)

output = model.generate(**inputs, max_new_tokens=40, generation_mode='text', do_sample=True)
text = processor.decode(output[0], skip_special_tokens=True)
print(text)

Text to Image generation

Janus can also generate images from prompts by simply setting the generation mode to image as shown below.

import torch
from transformers import JanusForConditionalGeneration, JanusProcessor

model_id = "deepseek-community/Janus-Pro-1B"

# Load processor and model
processor = JanusProcessor.from_pretrained(model_id)
model = JanusForConditionalGeneration.from_pretrained(
    model_id, torch_dtype=torch.bfloat16, device_map="auto"
)

messages = [
    {
        "role": "user",
        "content": [
            {"type": "text", "text": "A dog running under the rain."}
        ]
    }
]

# Apply chat template
prompt = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(
    text=prompt,
    generation_mode="image",
    return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)

# Set number of images to generate
model.generation_config.num_return_sequences = 2

outputs = model.generate(
    **inputs,
    generation_mode="image",
    do_sample=True,
    use_cache=True
)

# Decode and save images
decoded_image = model.decode_image_tokens(outputs)
images = processor.postprocess(list(decoded_image.float()), return_tensors="PIL.Image.Image")

for i, image in enumerate(images["pixel_values"]):
    image.save(f"image{i}.png")

4. License

This code repository is licensed under the MIT License. The use of Janus-Pro models is subject to DeepSeek Model License.

5. Citation

@article{chen2025janus,
  title={Janus-Pro: Unified Multimodal Understanding and Generation with Data and Model Scaling},
  author={Chen, Xiaokang and Wu, Zhiyu and Liu, Xingchao and Pan, Zizheng and Liu, Wen and Xie, Zhenda and Yu, Xingkai and Ruan, Chong},
  journal={arXiv preprint arXiv:2501.17811},
  year={2025}
}

6. Contact

If you have any questions, please raise an issue or contact us at service@deepseek.com.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Any-to-any модели пока не поддерживаются.

Класс архитектуры
JanusForConditionalGeneration
Ревизия весов
1655280

0 моделей