Instructions to use TheHuggerFacer/Pyramid-Flow-100M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheHuggerFacer/Pyramid-Flow-100M with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheHuggerFacer/Pyramid-Flow-100M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download README.md from TheHuggerFacer/Pyramid-Flow-100M: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/TheHuggerFacer/Pyramid-Flow-100M/resolve/main/README.md
- Command line
-
hf download hf://TheHuggerFacer/Pyramid-Flow-100M/README.md
-
curl -L -o README.md https://huggingface.co/TheHuggerFacer/Pyramid-Flow-100M/resolve/main/README.md
library_name: transformers
pipeline_tag: text-to-image
tags:
- text-to-image
- custom_code
Pyramid Flow 100M
Pyramid Flow generates 256 × 256 RGB images from English prompts. The model runs on CPU or CUDA with Hugging Face Transformers. It uses the T5-base text encoder and the SD-VAE decoder, which download separately on first use.
Generate an image
Install the dependencies in requirements.txt, then run the following Python example.
import torch
from transformers import AutoModel
repo = "TheHuggerFacer/Pyramid-Flow-100M"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModel.from_pretrained(repo, trust_remote_code=True).eval().to(device)
image = model.generate_image(
"A clockwork owl perched on a brass telescope, studio photograph",
seed=42,
num_inference_steps=20,
guidance_scale=4.0,
)[0]
image.save("clockwork-owl.png")
Pass a list of prompts to generate a batch. The method returns one PIL image per prompt. A fixed seed makes it easier to compare prompts on the same device. A guidance scale of 1 uses the conditional prediction directly. Object counts, spatial relations and fine details can be inconsistent.
The text encoder and decoder are distributed separately under their respective terms. T5-base · SD-VAE
The inference implementation uses attention, rotary embeddings and timestep components adapted from tinydit.