Principle:Deepseek ai Janus Prompt Formatting for Flow Generation
| Knowledge Sources | |
|---|---|
| Domains | NLP, Image_Generation |
| Last Updated | 2026-02-10 09:30 GMT |
Overview
A procedure for formatting text prompts into the JanusFlow SFT template with the image start token for rectified flow generation.
Description
Prompt formatting for JanusFlow rectified flow generation follows the same pattern as autoregressive generation: the conversation is formatted using the DeepSeek SFT template, then the image_start_tag is appended. The JanusFlow processor additionally defines an image_gen_tag property for the generation trigger token, though in practice image_start_tag ("<begin_of_image>") is used to signal generation start.
The key difference from autoregressive generation is conceptual: in JanusFlow, this prompt will condition a continuous denoising process (rectified flow ODE) rather than discrete token sampling.
Usage
Use this principle at the start of the JanusFlow rectified flow generation pipeline, after loading the model and before CFG input preparation.
Theoretical Basis
The prompt format is identical to autoregressive generation:
- SFT template application: "<|User|>: {prompt}\n\n<|Assistant|>:"
- Generation trigger: append "<begin_of_image>"
The resulting tokenized prompt provides the text conditioning for the rectified flow denoising process.