Instructions to use ideogram-ai/ideogram-4-nf4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ideogram-ai/ideogram-4-nf4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ideogram-ai/ideogram-4-nf4", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Unable to run Ideogram 4 NF4 on ComfyUI
Hi,
I am trying to run this in ComfyUI (With SageAttention2++ patched and torch.compile) cu130
With the official NF4 node by comfyanonymou[[[[s
RuntimeError: shape '[1, 0, 2, 2, 131, 131]' is invalid for input of size 2196608
For me it also throws and error:
RuntimeError: Error(s) in loading state_dict for Ideogram4Transformer2DModel: size mismatch for input_proj.weight: copying a param with shape torch.Size([294912, 1]) from checkpoint, the shape in current model is torch.Size([4608, 1]). size mismatch for llm_cond_proj.weight: copying a param with shape torch.Size([122683392, 1]) from checkpoint, the shape in current model is torch.Size([4608, 53248]). size mismatch for t_embedding.mlp_in.weight: copying a param with shape torch.Size([10616832, 1]) from checkpoint, the shape in current model is torch.Size([4608, 4608]). size mismatch for t_embedding.mlp_out.weight: copying a param with shape torch.Size([10616832, 1]) from checkpoint, the shape in current model is torch.Size([4608, 4608]). size mismatch for adaln_proj.weight: copying a param with shape torch.Size([1179648, 1]) from checkpoint, the shape in current model is torch.Size([512, 4608]). size mismatch for layers.0.attention.qkv.weight: copying a param with shape torch.Size([31850496, 1]) from checkpoint, the shape in current model is torch.Size([13824, 4608]). size mismatch for layers.0.attention.o.weight: copying a param with shape torch.Size([10616832, 1]) from checkpoint, the shape in current model is torch.Size([4608, 4608]). size mismatch for layers.0.feed_forward.w1.weight: copying a param with shape torch.Size([28311552, 1]) from checkpoint, the shape in current model is torch.Size([12288, 4608]). size mismatch for layers.0.feed_forward.w2.weight: copying a param with shape
I'm sad with it, now downloading FP8 to see if the problem disappears