Skip to main content

Command Line Options

Basic Syntax

Required Arguments

string
required
HuggingFace model ID or local path to model.Examples:

Server Options

string
default:"0.0.0.0"
Host address to bind the server to.
  • 0.0.0.0 - Listen on all interfaces (accessible externally)
  • 127.0.0.1 - Localhost only (more secure for development)
  • Specific IP - Bind to a specific network interface
Examples:
int
default:8000
Port to bind the server to.Examples:
Make sure the port is not already in use. Check with: lsof -i :8000

Model Configuration

string
default:"float16"
Data type for model weights.Options:
  • float16 / fp16 - Half precision (recommended for most GPUs)
  • bfloat16 / bf16 - Brain float 16 (better for FLUX, requires Ampere+ GPUs)
  • float32 / fp32 - Full precision (highest quality, most VRAM)
Examples:
Use bfloat16 for FLUX models and float16 for SDXL/SD3.
string
default:"cuda"
Device to run the model on.Options:
  • cuda - NVIDIA GPU (recommended)
  • cpu - CPU only (very slow)
  • mps - Apple Silicon GPU (experimental)
  • cuda:0, cuda:1, etc. - Specific GPU
Examples:
CPU inference is extremely slow and not recommended for production.
string
default:null
Path to LoRA weights to load at startup.Examples:
The server will load the LoRA weights from the specified directory. The directory should contain adapter_config.json and adapter_model.safetensors.

Authentication

string
default:null
API key for authentication. If set, all requests must include this key.Examples:
Client usage:
Always use API keys in production! Without authentication, anyone can access your server.

Queue Configuration

int
default:100
Maximum number of requests that can be queued.When the queue is full, new requests return HTTP 503 (Service Unavailable).Examples:
Larger queues can handle traffic spikes but use more memory. Tune based on your expected load.
int
default:1
Maximum number of requests to process in a single batch.
Batch processing is not fully implemented yet. This parameter is reserved for Phase 2.
Future usage:

Development Options

boolean
default:false
Enable auto-reload on code changes (development only).Example:
Only use --reload in development. It will restart the server on any code change, which is slow and not suitable for production.

Configuration Examples

Local Development

  • No authentication
  • Localhost only
  • Default settings

Production Deployment

  • External access
  • Secure API key
  • Optimized settings

High-Quality FLUX Server

  • BFloat16 for best quality
  • Authentication enabled
  • Moderate queue size

Multi-Model Setup

Run multiple servers on different ports:

With LoRA

Behind Reverse Proxy

Nginx configuration:

Environment Variables

While HyperGen doesn’t use environment variables for configuration, you can use them in your commands:

systemd Service

For production deployments on Linux:
Enable and start:

Docker Deployment

Example Dockerfile:
Build and run:

Best Practices

Security

  • Always use API keys in production
  • Run behind HTTPS (nginx/caddy)
  • Use firewall rules
  • Don’t expose directly to internet

Performance

  • Use float16 for most models
  • Use bfloat16 for FLUX
  • Tune queue size based on traffic
  • Monitor GPU memory usage

Reliability

  • Use systemd for auto-restart
  • Set up health check monitoring
  • Log to files for debugging
  • Set up alerts for errors

Scalability

  • Use reverse proxy for load balancing
  • Run multiple servers for different models
  • Cache frequently used models
  • Monitor queue sizes

Next Steps

Quick Start

Start your first server

Overview

Understand the architecture

Supported Models

See compatible models

Examples

Client code examples