MagicTime

PKU-YuanGroupApache-2.0更新放缓

基于扩散模型的时间流逝视频生成模型,能把文本提示变成物体随时间逐渐变形的延时视频,还配套了专门的延时数据集。

[TPAMI 2025🔥] MagicTime: Time-lapse Video Generation Models as Metamorphic Simulators

暂无版本1,336star120fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
git clone --depth=1 https://github.com/PKU-YuanGroup/MagicTime.git
硬件要求按 README 说明

README 未说明具体显存要求与支持的 GPU 型号

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

北大团队开源的延时视频生成模型,专门生成植物生长、食物烘焙这类形变过程视频

基于扩散模型的时间流逝视频生成模型,能把文本提示变成物体随时间逐渐变形的延时视频,还配套了专门的延时数据集。

核心能力

  • 基于给定 prompt 生成形变类延时视频
  • 配套 ChronoMagic 数据集,含 2265 条延时视频文本对
  • 提供批量推理脚本 inference_magictime.py
  • 附 ChronoMagic-Bench 形变视频评测基准
  • 支持 ComfyUI 扩展与 Hugging Face Space 在线试用

容易踩的坑

需另行下载模型权重,仓库本身压缩到 1MB 以内不含权重;训练代码尚未发布,目前只有推理代码

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    as Metamorphic Simulators

    hf_space Replicate demo and cloud API Open In Colab hf_space arXiv Home Page Dataset zhihu zhihu DOI License github

    Open-Sora Plan: Open-Source Large Video Generation Model Bin Lin, Yunyang Ge and Xinhua Cheng etc. github github arXiv

    Helios: Real Real-Time Long Video Generation Model Shenghai Yuan, Jinfa Huang and Xianyi He etc. github github arXiv

    OpenS2V-Nexus: A Detailed Benchmark and Million-Scale Dataset for Subject-to-Video Generation Shenghai Yuan, Xianyi He and Yufan Deng etc. github github arXiv

    ConsisID: Identity-Preserving Text-to-Video Generation by Frequency Decomposition Shenghai Yuan, Jinfa Huang and Xianyi He etc. github github arXiv

    ChronoMagic-Bench: A Benchmark for Metamorphic Evaluation of Text-to-Time-lapse Video Generation Shenghai Yuan, Jinfa Huang and Yongqi Xu etc. github github arXiv

    📣 News

    • ⏳⏳⏳ Training a stronger model with the support of Open-Sora Plan.
    • ⏳⏳⏳ Release the training code of MagicTime.
    • [2026.03.08] 👋 We introduce Helios, a breakthrough video generation model that achieves minute-scale, high-quality video synthesis at 19.5 FPS on a single H100 GPU — without relying on conventional long video anti-drifting strategies or standard video acceleration techniques. Welcome to check Technical Report!
    • [2025.04.08] 🔥 We have updated our technical report. Please click here to view it.
    • [2025.03.28] 🔥 MagicTime has been accepted by TPAMI, and we will update arXiv with more details soon, keep tuned!
    • [2024.07.29] We add batch inference to inference_magictime.py for easier usage.
    • [2024.06.27] Excited to share our latest ChronoMagic-Bench, a benchmark for metamorphic evaluation of text-to-time-lapse video generation, and is fully open source! Please check out the paper.
    • [2024.05.27] Excited to share our latest Open-Sora Plan v1.1.0, which significantly improves video quality and length, and is fully open source! Please check out the report.
    • [2024.04.14] Thanks @camenduru and @ModelsLab for providing Jupyter Notebook and Replicate Demo.
    • [2024.04.13] 🔥 We have compressed the size of repo with less than 1.0 MB, so that everyone can clone easier and faster. You can click here to download, or use git clone --depth=1 command to obtain this repo.
    • [2024.04.12] Thanks @Kijai and @Baobao Wang for providing ComfyUI Extension ComfyUI-MagicTimeWrapper. If you find related work, please let us know.
    • [2024.04.11] 🔥 We release the Hugging Face Space of MagicTime, you can click here to have a try.
    • [2024.04.10] 🔥 We release the inference code and model weight of MagicTime.
    • [2024.04.09] 🔥 We release the arXiv paper for MagicTime, and you can click here to see more details.
    • [2024.04.08] 🔥 We release the subset of ChronoMagic dataset used to train MagicTime. The dataset includes 2,265 metamorphic video-text pairs and can be downloaded at HuggingFace Dataset or Google Drive.
    • [2024.04.08] 🔥 All codes & datasets are coming soon! Stay tuned 👀!

    😮 Highlights

    MagicTime shows excellent performance in metamorphic video generation.

    Related Resources

    • ChronoMagic: including 2265 time-lapse video-text pairs. (captioned by GPT-4V)
    • ChronoMagic-Bench: including 1649 time-lapse video-text pairs. (captioned by GPT-4o)
    • ChronoMagic-Bench-150: including 150 time-lapse video-text pairs. (captioned by GPT-4o)
    • ChronoMagic-Pro: including 460K time-lapse video-text pairs. (captioned by ShareGPT4Video)
    • ChronoMagic-ProH: including 150K time-lapse video-text pairs. (captioned by ShareGPT4Video)

    Metamorphic Videos vs. General Videos

    Compared to general videos, metamorphic videos contain physical knowledge, long persistence, and strong variation, making them difficult to generate. We show compressed .gif on github, which loses some quality. The general videos are generated by the Animatediff and MagicTime.

    Gallery

    We showcase some metamorphic videos generated by MagicTime, MakeLongVideo, ModelScopeT2V, VideoCrafter, ZeroScope, LaVie, T2V-Zero, Latte and Animatediff below.

    We show more metamorphic videos generated by MagicTime with the help of Realistic, ToonYou and RcnzCartoon.

    Prompts are trimmed for display, see here for full prompts.

    Integrate into DiT-based Architecture

    The mission of this project is to help reproduce Sora and provide high-quality video-text data and data annotation pipelines, to support Open-Sora-Plan or other DiT-based T2V models. To this end, we take an initial step to integrate our MagicTime scheme into the DiT-based Framework. Specifically, our method supports the Open-Sora-Plan v1.0.0 for fine-tuning. We first scale up with additional metamorphic landscape time-lapse videos in the same annotation framework to get the ChronoMagic-Landscape dataset. Then, we fine-tune the Open-Sora-Plan v1.0.0 with the ChronoMagic-Landscape dataset to get the MagicTime-DiT model. The results are as follows (257×512×512 (10s)):

    Prompts are trimmed for display, see here for full prompts.

    🤗 Demo

    Gradio Web UI

    Highly recommend trying out our web demo by the following command, which incorporates all features currently supported by MagicTime. We also provide online demo in Hugging Face Spaces.

    python app.py
    

    CLI Inference

    # For Realistic
    python inference_magictime.py --config sample_configs/RealisticVision.yaml --human
    
    # or you can directly run the .sh
    sh inference_cli.sh
    

    warning: It is worth noting that even if we use the same seed and prompt but we change a machine, the results will be different.

    ⚙️ Requirements and Installation

    We recommend the requirements as follows.

    Environment

    git clone --depth=1 https://github.com/PKU-YuanGroup/MagicTime.git
    cd MagicTime
    conda create -n magictime python=3.10.13
    conda activate magictime
    pip install -r requirements.txt
    

    Download MagicTime

    The weights are available at 🤗HuggingFace and 🟣WiseModel, or you can download it with the following commands.

    # way 1
    # if you are in china mainland, run this first: export HF_ENDPOINT=https://hf-mirror.com
    huggingface-cli download --repo-type model \
    BestWishYsh/MagicTime \
    --local-dir ckpts
    
    # way 2
    git lfs install
    git clone https://www.wisemodel.cn/SHYuanBest/MagicTime.git
    

    Once ready, the weights will be organized in this format:

    📦 ckpts/
    ├── 📂 Base_Model/
    │   ├── 📂 motion_module/
    │   ├── 📂 stable-diffusion-v1-5/
    ├── 📂 DreamBooth/
    ├── 📂 Magic_Weights/
    │   ├── 📂 magic_adapter_s/
    │   ├── 📂 magic_adapter_t/
    │   ├── 📂 magic_text_encoder/
    

    🗝️ Training & Inference

    The training code is coming soon!

    For inference, some examples are shown below:

    # For Realistic
    python inference_magictime.py --config sample_configs/RealisticVision.yaml
    # For ToonYou
    python inference_magictime.py --config sample_configs/ToonYou.yaml
    # For RcnzCartoon
    python inference_magictime.py --config sample_configs/RcnzCartoon.yaml
    # or you can directly run the .sh
    sh inference.sh
    

    You can also put all your custom prompts in a .txt file and run:

    # For Realistic
    python inference_magictime.py --config sample_configs/RealisticVision.yaml --run-txt XXX.txt --batch-size 2
    # For ToonYou
    python inference_magictime.py --config sample_configs/ToonYou.yaml --run-txt XXX.txt --batch-size 2
    # For RcnzCartoon
    python inference_magictime.py --config sample_configs/RcnzCartoon.yaml --run-txt XXX.txt --batch-size 2
    

    Community Contributions

    We found some plugins created by community developers. Thanks for their efforts:

    If you find related work, please let us know.

    🐳 ChronoMagic Dataset

    ChronoMagic with 2265 metamorphic time-lapse videos, each accompanied by a detailed caption. We released the subset of ChronoMagic used to train MagicTime. The dataset can be downloaded at HuggingFace Dataset, or you can download it with the following command. Some samples can be found on our Project Page.

    huggingface-cli download --repo-type dataset \
    --resume-download BestWishYsh/ChronoMagic \
    --local-dir BestWishYsh/ChronoMagic \
    --local-dir-use-symlinks False
    

    👍 Acknowledgement

    • Animatediff The codebase we built upon and it is a strong U-Net-based text-to-video generation model.

    • Open-Sora-Plan The codebase we built upon and it is a simple and scalable DiT-based text-to-video generation repo, to reproduce Sora.

    🔒 License

    • The majority of this project is released under the Apache 2.0 license as found in the LICENSE file.
    • The service is a research preview. Please contact us if you find any potential violations.

    ✏️ Citation

    If you find our paper and code useful in your research, please consider giving a star :star: and citation :pencil:.

    @article{yuan2025magictime,
      title={Magictime: Time-lapse video generation models as metamorphic simulators},
      author={Yuan, Shenghai and Huang, Jinfa and Shi, Yujun and Xu, Yongqi and Zhu, Ruijie and Lin, Bin and Cheng, Xinhua and Yuan, Li and Luo, Jiebo},
      journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
      year={2025},
      publisher={IEEE}
    }
    

    🤝 Contributors