For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Python module
max.pipelines.architectures.ideogram4
Ideogram 4 flow-matching text-to-image architecture.
Ideogram4ArchConfigβ
class max.pipelines.architectures.ideogram4.Ideogram4ArchConfig(*, pipeline_config: 'PipelineConfig')
Bases: ArchConfig
-
Parameters:
-
pipeline_config (PipelineConfig)
get_max_seq_len()β
get_max_seq_len()
Returns the default maximum sequence length for the model.
Subclasses should determine whether this value can be overridden by
setting the --max-length (pipeline_config.model.max_length) flag.
-
Return type:
initialize()β
classmethod initialize(pipeline_config, model_config=None)
Initialize the config from a PipelineConfig.
-
Parameters:
-
- pipeline_config (PipelineConfig) β The pipeline configuration.
- model_config (MAXModelConfig | None) β The model configuration to read from. When
None(the default),pipeline_config.modelis used. Pass an explicit config (e.g.pipeline_config.draft_model) to initialize the arch config for a different model.
-
Return type:
pipeline_configβ
pipeline_config: PipelineConfig
Ideogram4Configβ
class max.pipelines.architectures.ideogram4.Ideogram4Config(*, config_file=None, section_name=None, emb_dim=4608, num_layers=34, num_heads=18, intermediate_size=12288, adaln_dim=512, norm_eps=1e-05, in_channels=128, llm_features_dim=53248, rope_theta=5000000.0, mrope_section=(24, 20, 20), dtype=bfloat16, device=<factory>)
Bases: MAXModelConfigBase
Architecture parameters for Ideogram4Transformer2DModel.
Defaults mirror ideogram-ai/ideogram-4-fp8 transformer/config.json
and the reference ideogram4.modeling_ideogram4.Ideogram4Config.
-
Parameters:
adaln_dimβ
adaln_dim: int
deviceβ
device: DeviceRef
dtypeβ
dtype: DType
emb_dimβ
emb_dim: int
head_dimβ
property head_dim: int
in_channelsβ
in_channels: int
initialize_from_config()β
classmethod initialize_from_config(config_dict, encoding, devices)
intermediate_sizeβ
intermediate_size: int
llm_features_dimβ
llm_features_dim: int
model_configβ
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'strict': False}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
mrope_sectionβ
norm_epsβ
norm_eps: float
num_headsβ
num_heads: int
num_layersβ
num_layers: int
rope_thetaβ
rope_theta: float
Ideogram4Transformer2DModelβ
class max.pipelines.architectures.ideogram4.Ideogram4Transformer2DModel(config)
Bases: Module
Ideogram 4 flow-matching transformer producing velocity predictions.
-
Parameters:
-
config (Ideogram4Config)
forward()β
forward(*args)
Defines the computation performed by the module.
Users must override this method in their subclass to define the moduleβs computation.
-
Parameters:
-
- *args (Tensor) β Positional arguments for the computation.
- **kwargs β Keyword arguments for the computation.
-
Returns:
-
The result of applying the module to the input.
-
Raises:
-
NotImplementedError β If the subclass does not override this method.
-
Return type:
input_types()β
input_types()
-
Return type:
-
tuple[TensorType, β¦]
Ideogram4TransformerModelβ
class max.pipelines.architectures.ideogram4.Ideogram4TransformerModel(config, encoding, devices, weights)
Bases: ComponentModel
Loads + adapts one Ideogram 4 DiT checkpoint (cond or uncond branch).
-
Parameters:
load_model()β
load_model()
Adapt the checkpoint into a bf16 state dict (no standalone compile).
The actual graph compilation happens once in the pipeline, where both branches are fused into a single denoise-step graph.
-
Return type:
-
None
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!