[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72041":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":8,"rankLanguage":8,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":8,"pushedAt":8,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},72041,"ComfyUI-WanVideoWrapper","kijai\u002FComfyUI-WanVideoWrapper","kijai",null,"Python",6516,661,74,1230,0,16,45,111,48,111.46,"Apache License 2.0",false,"main",true,[],"2026-06-12 04:01:03","# ComfyUI wrapper nodes for [WanVideo](https:\u002F\u002Fgithub.com\u002FWan-Video\u002FWan2.1) and related models.\n\n\n## Memory use update (again)\n\nI've made everythign less reliant on torch.compile for VRAM efficiency, so things should work better even without it. Also figured workaround for some issues when using compile that made first run use drastically more VRAM, issue I battled with myself a lot.\n\n\n## Update notification that can affect memory use in old workflows\n\nIn a recent update I changed how unmerged LoRA weights are handled:\n\nPreviously mostly due to my laziness they were always loaded from RAM when used, this was of course inefficient and also made using torch.compile for LoRA applying difficult, thus forcing a graph break when using unmerged LoRAs.\n\nNow the LoRA weights are assigned as buffers to the corresponding modules, so they are part of the blocks and obey the block swapping unifying the offloading and allowing LoRA weights to benefit from the prefetch feature for async offoading. Downside is that this means if you did not use block swap, you will see increased memory use as the LoRAs are part of the model and all on VRAM.\n\nIf you use block swap, the LoRAs are swapped along the rest of the block, but the block size is now larger, this means you may have to compensate with couple of more blocks swapped.\n\nExample situation: you use 1GB LoRA unmerged and swap 20 blocks on 14B model, we can divide the LoRA size by block count, single block grows by 25MB, 20 blocks grow by 500MB, so your VRAM usage would be 500MB more than before, to compensate you swap 2 more blocks.\n\n### Unrelated other VRAM issue with torch.compile\n\nAfter any update that modifies the model code and when using torch.compile it's common to run into issues with VRAM, this can be caused by using older pytorch\u002Ftriton version without latest compile fixes, and\u002For from old triton caches, mostly in Windows. This manifests in the issue that first run of new input size may have drastically increased memory use, which can clear from simply running it again, and once cached, not manifest again. Again I've only seen this happen in Windows.\n\nTo clear your Triton cache you can delete the contents of following (default) folders:\n\n`C:\\Users\\\u003Cusername>\\.triton`\n`C:\\Users\\\u003Cusername>\\AppData\\Local\\Temp\\torchinductor_\u003Cusername>`\n\n\n## Note: Due to the stupid amount of bots or people thinking this is some of video generation service, I've blocked new accounts from posting issues for now.\n\n# WORK IN PROGRESS (perpetually)\n\n# Why should I use custom nodes when WanVideo works natively?\n\nShort answer: Unless it's a model\u002Ffeature not available yet on native, you shouldn't.\n\nLong answer: Due to the complexity of ComfyUI core code, and my lack of coding experience, in many cases it's far easier and faster to implement new models and features to a standalone wrapper, so this is a way to test things relatively quickly. I consider this my personal sandbox (which is obviously open for everyone) to play with without having to worry about compability issues etc, but as such this code is always work in progress and prone to have issues. Also not all new models end up being worth the trouble to implement in core Comfy, though I've also made some patcher nodes to allow using them in native workflows, such as the [ATI](https:\u002F\u002Fhuggingface.co\u002Fbytedance-research\u002FATI) node available in this wrapper. This is also the end goal, idea isn't to compete or even offer alternatives to everything available in native workflows. All that said (this is clearly not a sales pitch) I do appreciate everyone using these nodes to explore new releases and possibilities with WanVideo.\n\n# Installation\n1. Clone this repo into `custom_nodes` folder.\n2. Install dependencies: `pip install -r requirements.txt`\n   or if you use the portable install, run this in ComfyUI_windows_portable -folder:\n\n  `python_embeded\\python.exe -m pip install -r ComfyUI\\custom_nodes\\ComfyUI-WanVideoWrapper\\requirements.txt`\n\n## Models\n\nhttps:\u002F\u002Fhuggingface.co\u002FKijai\u002FWanVideo_comfy\u002Ftree\u002Fmain\n\nfp8 scaled models (personal recommendation):\n\nhttps:\u002F\u002Fhuggingface.co\u002FKijai\u002FWanVideo_comfy_fp8_scaled\n\nText encoders to `ComfyUI\u002Fmodels\u002Ftext_encoders`\n\nClip vision to `ComfyUI\u002Fmodels\u002Fclip_vision`\n\nTransformer (main video model) to `ComfyUI\u002Fmodels\u002Fdiffusion_models`\n\nVae to `ComfyUI\u002Fmodels\u002Fvae`\n\nYou can also use the native ComfyUI text encoding and clip vision loader with the wrapper instead of the original models:\n\n![image](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F6a2fd9a5-8163-4c93-b362-92ef34dbd3a4)\n\nGGUF models can now be loaded in the main model loader as well.\n\n---\nSupported extra models:\n\nSkyReels: https:\u002F\u002Fhuggingface.co\u002Fcollections\u002FSkywork\u002Fskyreels-v2-6801b1b93df627d441d0d0d9\n\nWanVideoFun: https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Falibaba-pai\u002Fwan21-fun-v11-680f514c89fe7b4df9d44f17\n\nReCamMaster: https:\u002F\u002Fgithub.com\u002FKwaiVGI\u002FReCamMaster\n\nVACE: https:\u002F\u002Fgithub.com\u002Fali-vilab\u002FVACE\n\nPhantom: https:\u002F\u002Fhuggingface.co\u002Fbytedance-research\u002FPhantom\n\nATI: https:\u002F\u002Fhuggingface.co\u002Fbytedance-research\u002FATI\n\nUni3C: https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FUni3C\n\nMiniMaxRemover: https:\u002F\u002Fhuggingface.co\u002Fzibojia\u002Fminimax-remover\n\nMAGREF: https:\u002F\u002Fhuggingface.co\u002FMAGREF-Video\u002FMAGREF\n\nFantasyTalking: https:\u002F\u002Fgithub.com\u002FFantasy-AMAP\u002Ffantasy-talking\n\nFantasyPortrait: https:\u002F\u002Fgithub.com\u002FFantasy-AMAP\u002Ffantasy-portrait\n\nMultiTalk: https:\u002F\u002Fgithub.com\u002FMeiGen-AI\u002FMultiTalk\n\nEchoShot: https:\u002F\u002Fgithub.com\u002FD2I-ai\u002FEchoShot\n\nStand-In: https:\u002F\u002Fgithub.com\u002FWeChatCV\u002FStand-In\n\nHuMo: https:\u002F\u002Fgithub.com\u002FPhantom-video\u002FHuMo\n\nWanAnimate: https:\u002F\u002Fgithub.com\u002FWan-Video\u002FWan2.2\u002Ftree\u002Fmain\u002Fwan\u002Fmodules\u002Fanimate\n\nLynx: https:\u002F\u002Fgithub.com\u002Fbytedance\u002Flynx\n\nMoCha: https:\u002F\u002Fgithub.com\u002FOrange-3DV-Team\u002FMoCha\n\nUniLumos: https:\u002F\u002Fgithub.com\u002Falibaba-damo-academy\u002FLumos-Custom\n\nBindweave: https:\u002F\u002Fgithub.com\u002Fbytedance\u002FBindWeave\n\nTraining free techniques:\n\nTimeToMove: https:\u002F\u002Fgithub.com\u002Ftime-to-move\u002FTTM\n\nSteadyDancer: https:\u002F\u002Fgithub.com\u002FMCG-NJU\u002FSteadyDancer\n\nOne-to-all-Animation: https:\u002F\u002Fgithub.com\u002Fssj9596\u002FOne-to-All-Animation\n\nSCAIL: https:\u002F\u002Fgithub.com\u002Fzai-org\u002FSCAIL\n\n\nNot exactly Wan model, but close enough to work with the code base:\n\nLongCat-Video: https:\u002F\u002Fmeituan-longcat.github.io\u002FLongCat-Video\u002F\n\n\nExamples:\n---\n\nWanAnimate:\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ff370b001-0f98-4c4c-bcb5-cfad0b330697\n\n[ReCamMaster](https:\u002F\u002Fgithub.com\u002FKwaiVGI\u002FReCamMaster):\n\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fc58a12c2-13ba-4af8-8041-e283dbef197e\n\n\nTeaCache (with the old temporary WIP naive version, I2V):\n\n**Note that with the new version the threshold values should be 10x higher**\n\nRange of 0.25-0.30 seems good when using the coefficients, start step can be 0, with more aggressive threshold values it may make sense to start later to avoid any potential step skips early on, that generally ruin the motion.\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F504a9a50-3337-43d2-97b8-8e1661f29f46\n\n\nContext window test:\n\n1025 frames using window size of 81 frames, with 16 overlap. With the 1.3B T2V model this used under 5GB VRAM and took 10 minutes to gen on a 5090:\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F89b393af-cf1b-49ae-aa29-23e57f65911e\n\n---\n\n\nThis very first test was 512x512x81\n\n~16GB used with 20\u002F40 blocks offloaded\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ffa6d0a4f-4a4d-4de5-84a4-877cc37b715f\n\nVid2vid example:\n\n\nwith 14B T2V model:\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fef228b8a-a13a-4327-8a1b-1eb343cf00d8\n\nwith 1.3B T2V model\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F4f35ba84-da7a-4d5b-97ee-9641296f391e\n\n\n\n","ComfyUI-WanVideoWrapper 是一个为 WanVideo 及其相关模型提供 ComfyUI 包装节点的项目。它通过优化内存使用和减少对 torch.compile 的依赖来提高 VRAM 效率，解决了在使用 LoRA 时遇到的一些内存问题，并允许更灵活地处理未合并的 LoRA 权重。此项目特别适合需要高效利用 GPU 内存资源进行视频处理或生成任务的开发者，尤其是在处理大型模型时希望优化 VRAM 使用的情况。此外，对于那些希望在 ComfyUI 环境中测试新模型或功能的人来说，该项目也提供了便利。",2,"2026-06-11 03:40:04","high_star"]