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
File size: 773 Bytes
8ebf922 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | """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,
),
}
|