Skip to content

Repository files navigation

KleinFlow logo

KleinFlow

Portable FLUX.2 Klein animation studio for Windows and NVIDIA GPUs

Run a local Gradio studio for four-step renders, VeloSeq timelines, Depth-Lite motion,
audio-reactive control, video reference workflows, LoRA experiments, semantic masking,
temporal consistency, interpolation, and 2x post-upscaling.

KleinFlow website Release v1.0 beta GitHub stars Windows 11 NVIDIA CUDA AGPL-3.0

Quick Start · User Guide · Workflows · Settings Reference · Troubleshooting


🎬 What Is KleinFlow?

KleinFlow is a local animation environment built around the four-step FLUX.2 Klein 4B model. It combines a static FP8 transformer, a 4-bit Qwen text encoder, native FlowMatch img2img, and a portable Windows runtime.

The complete application runs from its own folder. It does not require a system Python installation, CUDA Toolkit installation, global FFmpeg, PATH changes, registry changes, or administrator access.

✨ Highlights

Capability
🎥 Motion 2D transforms, cinematic camera schedules, Depth-Lite 3D, Depth Warp 2.0, and video-reference motion
🧬 VeloSeq Keyframes, expressions, prompt blending, seed travel, and frame/second/beat timebases
🎧 Audio Reactive Enhanced DSP V2 analysis with beat, spectrum, stereo, and configurable VeloSeq injection
🎞️ Temporal Consistency profiles, overlap rendering, memory pyramid, cadence, FloweR prediction, and SEA-RAFT flow
🎭 Semantic Masking Florence-2 phrase grounding, GrabCut/soft masks, flow tracking, and selective effect routing
🎨 Creative Control Eight LoRA slots, prompt enhancement, presets, color matching, init preparation, and Final Polish
📦 Post-Processing Practical-RIFE interpolation, FlowUpscaler 2x, H.264 export controls, and audio muxing
💾 Portable Workflow Local models, local caches, resumable verified downloads, session restore, diagnostics, and JSON settings

🖥️ Requirements

  • Windows 11 AMD64
  • NVIDIA Ampere or newer
  • 12 GB VRAM minimum
  • 16 GB VRAM recommended
  • Internet access for the initial runtime and model downloads
  • Approximately 7.08 GB for the required model bundle, plus the portable runtime

🚀 Quick Start

Source checkout

Run these files in order:

build_kleinflow.bat
download_models.bat
start.bat

build_kleinflow.bat creates the relocatable Python and FFmpeg runtime. download_models.bat installs the required verified model bundle and offers optional feature models. start.bat launches the local Gradio interface.

Prepared portable release

If portable\python\python.exe and portable\ffmpeg\bin\ffmpeg.exe are already present, skip the build step:

download_models.bat
start.bat

Generated frames, videos, settings, provenance, and diagnostics are written under outputs\.

Important

Model files are downloaded separately and retain their own licenses. The default downloader deliberately avoids the larger official BF16 transformer.

🧠 Core Model Stack

Component Default implementation
Transformer Photoroom FLUX.2 Klein 4B static FP8
Text encoder OzzyGT Qwen3-4B bitsandbytes 4-bit
Tokenizer, VAE, scheduler Official FLUX.2 Klein components
Diffusion Four-step FlowMatch Euler generation
Optional models Practical-RIFE, Depth Anything V2 Small, Small Decoder, FloweR, SEA-RAFT, Florence-2, and FlowUpscaler

See the Model Components guide for exact files, download flags, local paths, sizes, and runtime roles.

📚 Documentation

Guide Purpose
Quick Start Build or unpack KleinFlow and make the first render
User Guide Practical map of the complete Gradio interface
Workflow Recipes Stable animation, depth, audio, video-reference, and post-processing recipes
Performance Guide Resolution, speed, VRAM, and optional-feature tradeoffs
VeloSeq Manual Keyframes, expressions, interpolation, timing, and audio variables
Settings Reference Types, defaults, choices, ranges, and units for all 474 settings fields
Settings Schema Machine-readable contract for compatible tools and LLMs
Portable Build Guide Folder-portable runtime assembly
Troubleshooting Common errors, logs, diagnostics, and recovery steps
Release Checklist Clean-machine, GPU, relocation, and packaging release gates

The complete documentation index is available at docs/README.md.

💖 Credits & Support

Made in Lisbon 🇵🇹 with AI and Love by C. Pinto @flisbonwlove

Credits

KleinFlow stands on the shoulders of giants. Deep gratitude goes to the open-source AI community and to the people building the research, models, and tools that made this project possible.

Core technology and model ecosystems include:

Acknowledgments

Main inspiration

Motion, depth, and temporal research

See THIRD_PARTY_NOTICES.md for implementation-level attribution, upstream licenses, and model notices.

Support

If KleinFlow is useful to you and you want to support its continued development:

  • ⭐ Star the repository and help other artists discover it.
  • Buy the developer a coffee.
  • 🐛 Report bugs or suggest features through GitHub Issues.
  • 💻 Share presets and workflows, improve documentation, or submit pull requests.

📖 Citation

If KleinFlow supports your research or creative work, please cite:

@software{Pinto2026KleinFlow,
  author       = {Pinto, C.},
  title        = {KleinFlow},
  year         = {2026},
  publisher    = {GitHub},
  url          = {https://github.com/kleinflow/kleinflow},
  note         = {Portable FLUX.2 Klein animation studio}
}

⚖️ License

KleinFlow source code is licensed under the GNU Affero General Public License v3.0. Model files are separate works and retain the licenses and usage conditions of their source repositories.

About

⚡️Lightweight Portable FLUX.2 Klein animation app for Windows NVIDIA systems

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages