Add Ideogram-4 diffusion model architecture support#455
Open
fxd0h wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: aModelIdeogram4template, detected by the combination ofembed_image_indicator.weight(the same discriminator core uses),input_proj.weightandlayers.0.attention.qkv.weight.loader.py:"ideogram4"added toIMG_ARCH_LIST.Notes
comfy/ldm/ideogram4/model.py.dequant.py.Context
There is no official Ideogram-4 GGUF yet; the available files (stduhpf, leejet) are sd.cpp-style exports without
general.architecturemetadata, which fall through todetect_arch. This change is what allows that path to resolve.Testing
Verified on Apple Silicon (M-series, MPS, torch 2.12):
detect_archreturnsideogram4, 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.