Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Deepseek ai Janus Prompt Formatting for Flow Generation

From Leeroopedia


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:

  1. SFT template application: "<|User|>: {prompt}\n\n<|Assistant|>:"
  2. Generation trigger: append "<begin_of_image>"

The resulting tokenized prompt provides the text conditioning for the rectified flow denoising process.

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment