Skip to content

Add Ideogram-4 diffusion model architecture support#5

Merged
fractal-fumbler merged 3 commits into
fractal-fumbler:mainfrom
fxd0h:main
Jun 21, 2026
Merged

Add Ideogram-4 diffusion model architecture support#5
fractal-fumbler merged 3 commits into
fractal-fumbler:mainfrom
fxd0h:main

Conversation

@fractal-fumbler

Copy link
Copy Markdown
Owner

fxd0h added 3 commits June 7, 2026 19:27
A quantized GGMLTensor is backed by packed uint8 storage, so
weight.dtype returns torch.uint8. Models that do x.to(weight.dtype)
before a linear (Ideogram-4, Gemma-4, Qwen3.5, CogVideo, some VAEs)
cast activations to uint8, corrupting them and breaking F.linear on
MPS, which requires floating-point inputs.

GGMLTensor.dtype now returns bfloat16 for quantized tensors; F16/F32
and unquantized tensors keep their real storage dtype. A loader-set
compute_dtype takes precedence. Dequant paths read storage via .data
and are unaffected.

Regression-tested loading WAN 2.2 I2V A14B Q8_0 (1095 tensors) on MPS.
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.
@fractal-fumbler
fractal-fumbler merged commit 471df70 into fractal-fumbler:main Jun 21, 2026
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.

2 participants