ONNX Model Zoo

AXERA-TECH/Janus-Pro-1B

By AXERA-TECH · ↓ 6 · ♥ 2 · Updated 2025-04-14

What's in this repo

This page lists the files in AXERA-TECH/Janus-Pro-1B, including gen_aligner.onnx, gen_vision_model_decode_sim.onnx, post_head.onnx and more.

  • 4 ONNX models (.onnx files)
  • 48 files, including 26 .axmodel, 7 .json, 4 .onnx, 3 .npy, 2 .jpg, 2 .py
  • Last updated 2025-04-14

ONNX files

File Size Download
img_gen_onnx/gen_aligner.onnx — Download
img_gen_onnx/gen_vision_model_decode_sim.onnx — Download
img_gen_onnx/post_head.onnx — Download
img_gen_onnx/post_norm.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Janus-Pro-1B-Int8

This version of Janus-Pro-1B has been converted to run on the Axera NPU using w8a16 quantization.

This model has been optimized with the following LoRA:

Compatible with Pulsar2 version: 3.4

Convert tools links:

For those who are interested in model conversion, you can try to export axmodel through the original repo : https://huggingface.co/deepseek-ai/Janus-Pro-1B

Support Platform

chips image encoder 384 ttft w8a16
AX650 142.682 ms 4560.214 ms 11.43 tokens/sec

How to use

Download all files from this repository to the device.

Using AX650 Board

root@ax650 ~/yongqiang/push_hugging_face/Janus-Pro-1B # tree -L 1
.
├── assets
├── config.json
├── embeds
├── img_gen_onnx
├── imgs
├── infer_axmodel_gen.py
├── infer_axmodel_und.py
├── janus_pro_1b_axmodel
├── janus_pro_1b_tokenizer
├── README.md
└── vit_axmodel

8 directories, 3 files
Install janus
$ git clone https://github.com/deepseek-ai/Janus
$ cd Janus
$ pip3 install -e .
Inference with AX650 Host, such as M4N-Dock(爱芯派Pro) or AX650N DEMO Board

Multimodal Understanding

input text:

Please describe the picture.
  • input image

log information:

root@ax650 ~/yongqiang/push_hugging_face/Janus-Pro-1B # python3 infer_axmodel_und.py --tokenizer_dir janus_pro_1b_tokenizer --axmodel_path janus_pro_1b_axmodel --vit_axmodel_path vit_axmodel/janus_warp_vit.axmodel -i ./imgs/image.png
[INFO] Available providers:  ['AxEngineExecutionProvider']
[INFO] Chip type: ChipType.MC50
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Engine version: 2.11.0a
vit_output.shape is (1, 576, 2048), vit feature extract done!
Init InferenceSession: 100%|██████████████████████████████████████████████████████████| 24/24 [00:04<00:00,  4.94it/s]
model load done!
prefill done!
Decoder:  62%|█████████████████████████████████████████▍                         | 634/1024 [00:00<00:00, 2505.28it/s]Decoder:  72%|█████████████████████████████████████████████████▉                   | 741/1024 [00:19<00:10, 27.69it/s]hit eos!
Decoder:  74%|███████████████████████████████████████████████████▎                 | 762/1024 [00:23<00:08, 31.84it/s]
Janus Answers:  The image depicts three astronauts standing in a lush, green forest. They are wearing traditional white space suits with various patches and equipment attached. The suits have a reflective visor on their helmets, and they appear to be in a relaxed pose, with one astronaut raising his arms and the others standing or crouching. The forest is dense with tall trees and dense foliage, creating a serene and somewhat mysterious atmosphere.

Text-to-Image Generation

input text:

"A close-up high-contrast photo of Sydney Opera House sitting next to Eiffel tower, under a blue night sky of roiling energy, exploding yellow stars, and radiating swirls of blue."

log information:

