Spaces:
Runtime error
Runtime error
| emoji: π | |
| title: 'RunAsh AI Live Video Streaming ' | |
| short_description: Real-time video streaming generation | |
| sdk: gradio | |
| license: apache-2.0 | |
| colorFrom: red | |
| colorTo: yellow | |
| pinned: true | |
| thumbnail: >- | |
| https://cdn-uploads.huggingface.co/production/uploads/6799f4b5a2b48413dd18a8dd/VC40nrxiqjcoyZISss85V.jpeg | |
| <p align="center"> | |
| <h1 align="center">RunAsh AI Live Video Streaming</h1> | |
| <h3 align="center">Bridging the Train-Test Gap in Autoregressive Video Diffusion</h3> | |
| </p> | |
| <p align="center"> | |
| <p align="center"> | |
| <a href="https://.me/">Ram Murmu</a><sup>1</sup> | |
| Β· | |
| <a href="https://.github.io/">Vaibhav Murmu</a><sup>1</sup> | |
| Β· | |
| <a href="https://.github.io/"></a><sup></sup> | |
| Β· | |
| <a href="https://.github.io/"></a><sup></sup> | |
| Β· | |
| <a href="https://research.adobe.com/person/eli-shechtman/"></a><sup>1</sup><br> | |
| <sup>1</sup>RunAsh AI Research <sup>2</sup> | |
| </p> | |
| <h3 align="center"><a href="https://arxiv.org/abs/2506.08009">Paper</a> | <a href="https://self-forcing.github.io">Website</a> | <a href="https://huggingface.co/gdhe17/Self-Forcing/tree/main">Models (HuggingFace)</a></h3> | |
| </p> | |
| --- | |
| RunAsh AI trains autoregressive video diffusion models by **simulating the inference process during training**, performing autoregressive rollout with KV caching. It resolves the train-test distribution mismatch and enables **real-time, streaming video generation on a single RTX 4090** while matching the quality of state-of-the-art diffusion models. | |
| --- | |
| https://github.com/user-attachments/assets/7548c2db-fe03-4ba8-8dd3-52d2c6160739 | |
| ## Requirements | |
| We tested this repo on the following setup: | |
| * Nvidia GPU with at least 24 GB memory (RTX 4090, A100, and H100 are tested). | |
| * Linux operating system. | |
| * 64 GB RAM. | |
| Other hardware setup could also work but hasn't been tested. | |
| ## Installation | |
| Create a conda environment and install dependencies: | |
| ``` | |
| conda create -n runash_ai python=3.10 -y | |
| conda activate runash_ai | |
| pip install -r requirements.txt | |
| pip install flash-attn --no-build-isolation | |
| python setup.py develop | |
| ``` | |
| ## Quick Start | |
| ### Download checkpoints | |
| ``` | |
| huggingface-cli download Wan-AI/Wan2.1-T2V-1.3B --local-dir-use-symlinks False --local-dir wan_models/Wan2.1-T2V-1.3B | |
| huggingface-cli download gdhe17/runash-ai checkpoints/runash_ai_dmd.pt --local-dir . | |
| ``` | |
| ### GUI demo | |
| ``` | |
| python demo.py | |
| ``` | |
| Note: | |
| * **Our model works better with long, detailed prompts** since it's trained with such prompts. We will integrate prompt extension into the codebase (similar to [Wan2.1](https://github.com/Wan-Video/Wan2.1/tree/main?tab=readme-ov-file#2-using-prompt-extention)) in the future. For now, it is recommended to use third-party LLMs (such as GPT-4o) to extend your prompt before providing to the model. | |
| * You may want to adjust FPS so it plays smoothly on your device. | |
| * The speed can be improved by enabling `torch.compile`, [TAEHV-VAE](https://github.com/madebyollin/taehv/), or using FP8 Linear layers, although the latter two options may sacrifice quality. It is recommended to use `torch.compile` if possible and enable TAEHV-VAE if further speedup is needed. | |
| ### CLI Inference | |
| Example inference script using the chunk-wise autoregressive checkpoint trained with DMD: | |
| ``` | |
| python inference.py \ | |
| --config_path configs/runash_ai_dmd.yaml \ | |
| --output_folder videos/runash_ai_dmd \ | |
| --checkpoint_path checkpoints/runash_ai_dmd.pt \ | |
| --data_path prompts/MovieGenVideoBench_extended.txt \ | |
| --use_ema | |
| ``` | |
| Other config files and corresponding checkpoints can be found in [configs](configs) folder and our [huggingface repo](https://huggingface.co/gdhe17/Self-Forcing/tree/main/checkpoints). | |
| ## Training | |
| ### Download text prompts and ODE initialized checkpoint | |
| ``` | |
| huggingface-cli download gdhe17/runash-ai checkpoints/ode_init.pt --local-dir . | |
| huggingface-cli download gdhe17/runash-ai vidprom_filtered_extended.txt --local-dir prompts | |
| ``` | |
| Note: Our training algorithm (except for the GAN version) is data-free (**no video data is needed**). For now, we directly provide the ODE initialization checkpoint and will add more instructions on how to perform ODE initialization in the future (which is identical to the process described in the [RunAsh](https://github.com/) repo). | |
| ### RunAsh AI Training with DMD | |
| ``` | |
| torchrun --nnodes=8 --nproc_per_node=8 --rdzv_id=5235 \ | |
| --rdzv_backend=c10d \ | |
| --rdzv_endpoint $MASTER_ADDR \ | |
| train.py \ | |
| --config_path configs/runash_ai_dmd.yaml \ | |
| --logdir logs/runash_ai_dmd \ | |
| --disable-wandb | |
| ``` | |
| Our training run uses 600 iterations and completes in under 2 hours using 64 H100 GPUs. By implementing gradient accumulation, it should be possible to reproduce the results in less than 16 hours using 8 H100 GPUs. | |
| ## Acknowledgements | |
| This codebase is built on top of the open-source implementation of [RunAsh](https://github.com/runash-ai) by [Ram Murmu](https://github.com/rammurmu) and the [Wan2.1](https://github.com/Wan-Video/Wan2.1) repo. | |
| ## Citation | |
| If you find this codebase useful for your research, please kindly cite our paper: | |
| ``` | |
| @article{rammurmu 2025 runash ai, | |
| title={runash ai: Bridging the Train-Test Gap in Autoregressive Video Diffusion}, | |
| author={Ram murmu, and Vaibhav Murmu }, | |
| journal={arXiv preprint arXiv:}, | |
| year={2025} | |
| } | |
| ``` |