mirror of
https://github.com/deepseek-ai/Janus.git
synced 2026-11-05 00:57:18 +00:00
[GH-ISSUE #221] Does Janus' image generation mode support multi-modal input? #181
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/Janus#181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Dswn888 on GitHub (Jul 6, 2025).
Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/221
Hi @learningpro @gnobitab @TheOneTrueGuy @mowentian @soloice , thanks for your excellent work!
I recently tried to use Janus for image generation.
In addition to providing text prompts, I also provided other images as part of the prompt. However, in the official implementation of Janus by transformers, I found the following code in the definition of JanusProcessor, which seems to mean that when generating images, the processor does not process the image elements in the input? So it seems that in image generation mode, the model only processes unimodal text prompts?
Therefore, I hope to confirm with the official whether the image generation part of Janus supports multimodal input?
@avoroshilov commented on GitHub (Jul 28, 2025):
I would like to understand this use case as well.
The Janus-Pro paper states in Figure 3 that, while for "Understanding" (effectively, text generation) and for "Image Generation", different image encoders should be used, the Image Generation conditioned on another image should be possible. The reason why
transformersimplementation has this limitation is exactly because you shouldn't pass an image through the "Understanding Encoder" for the image generation task.Which means you need to pass it through the "Generation Encoder". Alas, there is not much detail on how exactly we do that.
Unfortunately, trying to do this manually doesn't yield any meaningful result. This script below works for regular Text2Image if I switch the
DBG_SKIP_IMAGES = Truewhich shows that it's generally working, but no matter how I construct the prompt, I cannot get meaningful images generated when injecting theimage_embedsinto the concatenated embeddings tensor.