Instructions to use Infini-Srr/Ideogram-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Infini-Srr/Ideogram-4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Infini-Srr/Ideogram-4", 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
Preserve pinned official Ideogram 4 FP8 release, components, original terms and reference code
8ebf922 verified Download reference/official-inference/src/ideogram4/constants.py from Infini-Srr/Ideogram-4: direct link, hf CLI and curl.
- Browser
- Download file 462 Bytes
-
https://huggingface.co/Infini-Srr/Ideogram-4/resolve/main/reference/official-inference/src/ideogram4/constants.py
- Command line
-
hf download hf://Infini-Srr/Ideogram-4/reference/official-inference/src/ideogram4/constants.py
-
curl -L -o constants.py https://huggingface.co/Infini-Srr/Ideogram-4/resolve/main/reference/official-inference/src/ideogram4/constants.py
462 Bytes
| SEQUENCE_PADDING_INDICATOR = -1 | |
| OUTPUT_IMAGE_INDICATOR = 2 | |
| LLM_TOKEN_INDICATOR = 3 | |
| # Image grid coordinates start at this offset so they never collide with text token indices | |
| # (text positions start at 0 and never exceed max_text_tokens, which is well below this). | |
| IMAGE_POSITION_OFFSET = 65536 | |
| # Layers of Qwen3-VL whose hidden states are concatenated and fed to the transformer. | |
| QWEN3_VL_ACTIVATION_LAYERS = (0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 35) | |