Skip to main content
HyperGen

Welcome to HyperGen

HyperGen is an optimized inference and fine-tuning framework for image & video diffusion models. Train LoRAs in just 5 lines of code, or serve models with an OpenAI-compatible API.

Quick Start

Get started with HyperGen in under 5 minutes

Train LoRAs

Learn how to train LoRA adapters for diffusion models

Serve Models

Deploy models with OpenAI-compatible API

API Reference

Explore the Python and HTTP APIs

Features

Train LoRAs in just 5 lines of code. No complex configurations or lengthy notebooks required.
from hypergen import model, dataset

m = model.load("stabilityai/stable-diffusion-xl-base-1.0")
ds = dataset.load("./my_images")
lora = m.train_lora(ds, steps=1000)
Serve models with a production-ready API that’s compatible with OpenAI’s image generation API.
hypergen serve stabilityai/stable-diffusion-xl-base-1.0 --api-key your-key
Works with any diffusion model from HuggingFace:
  • FLUX.1
  • Stable Diffusion XL
  • Stable Diffusion 3
  • CogVideoX (video)
  • And more…
Optimized for speed and memory efficiency:
  • Automatic mixed precision
  • Gradient checkpointing
  • Flash Attention support
  • Request queuing and batching

Installation

pip install hypergen

Quick Example

Here’s how simple it is to train a LoRA:
from hypergen import model, dataset

# Load model
m = model.load("stabilityai/stable-diffusion-xl-base-1.0")
m.to("cuda")

# Load dataset
ds = dataset.load("./my_images")

# Train LoRA
lora = m.train_lora(ds, steps=1000)
And to serve a model:
hypergen serve stabilityai/stable-diffusion-xl-base-1.0 \
  --api-key token-abc123 \
  --port 8000

Next Steps

Installation Guide

Detailed installation instructions and requirements

Training Tutorial

Learn how to train your first LoRA

Serving Guide

Deploy models in production

Supported Models

Browse all supported model architectures

Community

GitHub

Star us on GitHub

PyPI

View on PyPI

Examples

Browse code examples