Ana içeriğe geç

Janus-Pro

Model Source Revision Weight license Parity (CPU, fp32)
janus-pro-1b deepseek-community/Janus-Pro-1B 1655280 DeepSeek Model License Verified
janus-pro-7b deepseek-community/Janus-Pro-7B 8f23139 DeepSeek Model License Verified

Catalog: janus-pro · Models: janus-pro-1b, janus-pro-7b · Task: t2i

Architecture. The DeepSeek LLM tokenizer renders the prompt through a chat template ending in the image-start token. The 1B checkpoint uses a 24-layer Llama with hidden size 2048; the 7B checkpoint uses 30 layers with hidden size 4096. It autoregressively generates 576 image tokens, applying classifier-free guidance over the logits. Model-specific special-token ids, which differ between the two checkpoints, are read from each checkpoint's config. A LlamaGen VQ-16 decoder produces the fixed 384×384 image.

Usage.

python -m imagehub.pretrained janus-pro-1b checkpoints/janus-pro-1b
from imagehub import pipeline

with pipeline(
    "t2i", backend="janus-pro-1b", model="checkpoints/janus-pro-1b", device="mps"
) as pipe:
    result = pipe("a cat, oil painting", seed=42)
    result.images[0].save("cat.png")

Settings. The supported options are guidance (5), temperature (1.0), do_sample (True), num_images and seed. The output size is fixed at 384×384. Unrecognized settings raise an error.

Seed compatibility. On CPU, seed 42 produces the same image tokens and pixels as transformers 5.18.0 JanusForConditionalGeneration.generate(generation_mode="image") (validation). MPS and CUDA runs are smoke tests only; there is no claim of exact equality on these devices.

Out of scope. Image understanding and variable output sizes are not supported.

License. The original Janus code is licensed under MIT. The weights are under the DeepSeek Model License; see the license. imagehub does not distribute weights.