Skip to content

feat: support Ideogram4 in stablediffusion-ggml backend + gallery#10201

Merged
mudler merged 2 commits into
masterfrom
feat/sd-ggml-ideogram4
Jun 6, 2026
Merged

feat: support Ideogram4 in stablediffusion-ggml backend + gallery#10201
mudler merged 2 commits into
masterfrom
feat/sd-ggml-ideogram4

Conversation

@localai-bot
Copy link
Copy Markdown
Collaborator

@localai-bot localai-bot commented Jun 6, 2026

What

Adds Ideogram4 support to the stablediffusion-ggml backend and ships it in the model gallery.

Backend enablement

  1. Bump stable-diffusion.cpp 1f9ee88 -> b9254dd — the immediate next upstream commit, which is the Ideogram4 merge (leejet/stable-diffusion.cpp#1609). Clean one-commit bump, no unrelated changes.
  2. Pass through the new uncond_diffusion_model_path option in the gosd wrapper. Ideogram4 derives its classifier-free guidance from a separate unconditional diffusion model, exposed upstream via the new sd_ctx_params_t.uncond_diffusion_model_path field. The _path suffix is deliberate: the Go loader only resolves an option to an absolute model-dir path when its name contains "path", matching diffusion_model_path/high_noise_diffusion_model_path.

The other inputs (--diffusion-model, --llm, --vae) were already covered by existing options.

Gallery

Community single-file GGUFs are now published (stduhpf/ideogram-4-gguf), so the model is added to the gallery:

  • Two gallery index entries built on virtual.yaml (config inlined in overrides, no dedicated template), same pattern as the other models
  • Two index entries:
    • ideogram-4-iq4nl-ggml (4-bit, ~11.6GB diffusion)
    • ideogram-4-q8_0-ggml (8-bit, ~20GB diffusion)

Each bundles the diffusion + unconditional GGUF (stduhpf), the Qwen3-VL-8B-Instruct text encoder (unsloth), and the FLUX.2 VAE (Comfy-Org non-gated mirror). cfg_scale is 7 (real CFG, matching the upstream default) rather than 1 like the guidance-distilled Flux/Z-Image templates. Each entry repeats the full options list because gallery overrides replace the template options slice (mergo.WithOverride) rather than appending.

Testing

  • All four SIMD shared libraries (libgosd-avx{,2,512}.so, -fallback) compile cleanly against the new upstream source, including the new field. Confirmed const char* uncond_diffusion_model_path; present in upstream include/stable-diffusion.h.
  • Gallery YAML validated: parses, no new duplicate names, all 6 referenced files exist (sha256 from HF x-linked-etag), and the install-time mergo merge was simulated to confirm every path option resolves to a downloaded file.
  • Not yet runtime-tested end to end (image generation needs the multi-GB download + a GPU build); the config is statically verified.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]

… model

Bump stable-diffusion.cpp from 1f9ee88 to b9254dd, the upstream commit that
adds Ideogram4 support (leejet/stable-diffusion.cpp#1609). Ideogram4 derives
its classifier-free guidance from a separate unconditional diffusion model,
exposed upstream through the new sd_ctx_params_t.uncond_diffusion_model_path
field.

Wire that field into the gosd wrapper via a new uncond_diffusion_model_path
option. The _path suffix is deliberate: the Go loader only resolves options
whose name contains "path" to an absolute path under the model directory, so
this keeps the option consistent with diffusion_model_path and
high_noise_diffusion_model_path.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude:claude-opus-4-8 [Claude Code]
@localai-bot localai-bot changed the title feat(stablediffusion-ggml): support Ideogram4 unconditional diffusion model feat: support Ideogram4 in stablediffusion-ggml backend + gallery Jun 6, 2026
Single-file GGUF weights for Ideogram4 are now published
(stduhpf/ideogram-4-gguf), so add the model to the gallery. Ideogram4 is a
text-to-image model with strong, accurate in-image text rendering, driven by
a Qwen3-VL-8B text encoder and real classifier-free guidance from a separate
unconditional diffusion model (the uncond_diffusion_model_path support added
in the preceding commit).

Two index entries, both built on gallery/virtual.yaml with the full config
inlined in overrides (same pattern as the other models, no dedicated template
file):
- ideogram-4-iq4nl-ggml (4-bit, ~11.6GB diffusion)
- ideogram-4-q8_0-ggml  (8-bit, ~20GB diffusion)

Each bundles the diffusion + unconditional GGUF (stduhpf), the
Qwen3-VL-8B-Instruct text encoder (unsloth), and the FLUX.2 VAE (Comfy-Org
mirror, non-gated). cfg_scale is 7 to match the upstream Ideogram4 default,
since it performs real CFG unlike the guidance-distilled Flux/Z-Image models.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude:claude-opus-4-8 [Claude Code]
@mudler mudler force-pushed the feat/sd-ggml-ideogram4 branch from e3096f8 to 070e001 Compare June 6, 2026 17:48
@mudler mudler merged commit f64b72d into master Jun 6, 2026
114 of 118 checks passed
@mudler mudler deleted the feat/sd-ggml-ideogram4 branch June 6, 2026 20:50
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