root@ax650 ~/yongqiang/push_hugging_face/Janus-Pro-1B # python3 infer_axmodel_gen.py --tokenizer_dir janus_pro_1b_tokenizer/ --axmodel_path janus_pro_1b_axmodel/
[INFO] Available providers:  ['AxEngineExecutionProvider']
Init InferenceSession:   0%|                                                                   | 0/24 [00:00<?, ?it/s][INFO] Chip type: ChipType.MC50
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Engine version: 2.11.0a
Init InferenceSession: 100%|██████████████████████████████████████████████████████████| 24/24 [00:14<00:00,  1.68it/s]
2025-04-14 15:55:23.408 | INFO     | __main__:<module>:269 - model load done!
2025-04-14 15:55:33.104 | DEBUG    | __main__:generate:158 - prefill completed!
ImageToken:  18%|████████████                                                       | 104/575 [00:39<02:58,  2.64it/s]ImageToken:  45%|██████████████████████████████▍                                    | 261/575 [01:39<01:58,  2.65it/s]ImageToken:  73%|████████████████████████████████████████████████▊                  | 419/575 [02:39<00:58,  2.66it/s]ImageToken: 100%|███████████████████████████████████████████████████████████████████| 575/575 [03:38<00:00,  2.63it/s]

output image

Model info

onnx DeepSeek Janus-Pro-1B visual-question-answering en zh base_model:deepseek-ai/Janus-Pro-1B base_model:quantized:deepseek-ai/Janus-Pro-1B license:mit region:us
↓ 6 ♥ 2

Created: 2025-04-10

Updated: 2025-04-14

View on Hugging Face

Files (48)

.gitattributes
README.md
assets/gen_out_img.jpg
config.json
embeds/codebook_entry_embedding.npy
embeds/codebook_entry_embedding.pt
embeds/gen_embed.npy
img_gen_onnx/gen_aligner.onnx ONNX
img_gen_onnx/gen_vision_model_decode_sim.onnx ONNX
img_gen_onnx/post_head.onnx ONNX
img_gen_onnx/post_norm.onnx ONNX
imgs/image.jpg
imgs/image.png
infer_axmodel_gen.py
infer_axmodel_und.py
janus_pro_1b_axmodel/llama_p640_l0_together.axmodel
janus_pro_1b_axmodel/llama_p640_l10_together.axmodel
janus_pro_1b_axmodel/llama_p640_l11_together.axmodel
janus_pro_1b_axmodel/llama_p640_l12_together.axmodel
janus_pro_1b_axmodel/llama_p640_l13_together.axmodel
janus_pro_1b_axmodel/llama_p640_l14_together.axmodel
janus_pro_1b_axmodel/llama_p640_l15_together.axmodel
janus_pro_1b_axmodel/llama_p640_l16_together.axmodel
janus_pro_1b_axmodel/llama_p640_l17_together.axmodel
janus_pro_1b_axmodel/llama_p640_l18_together.axmodel
janus_pro_1b_axmodel/llama_p640_l19_together.axmodel
janus_pro_1b_axmodel/llama_p640_l1_together.axmodel
janus_pro_1b_axmodel/llama_p640_l20_together.axmodel
janus_pro_1b_axmodel/llama_p640_l21_together.axmodel
janus_pro_1b_axmodel/llama_p640_l22_together.axmodel
janus_pro_1b_axmodel/llama_p640_l23_together.axmodel
janus_pro_1b_axmodel/llama_p640_l2_together.axmodel
janus_pro_1b_axmodel/llama_p640_l3_together.axmodel
janus_pro_1b_axmodel/llama_p640_l4_together.axmodel
janus_pro_1b_axmodel/llama_p640_l5_together.axmodel
janus_pro_1b_axmodel/llama_p640_l6_together.axmodel
janus_pro_1b_axmodel/llama_p640_l7_together.axmodel
janus_pro_1b_axmodel/llama_p640_l8_together.axmodel
janus_pro_1b_axmodel/llama_p640_l9_together.axmodel
janus_pro_1b_axmodel/llama_post.axmodel
janus_pro_1b_axmodel/model.embed_tokens.weight.npy
janus_pro_1b_tokenizer/config.json
janus_pro_1b_tokenizer/preprocessor_config.json
janus_pro_1b_tokenizer/processor_config.json
janus_pro_1b_tokenizer/special_tokens_map.json
janus_pro_1b_tokenizer/tokenizer.json
janus_pro_1b_tokenizer/tokenizer_config.json
vit_axmodel/janus_warp_vit.axmodel

Related models