hypergan-model/1 + HNDL
Declare data, priors, multi-port HNDL networks (or custom PyTorch nn.Modules), losses, and evaluations in versioned TOML with static shape verification before allocating a GPU.
Declarative hypergan-model/1 TOML configs, pure HNDL neural network graphs,
ParticleGAN unified_v12 optimization, a real-time Foldlite DB Web Observatory,
and standalone generator export from one CLI and typed Python API.
128×128 HNDL particle colorizer · 16 draws · exact 7-face polytope luminance lock · packaged in the wheel as colorization-128.
2× RTX A6000 · ParticleGAN 0.9.7 BISPF · step 2,500 · luma err 2.61e-7
2× RTX A6000 · batch 256 · 15k steps BISPF (15.16 @ 12.5k EMPF)
Global batch 256 (110.2% eff., 1.52 GiB VRAM/GPU; batch 64 was 0.79×)
Python 3.11–3.14 · bundle, pt2, onnx, safetensors · 85 HNDL ops
Every training run records its resolved recipe, network source, and telemetry stream so CLI runs and Python scripts share the same registry and export artifacts.
# 1. Scaffold an image GAN project auto-sized from your image folder
hypergan new --project my_gan --dataset ./images
# 2. Validate configuration & HNDL shapes without importing PyTorch
hypergan validate my_gan/configs/dcgan.toml
# 3. Train with live Web Observatory telemetry and global run registration
hypergan train my_gan/configs/dcgan.toml --steps 1000 -n baseline-128
# 4. Monitor from any directory, sample EMA generator, and export standalone
hypergan status baseline-128
hypergan sample baseline-128 --count 16 --seed 42
hypergan export baseline-128 --checkpoint latest -o generator.ptimport hypergan as hg
def main():
# Torch-free config loading, overrides, and static validation
model = hg.load("my_gan/configs/dcgan.toml")
model = hg.override(model, {"train.steps": 1000, "train.batch_size": 32})
warnings = hg.validate(model)
# Launch training, inspect typed RunStatus, and tag the run
run = hg.train(model, "my_gan/runs/exp1", steps=1000)
st = hg.status("exp1")
hg.tag("exp1", "baseline-128")
# Export and reload a standalone EMA generator bundle
bundle = hg.export("baseline-128", checkpoint="latest")
gen = hg.load_bundle(bundle, device="cuda")
samples = gen.sample(count=16, seed=42)
walk = gen.interpolate(seed_a=100, seed_b=200, steps=10, mode="slerp")
if __name__ == "__main__":
main()format = "hypergan-model/1"
name = "colorization-128"
defaults = "particlegan"
[data]
builtin = "image_folder"
args = { root = "./data", height = 128, width = 128, mode = "RGB", alpha = "composite_white" }
[prior]
kind = "particles"
z_dim = 128
num_particles = 10000
[networks.luma]
role = "auxiliary"
inputs = { x = "batch.real" }
input_shape = ["B", 3, 128, 128]
output_shape = ["B", 1, 128, 128]
source = """
r, gb = split(x, 1)
g, b = split(gb, 1)
out = add(add(scale(r, 0.299), scale(g, 0.587)), scale(b, 0.114))
"""
[networks.generator]
role = "generator"
inputs = { z = "latent", gray = "luma" }
input_shape = { z = ["B", 128], gray = ["B", 1, 128, 128] }
output_shape = ["B", 3, 128, 128]
hndl = "examples/networks/colorization-generator-128.hndl" # 1. Multi-scale residual grayscale U-Net encoder (128 -> 64 -> 32 -> 16 -> 8)
e128 = resblock(gray, 16, norm="group_norm", groups=4, name="enc128")
e64 = resblock(e128, 32, stride=2, norm="group_norm", groups=8, name="enc64")
e32 = resblock(e64, 64, stride=2, norm="group_norm", groups=8, name="enc32")
e16 = resblock(e32, 128, stride=2, norm="group_norm", groups=8, name="enc16")
e8 = resblock(e16, 256, stride=2, norm="group_norm", groups=8, name="enc8")
# 2. RoPE + SwiGLU Transformer bottleneck with particle palette cross-attention
palette_tokens = reshape(linear(z, 2048, name="palette_tokens"), 8, 256)
tokens = permute(reshape(e8, 256, 64), 2, 1)
for _ in range(2):
tokens = transformer_block(tokens, 4, mlp_ratio=2, norm="layer_norm", rope=True, ffn_kind="swiglu", name="bottleneck_block")
attended = cross_attention(layer_norm(tokens, name="xattn_norm"), palette_tokens, 4, name="palette_xattn")
tokens = add(tokens, attended)
# 3. Sub-pixel U-Net skip decoder with shape-inferred adaptive_norm
h16 = pixel_shuffle(conv(reshape(permute(layer_norm(tokens, name="bottleneck_norm"), 2, 1), 256, 8, 8), 512, kernel_size=3, padding=1, name="up16_conv"), 2)
h16 = adaptive_norm(resblock(concat(h16, e16), 128, norm="group_norm", groups=8, name="dec16"), linear(z, name="style16"), name="adain16")hypergan-model/1 + HNDLDeclare data, priors, multi-port HNDL networks (or custom PyTorch nn.Modules), losses, and evaluations in versioned TOML with static shape verification before allocating a GPU.
unified_v12Learned latent particle tables with coupled_max multi-critic thermal coordination and dual-safe fwAD softmax penalties for mode coverage and stable convergence.
Append-only Foldlite DB journals drive a local browser observatory with a shared Rust/WASM streaming reducer, live loss/FID curves, EMA preview sliders, and inline HNDL layer tables.
Web Observatory guide →Launch single-host replicated training with --devices 0,1, bounded preview budgets, resumable checkpoints, and explicit execution profiles for CPU, CUDA, and Docker.
Bake EMA generator weights with SHA-256 provenance into Python bundles (bundle), PyTorch pt2, onnx, or safetensors — with sample() and spherical interpolate().
Daemonless global registry tracks every run by short ID, memorable slug (fleet-hawk), or custom tag. Control runs from any directory with ps, status, logs, stop, gc, and a multi-GPU job queue.
Run any packaged wheel recipe by name or browse all TOML configs, Python API demos, HNDL networks, and execution profiles in the Examples Gallery.
Canonical CIFAR-10 32x32 Generative Transformer Recipe Generator: 64 spatial tokens (8x8x256), 2 pre-LayerNorm Transformer blocks, nearest upsampling + 3x3 convs.
HyperGAN Canonical Packaged Recipe: Pure Transformer TransGAN on CIFAR-10 100% convolution-free pure transformer architecture for both generator and discriminator.
Canonical 128x128 Conditional Colorization Generator (L -> AB) with Alpha Handling - Multi-port HNDL generator: conditions on grayscale/luminance (L) and particle latent (z)
The packaged 2-D Gaussian-grid reference as a model file: the same numerical recipe as `hypergan new` (hypergan.config.DEFAULT), so it has the reference
Canonical 128x128 Unconditional Generator Template for ImageFolder Datasets Multi-GPU safe: uses GroupNorm (never BatchNorm) throughout generator deconv stages
hypergan-model/1.
HNDL Operators →
85 neural network operators across 12 domains with port & arg specs.
llms.txt →
Machine-readable architecture & documentation map for LLM coding agents.