{"id":31847576,"url":"https://github.com/ntegrals/hgen","last_synced_at":"2026-07-20T17:31:38.771Z","repository":{"id":317799635,"uuid":"1068881466","full_name":"ntegrals/hgen","owner":"ntegrals","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-03T06:15:15.000Z","size":260,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-19T19:32:23.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntegrals.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-03T03:56:42.000Z","updated_at":"2025-10-03T06:15:18.000Z","dependencies_parsed_at":"2025-10-03T06:15:17.441Z","dependency_job_id":"b3ffe395-c91e-4fbd-b6ac-9f2555fb95be","html_url":"https://github.com/ntegrals/hgen","commit_stats":null,"previous_names":["ntegrals/hgen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ntegrals/hgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntegrals%2Fhgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntegrals%2Fhgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntegrals%2Fhgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntegrals%2Fhgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntegrals","download_url":"https://codeload.github.com/ntegrals/hgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntegrals%2Fhgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35695244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"ssl_error","status_checked_at":"2026-07-20T02:08:09.736Z","response_time":111,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-12T09:51:27.147Z","updated_at":"2026-07-20T17:31:38.750Z","avatar_url":"https://github.com/ntegrals.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://hypergen.ai\"\u003e\u003cpicture\u003e\n\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/hypergen/hypergen/main/assets/hypergen_logo_white.png\"\u003e\n\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/hypergen/hypergen/main/assets/hypergen_logo_black.png\"\u003e\n\u003cimg alt=\"hypergen logo\" src=\"https://raw.githubusercontent.com/hypergen/hypergen/main/assets/hypergen_logo_black.png\" height=\"110\" style=\"max-width: 100%;\"\u003e\n\u003c/picture\u003e\u003c/a\u003e\n\n\u003ca href=\"https://colab.research.google.com/github/hypergen/notebooks/blob/main/quickstart.ipynb\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" width=\"150\"\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/hypergen\"\u003e\u003cimg src=\"https://img.shields.io/discord/1234567890?color=5865F2\u0026logo=discord\u0026logoColor=white\u0026label=Discord\" width=\"150\"\u003e\u003c/a\u003e\n\u003ca href=\"https://docs.hypergen.ai\"\u003e\u003cimg src=\"https://img.shields.io/badge/docs-hypergen.ai-blue\" width=\"120\"\u003e\u003c/a\u003e\n\n### Train \u0026 run image and video diffusion models 3x faster with 80% less VRAM!\n\n![Performance Chart](https://i.ibb.co/performance-chart.png)\n\n\u003c/div\u003e\n\n## ✨ Simple as 5 Lines\n\nHyperGen makes training and running diffusion models incredibly simple. No lengthy notebooks, no complex configurations - just clean Python code:\n\n```python\nimport hypergen\n\nmodel = hypergen.Model.load(\"flux/flux-dev\")\ndataset = hypergen.Dataset.load(\"/path/to/images\")\nlora = model.train_lora(dataset)\nimage = model.run_lora(prompt=\"A cat holding a sign that says hello world\", lora=lora)\n```\n\nThat's it! HyperGen handles optimization, memory management, and acceleration automatically.\n\n## 🚀 Supported Models\n\n| Model Family           | Type  | Memory Reduction | Speed Improvement | Colab Notebook                                                                                               |\n| ---------------------- | ----- | ---------------- | ----------------- | ------------------------------------------------------------------------------------------------------------ |\n| **FLUX.1**             | Image | 80% less VRAM    | 3x faster         | [▶️ Try now](https://colab.research.google.com/github/hypergen/notebooks/blob/main/flux_training.ipynb)      |\n| **Stable Diffusion 3** | Image | 75% less VRAM    | 2.8x faster       | [▶️ Try now](https://colab.research.google.com/github/hypergen/notebooks/blob/main/sd3_training.ipynb)       |\n| **SDXL**               | Image | 70% less VRAM    | 2.5x faster       | [▶️ Try now](https://colab.research.google.com/github/hypergen/notebooks/blob/main/sdxl_training.ipynb)      |\n| **CogVideoX**          | Video | 85% less VRAM    | 3.2x faster       | [▶️ Try now](https://colab.research.google.com/github/hypergen/notebooks/blob/main/cogvideox_training.ipynb) |\n| **Luma Dream Machine** | Video | 80% less VRAM    | 3x faster         | [▶️ Try now](https://colab.research.google.com/github/hypergen/notebooks/blob/main/luma_training.ipynb)      |\n| **Sora (Replica)**     | Video | 82% less VRAM    | 2.9x faster       | [▶️ Try now](https://colab.research.google.com/github/hypergen/notebooks/blob/main/sora_training.ipynb)      |\n\n- See [all supported models](https://docs.hypergen.ai/models) and [performance benchmarks](https://docs.hypergen.ai/benchmarks)\n- Browse our [model zoo](https://huggingface.co/hypergen) on Hugging Face\n- Check out [community fine-tunes](https://docs.hypergen.ai/community)\n\n## ⚡ Installation\n\n### Quick Install\n\n```bash\npip install hypergen\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/hypergen/hypergen.git\ncd hypergen\npip install -e .\n```\n\n### Docker\n\n```bash\ndocker run -it --gpus all hypergen/hypergen:latest\n```\n\n## ☄️ Why HyperGen?\n\n**🎯 Dead Simple API**: 5 lines vs 500+ line notebooks. Focus on your ideas, not infrastructure.\n\n**⚡ Blazing Fast**: 3x faster training and inference with 80% less VRAM usage by default.\n\n**🔧 Zero Configuration**: Automatic optimization detection and memory management.\n\n**🌐 Universal**: Works with image and video models from any provider.\n\n**🛡️ Production Ready**: Used by companies generating millions of images daily.\n\n## 📖 Quick Examples\n\n### Image Generation\n\n```python\nimport hypergen\n\n# Load any diffusion model\nmodel = hypergen.Model.load(\"runwayml/stable-diffusion-v1-5\")\n\n# Generate images\nimages = model.generate([\n    \"A serene mountain landscape at sunset\",\n    \"A cyberpunk cityscape with neon lights\"\n], batch_size=2)\n\n# Save results\nhypergen.save_images(images, \"outputs/\")\n```\n\n### LoRA Training\n\n```python\nimport hypergen\n\n# Load model and dataset\nmodel = hypergen.Model.load(\"black-forest-labs/FLUX.1-dev\")\ndataset = hypergen.Dataset.load(\"./my_photos\", format=\"folder\")\n\n# Train LoRA with automatic optimization\nlora = model.train_lora(\n    dataset,\n    steps=1000,\n    learning_rate=\"auto\",  # Automatic learning rate scheduling\n    batch_size=\"auto\"      # Automatic batch size optimization\n)\n\n# Use the trained LoRA\nimage = model.run_lora(\n    prompt=\"A professional headshot in the style of my photos\",\n    lora=lora,\n    strength=0.8\n)\n```\n\n### Video Generation\n\n```python\nimport hypergen\n\n# Load video model\nmodel = hypergen.Model.load(\"THUDM/CogVideoX-5b\")\n\n# Generate video\nvideo = model.generate_video(\n    prompt=\"A golden retriever playing in a sunlit meadow\",\n    duration=5.0,  # seconds\n    fps=24\n)\n\nhypergen.save_video(video, \"golden_retriever.mp4\")\n```\n\n### Batch Processing\n\n```python\nimport hypergen\n\nmodel = hypergen.Model.load(\"flux/flux-dev\")\nprompts = hypergen.Dataset.load(\"prompts.txt\")\n\n# Process thousands of prompts efficiently\nfor batch in prompts.batch(32):\n    images = model.generate(batch.prompts)\n    hypergen.save_images(images, f\"batch_{batch.id}/\")\n```\n\n## 🚀 Performance Benchmarks\n\nWe tested HyperGen against standard implementations across different hardware configurations:\n\n### FLUX.1 Training (LoRA, 1000 steps)\n\n| Hardware  | ☄️ HyperGen | Standard  | Memory   | Speed       |\n| --------- | ----------- | --------- | -------- | ----------- |\n| RTX 4090  | 8GB VRAM    | 22GB VRAM | 80% less | 3.2x faster |\n| A100 40GB | 12GB VRAM   | 38GB VRAM | 75% less | 2.8x faster |\n| A100 80GB | 18GB VRAM   | 76GB VRAM | 80% less | 3.1x faster |\n\n### CogVideoX Generation (16 frames, 720p)\n\n| Hardware  | ☄️ HyperGen | Standard  | Memory   | Speed       |\n| --------- | ----------- | --------- | -------- | ----------- |\n| RTX 4090  | 14GB VRAM   | OOM       | 85% less | 3x faster   |\n| A100 40GB | 22GB VRAM   | 38GB VRAM | 82% less | 3.3x faster |\n| A100 80GB | 28GB VRAM   | 72GB VRAM | 85% less | 3.1x faster |\n\n_Benchmarks conducted with fp16 precision, batch size optimized for each setup_\n\n## 🔧 Advanced Features\n\n### Custom Optimization\n\n```python\nimport hypergen\n\nmodel = hypergen.Model.load(\"flux/flux-dev\")\nmodel.configure(\n    precision=\"bf16\",           # or fp16, fp32\n    attention_backend=\"flash\",  # flash, xformers, native\n    memory_efficient=True,      # Enable gradient checkpointing\n    compile_model=True         # PyTorch 2.0 compilation\n)\n```\n\n### Multi-GPU Training\n\n```python\nimport hypergen\n\nmodel = hypergen.Model.load(\"flux/flux-dev\", num_gpus=4)\ndataset = hypergen.Dataset.load(\"./large_dataset\")\n\nlora = model.train_lora(\n    dataset,\n    strategy=\"ddp\",  # or fsdp, deepspeed\n    steps=5000\n)\n```\n\n### Custom Datasets\n\n```python\nimport hypergen\n\n# From Hugging Face\ndataset = hypergen.Dataset.load(\"username/my-dataset\")\n\n# From local folder\ndataset = hypergen.Dataset.load(\"./images\", format=\"folder\")\n\n# From URLs\ndataset = hypergen.Dataset.load([\n    \"https://example.com/image1.jpg\",\n    \"https://example.com/image2.jpg\"\n])\n\n# Custom preprocessing\ndataset = dataset.preprocess(\n    resize=(512, 512),\n    crop=\"center\",\n    normalize=True\n)\n```\n\n## 📚 Documentation\n\n- 📖 [Getting Started Guide](https://docs.hypergen.ai/getting-started)\n- 🎯 [API Reference](https://docs.hypergen.ai/api)\n- 🏗️ [Architecture Overview](https://docs.hypergen.ai/architecture)\n- 🔧 [Advanced Usage](https://docs.hypergen.ai/advanced)\n- 🤝 [Contributing](https://docs.hypergen.ai/contributing)\n- 🐛 [Troubleshooting](https://docs.hypergen.ai/troubleshooting)\n\n## 🌟 Key Optimizations\n\n**Memory Optimizations**:\n\n- Gradient checkpointing with smart activation recomputation\n- Dynamic attention scaling and memory-efficient cross-attention\n- Automatic mixed precision with loss scaling\n- Smart caching and memory defragmentation\n\n**Speed Optimizations**:\n\n- Custom CUDA kernels for common operations\n- PyTorch 2.0 compilation with dynamic shapes\n- Optimized attention mechanisms (Flash Attention, xFormers)\n- Automatic batch size and learning rate scheduling\n\n**Training Optimizations**:\n\n- LoRA with rank adaptation and smart target module selection\n- Gradient accumulation with automatic scaling\n- Advanced sampling strategies and data loading\n- Multi-GPU training with optimal communication patterns\n\n## 🤝 Community \u0026 Support\n\n| Platform             | Link                                                       | Description                       |\n| -------------------- | ---------------------------------------------------------- | --------------------------------- |\n| 📚 **Documentation** | [docs.hypergen.ai](https://docs.hypergen.ai)               | Complete guides and API reference |\n| 💬 **Discord**       | [Join our Discord](https://discord.gg/hypergen)            | Community support and discussions |\n| 🐙 **GitHub Issues** | [Report bugs](https://github.com/hypergen/hypergen/issues) | Bug reports and feature requests  |\n| 🐦 **Twitter**       | [@hypergen](https://twitter.com/hypergen)                  | Updates and announcements         |\n| 📧 **Email**         | support@hypergen.ai                                        | Enterprise support                |\n\n## 🔄 Migration from Other Frameworks\n\n### From Diffusers\n\n```python\n# Before (diffusers)\nfrom diffusers import StableDiffusionPipeline\npipe = StableDiffusionPipeline.from_pretrained(\"runwayml/stable-diffusion-v1-5\")\nimage = pipe(\"A cat\").images[0]\n\n# After (hypergen)\nimport hypergen\nmodel = hypergen.Model.load(\"runwayml/stable-diffusion-v1-5\")\nimage = model.generate(\"A cat\")\n```\n\n### From Training Scripts\n\n```python\n# Before (100+ lines of training code)\n# ... complex setup, data loading, training loops ...\n\n# After (hypergen)\nimport hypergen\nmodel = hypergen.Model.load(\"flux/flux-dev\")\ndataset = hypergen.Dataset.load(\"./data\")\nlora = model.train_lora(dataset, steps=1000)\n```\n\n## 🏆 Showcase\n\nModels trained with HyperGen:\n\n- [HyperGen-FLUX-Portraits](https://huggingface.co/hypergen-models/flux-portraits) - Professional portrait LoRA\n- [HyperGen-CogVideoX-Nature](https://huggingface.co/hypergen-models/cogvideox-nature) - Nature documentary style\n- [HyperGen-SDXL-Architecture](https://huggingface.co/hypergen-models/sdxl-architecture) - Architectural visualization\n\n_Want to showcase your HyperGen model? [Submit here](https://docs.hypergen.ai/showcase)_\n\n## 📄 License\n\nHyperGen is released under the [Apache 2.0 License](LICENSE).\n\n## 🙏 Acknowledgments\n\nHyperGen builds upon the incredible work of:\n\n- [🤗 Hugging Face Diffusers](https://github.com/huggingface/diffusers) - Core diffusion model implementations\n- [PyTorch](https://pytorch.org) - Deep learning framework\n- [Flash Attention](https://github.com/Dao-AILab/flash-attention) - Efficient attention mechanisms\n- [xFormers](https://github.com/facebookresearch/xformers) - Memory-efficient transformers\n- [PEFT](https://github.com/huggingface/peft) - Parameter-efficient fine-tuning\n\nSpecial thanks to our [contributors](https://github.com/hypergen/hypergen/graphs/contributors) and the open-source AI community.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Built with ❤️ by the HyperGen team**\n\n[Website](https://hypergen.ai) • [Documentation](https://docs.hypergen.ai) • [Discord](https://discord.gg/hypergen) • [Twitter](https://twitter.com/hypergen_ai)\n\n_If HyperGen accelerated your diffusion models, please ⭐ this repo and [share your results](https://docs.hypergen.ai/showcase)!_\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntegrals%2Fhgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntegrals%2Fhgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntegrals%2Fhgen/lists"}