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: 1,304 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | # Development
## Editable install
We recommend installing into an isolated environment — the dependencies include several GB of CUDA-built wheels.
```bash
python -m venv .venv && source .venv/bin/activate
```
For development, install the package in editable mode so changes to the source
tree are picked up without reinstalling:
```bash
pip install -e .
```
or with [`uv`](https://docs.astral.sh/uv/):
```bash
uv venv && source .venv/bin/activate
```
```bash
uv pip install -e .
```
## Pre-commit hooks
This repo uses [pre-commit](https://pre-commit.com/) to run lint, format, and
type checks (`ruff`, `mypy`, etc.) before each commit.
Install once per clone:
```bash
pip install pre-commit
pre-commit install
```
`pre-commit install` registers a git hook in `.git/hooks/pre-commit`, so it
requires the directory to be a git repo. The hooks now run automatically on
`git commit` against staged files.
To run the hooks manually against every file in the repo (useful right after
the first install, or in CI):
```bash
pre-commit run --all-files
```
The first run downloads each hook's environment (ruff, mypy, etc.) into
`~/.cache/pre-commit/` and may take a minute. Subsequent runs are fast.
To bump pinned hook versions in `.pre-commit-config.yaml`:
```bash
pre-commit autoupdate
```
|