{"id":30439765,"url":"https://github.com/TencentARC/ToonComposer","last_synced_at":"2025-08-23T05:04:53.220Z","repository":{"id":310022230,"uuid":"1036703664","full_name":"TencentARC/ToonComposer","owner":"TencentARC","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-15T06:50:58.000Z","size":2933,"stargazers_count":26,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T08:31:03.994Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TencentARC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-08-12T13:14:20.000Z","updated_at":"2025-08-15T08:15:44.000Z","dependencies_parsed_at":"2025-08-15T08:31:16.130Z","dependency_job_id":"60f1e40e-e8a7-43af-9a5e-6eb04ef74ae9","html_url":"https://github.com/TencentARC/ToonComposer","commit_stats":null,"previous_names":["tencentarc/tooncomposer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/TencentARC/ToonComposer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FToonComposer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FToonComposer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FToonComposer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FToonComposer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TencentARC","download_url":"https://codeload.github.com/TencentARC/ToonComposer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FToonComposer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745472,"owners_count":24813499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-08-23T05:02:19.302Z","updated_at":"2025-08-23T05:04:53.207Z","avatar_url":"https://github.com/TencentARC.png","language":"Python","funding_links":[],"categories":["\u003cspan id=\"animation\"\u003eAnimation\u003c/span\u003e","Python"],"sub_categories":["\u003cspan id=\"tool\"\u003eLLM (LLM \u0026 Tool)\u003c/span\u003e"],"readme":"# ToonComposer\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src='./samples/ToonComposer-Icon.png' width='120px'\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e \u003cb\u003e ToonComposer: Streamlining Cartoon Production with Generative Post-Keyframing \u003c/b\u003e \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e Lingen Li, Guangzhi Wang, Zhaoyang Zhang, Yaowei Li, Xiaoyu Li, Qi Dou, Jinwei Gu, Tianfan Xue, Ying Shan \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e \u003ca href='https://lg-li.github.io/project/tooncomposer'\u003e\u003cimg src='https://img.shields.io/badge/Project-Page-Green'\u003e\u003c/a\u003e \u0026nbsp;\n \u003ca href='https://huggingface.co/TencentARC/ToonComposer'\u003e\u003cimg src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-blue'\u003e\u003c/a\u003e \u0026nbsp;\n \u003ca href='https://huggingface.co/spaces/TencentARC/ToonComposer'\u003e\u003cimg src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Space-orange'\u003e\u003c/a\u003e\n \u003ca href=\"https://arxiv.org/abs/2508.10881\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=ArxivPreprint\u0026message=ToonComposer\u0026color=red\u0026logo=arxiv\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 👀 TL;DR\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src='./samples/ToonComposer-TLDR.jpg' width='550px'\u003e\n\u003c/div\u003e\n\nTraditional cartoon/anime production is time-consuming, requiring skilled artists for keyframing, inbetweening, and colorization.\nToonComposer streamlines this with generative AI, turning hours of manual work of inbetweening and colorization into a single, seamless process. Visit our [project page](https://lg-li.github.io/project/tooncomposer) and read our [paper](https://arxiv.org/abs/2508.10881) for more details.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src='./samples/ToonComposer-Method.jpg' width='800px'\u003e\n\u003c/div\u003e\n\n## ✏️ Updates\n\n[08/18/2025] Online gradio demo is now available on [Hugging Face Space](https://huggingface.co/spaces/TencentARC/ToonComposer).\n\n[08/15/2025] ToonComposer model weights are available [here](https://huggingface.co/TencentARC/ToonComposer).\n\n## ⚠️ Unauthorized Site Notice\n\nThe website https://tooncomposer.com is \u003cb\u003eNOT\u003c/b\u003e hosted, authorized, or endorsed by the ToonComposer team. This site has replicated content from our open-source project without our permission or notification, and we are unaware of the operators’ identity or intentions.\n\n## ⚙️ Configuration\n\n### 1) Clone the repository\n\n```bash\ngit clone https://github.com/TencentARC/ToonComposer\ncd ToonComposer\n```\n\n### 2) Set up the Python environment\n\nCreate a conda environment and install dependencies from requirements.txt.\n\n```bash\nconda create -n tooncomposer python=3.10 -y\nconda activate tooncomposer\npip install -r requirements.txt\n```\n\n**Note: ToonComposer requires specific versions for gradio==5.25.2.**\n\nFor Linux users, we recommend installing `flash_attn`.\n\n```bash\npip install flash-attn==2.8.2 --no-build-isolation\n```\n\n\n### 3) Run the app\n\nThe app will check your local cache and download required weights if missing (see Weights section below). By default, the Gradio interface launches on port 7860.\n\n```bash\npython app.py\n```\n\nOpen your browser at `http://localhost:7860`.\n\nIf you run on a remote server, replace `localhost` with your server IP or hostname.\n\nGenerating a 480p video with 61 frames requires ~57GB of VRAM. If you don't have sufficient GPU resources, we recommend trying our [🤗 Hugging Face Spaces demo](https://huggingface.co/spaces/TencentARC/ToonComposer) instead.\n\n## 💾 Weights and Checkpoints\n\nToonComposer relies on two sets of weights:\n\n- **Wan2.1 I2V 14B 480P (foundation model)**: `Wan-AI/Wan2.1-I2V-14B-480P`\n- **ToonComposer weights**: `TencentARC/ToonComposer`\n\nThe app resolves weights in this order:\n\n- If you provide local directories via CLI flags or environment variables (see below), they are used first.\n- Otherwise, it checks your local Hugging Face cache (no network).\n- If still not found, it downloads from the Hugging Face Hub.\n\nBecause Wan2.1 is very large, the app avoids re-downloading if it exists in your cache.\n\n### Provide local directories (optional)\n\n- Environment variables:\n  - `WAN21_I2V_DIR`: path to local Wan2.1 model directory\n  - `TOONCOMPOSER_DIR`: path to local ToonComposer directory that contains `480p/` and/or `608p/` subdirectories. Each subdir should include `tooncomposer.ckpt` and `config.json`.\n  - `HF_TOKEN`: HF access token if required for gated downloads (optional)\n\n```bash\nexport WAN21_I2V_DIR=/abs/path/to/Wan2.1-I2V-14B-480P\nexport TOONCOMPOSER_DIR=/abs/path/to/TencentARC-ToonComposer\nexport HF_TOKEN=hf_xxx  # optional\npython app.py\n```\n\n- CLI flags (override env vars):\n\n```bash\npython app.py \\\n  --wan_model_dir /abs/path/to/Wan2.1-I2V-14B-480P \\\n  --tooncomposer_dir /abs/path/to/TencentARC-ToonComposer \\\n  --hf_token hf_xxx \\\n  --resolution 480p \\\n  --device cuda:0\n```\n\nNotes:\n\n- The ToonComposer HF repo organizes weights by resolution: `480p/` and `608p/`. The app automatically loads the correct `config.json` and `tooncomposer.ckpt` from the selected resolution directory.\n- The app checks the HF cache first (`local_files_only=True`) and only downloads if missing.\n\n## 📖 Usage Guide\n\n### Launch options\n\n```bash\npython app.py --help\n```\n\n- **--resolution**: `480p` or `608p` (default: `480p`)\n- **--device**: e.g., `cuda:0`, `cpu` (default: `cuda:0`)\n- **--wan_model_dir**: local Wan2.1 directory (optional)\n- **--tooncomposer_dir**: local ToonComposer directory with `480p/608p` (optional)\n\n### In Gradio UI\n\n1. Set the text prompt, number of output frames, and resolution.\n2. Provide at least one keyframe color image (usually placed at frame index 0).\n3. Add one or more keyframe sketches at selected frames. You can optionally draw black brush regions as motion masks to allow free motion in those areas.\n4. Adjust CFG scale and position-aware residual scale as needed.\n5. Click Generate to create the video.\n\nThe bottom right panel shows status and the generated video. A set of sample inputs is also provided in the gallery.\n\n### Limitations\n\nAs a generative model, outputs may vary. Try changing seed, steps, CFG scale, pos-aware residual scale, or sketch/mask inputs for different results.\n\n## 📑 Citation\n\nIf you find ToonComposer useful, please consider citing:\n\n```\n@article{li2025tooncomposer,\n  title={ToonComposer: Streamlining Cartoon Production with Generative Post-Keyframing},\n  author={Li, Lingen and Wang, Guangzhi and Zhang, Zhaoyang and Li, Yaowei and Li, Xiaoyu and Dou, Qi and Gu, Jinwei and Xue, Tianfan and Shan, Ying},\n  journal={arXiv preprint arXiv:2508.10881},\n  year={2025}\n}\n```\n\n## 📃 License\n\nSee the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTencentARC%2FToonComposer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTencentARC%2FToonComposer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTencentARC%2FToonComposer/lists"}