Skip to content

Add Ideogram-4 diffusion model architecture support#455

Open
fxd0h wants to merge 1 commit into
city96:mainfrom
fxd0h:add-ideogram4-arch
Open

Add Ideogram-4 diffusion model architecture support#455
fxd0h wants to merge 1 commit into
city96:mainfrom
fxd0h:add-ideogram4-arch

Conversation

@fxd0h

@fxd0h fxd0h commented Jun 7, 2026

Copy link
Copy Markdown

ComfyUI core already ships Ideogram-4 support, but the GGUF loader does not recognise the architecture, so its GGUF files fail with Unknown model architecture!. This adds the missing detection layer.

Changes

  • tools/convert.py: a ModelIdeogram4 template, detected by the combination of embed_image_indicator.weight (the same discriminator core uses), input_proj.weight and layers.0.attention.qkv.weight.
  • loader.py: "ideogram4" added to IMG_ARCH_LIST.

Notes

  • No tensor remapping is required: the GGUF tensor names already match comfy/ldm/ideogram4/model.py.
  • No new quantisation support is needed: the files in circulation use BF16, Q8_0 and IQ4_NL, all already handled by dequant.py.
  • Follows the pattern of the existing architecture additions (Wan, HiDream, Cosmos, Qwen3, Gemma3).

Context

There is no official Ideogram-4 GGUF yet; the available files (stduhpf, leejet) are sd.cpp-style exports without general.architecture metadata, which fall through to detect_arch. This change is what allows that path to resolve.

Testing

Verified on Apple Silicon (M-series, MPS, torch 2.12): detect_arch returns ideogram4, the model loads in sd.cpp compatibility mode and generates end to end.

Part of #454.

Developed with AI assistance; the diff and test results above were verified on-device before submission.

ComfyUI core already ships Ideogram-4 (comfy/ldm/ideogram4/,
model_detection.py, supported_models.py). This adds the GGUF detection
layer so Ideogram-4 GGUF files load via UnetLoaderGGUF instead of
failing with "Unknown model architecture!".

- tools/convert.py: ModelIdeogram4, detected by the combination of
  embed_image_indicator.weight (the discriminator core uses),
  input_proj.weight and layers.0.attention.qkv.weight
- loader.py: "ideogram4" added to IMG_ARCH_LIST

No tensor remapping is needed (GGUF tensor names already match core)
and the quants in circulation (BF16/Q8_0/IQ4_NL) are already supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant