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/sampler_configs.py from Infini-Srr/Ideogram-4: direct link, hf CLI and curl.
- Browser
- Download file 773 Bytes
-
https://huggingface.co/Infini-Srr/Ideogram-4/resolve/main/reference/official-inference/src/ideogram4/sampler_configs.py
- Command line
-
hf download hf://Infini-Srr/Ideogram-4/reference/official-inference/src/ideogram4/sampler_configs.py
-
curl -L -o sampler_configs.py https://huggingface.co/Infini-Srr/Ideogram-4/resolve/main/reference/official-inference/src/ideogram4/sampler_configs.py
773 Bytes
| """Named sampler configurations for Ideogram 4 inference.""" | |
| from __future__ import annotations | |
| from ideogram4.scheduler import SamplerParameters | |
| # guidance_schedule is in loop-INDEX order: index 0 is the LAST (polish) step. | |
| # Each preset does the first N_main sampling steps at gw=7, then N_cleanup | |
| # polish steps at gw=3. | |
| PRESETS: dict[str, SamplerParameters] = { | |
| "V4_QUALITY_48": SamplerParameters( | |
| num_steps=48, | |
| guidance_schedule=(3.0,) * 3 + (7.0,) * 45, | |
| mu=0.0, | |
| std=1.5, | |
| ), | |
| "V4_DEFAULT_20": SamplerParameters( | |
| num_steps=20, | |
| guidance_schedule=(3.0,) * 2 + (7.0,) * 18, | |
| mu=0.0, | |
| std=1.75, | |
| ), | |
| "V4_TURBO_12": SamplerParameters( | |
| num_steps=12, | |
| guidance_schedule=(3.0,) * 1 + (7.0,) * 11, | |
| mu=0.5, | |
| std=1.75, | |
| ), | |
| } | |