Community研究与数据分析github.com

lingyu9495-source/lowvram-ai-video-comfyui

网上的 AI 视频教程开口就是 24G 显存,一看就把人劝退——**其实 8G 的 4060 也能跑**。这套是 RTX 4060 Laptop 8G 显存 / 32G 内存 / Win11 上真跑出来的配置与调参。

lowvram-ai-video-comfyui 是什么?

lowvram-ai-video-comfyui is a Claude Code agent skill that 网上的 AI 视频教程开口就是 24G 显存,一看就把人劝退——**其实 8G 的 4060 也能跑**。这套是 RTX 4060 Laptop 8G 显存 / 32G 内存 / Win11 上真跑出来的配置与调参。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lingyu9495-source/agent-skills/tree/main/skills/lowvram-ai-video-comfyui

Installed? Explore more 研究与数据分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

预览

来自技能 README

Nine-rank Jinli e WeChat QR Code

文档

Local AI Video Generation (ComfyUI + Wan / LTX)

Baseline machine: RTX 4060 Laptop 8GB VRAM / 32GB RAM / Win11. Positioning: Local output of low-resolution, a few seconds of anime short videos (sufficient for self-media). Don't treat 8GB as 16GB.

When to Use

When the user says "run a video model / text-to-video / image-to-video", or when you need to hand over the local video production environment to an executor (team member, etc.) for further experimentation.

Build Understanding First (Avoid Wrong Choices)

  • Text-to-Video (T2V) and Image-to-Video (I2V) are two separate models; they cannot replace each other:
    • Wan2.1-1.3B only supports T2V; Wan's I2V is only available as 14B (8GB can't run it).
    • I2V that 8GB can run = LTX-2B fp8 (requires t5xxl encoder additionally).
  • Long video / character consistency: Pure T2V cannot achieve "continuous segments with the same protagonist"; the correct approach is I2V using the same character image as the first frame, generating segments one by one and then concatenating them. Hard concatenating N segments of T2V will inevitably cause character drift.
  • Ollama and ComfyUI models are not interchangeable: Ollama is a language model (for writing prompts / scenarios), ComfyUI is a diffusion model (for generating videos). They work cooperatively, not as replacements.

Deployment Order (Do in sequence; skipping will cause issues)

1) Install ComfyUI Portable Version (place on D drive, don't occupy C drive)

  • Get ComfyUI_windows_portable_nvidia.7z from Comfy-Org/ComfyUI GitHub releases (includes Python + torch + CUDA).
  • ⚠️ Under bash, 7z x -o"/d/..." will corrupt MSYS paths, and the output won't land in the target directory (extraction reports success but the directory is empty). → Use Python subprocess with native Windows paths to call 7z.

2) Upgrade ComfyUI to the latest version (older versions lack Wan/LTX nodes)

  • Direct GitHub connection often fails with Connection was reset → First configure the mirror: git config --global url."https://ghfast.top/https://github.com/".insteadOf "https://github.com/", then git pull --ff-only origin master.

3) Upgrade Python dependencies: python_embeded\python.exe -s -m pip install -r ComfyUI\requirements.txt (new version will add comfy-kitchen etc.).

4) torch must match comfy-kitchen (troubleshoot step by step based on symptoms):

SymptomRoot CauseAction
module 'torch.library' has no attribute 'custom_op'torch < 2.4Upgrade torch
infer_schema ... unsupported type list[int]torch and comfy-kitchen mismatchUpgrade to cu130 torch (2.14+)
cudaErrorNotSupported / likely using older driverDriver CUDA version insufficientUpgrade NVIDIA driver
  • First check driver support: nvidia-smi to see CUDA Version; if CUDA 13 is needed, upgrade the driver.
  • Get the latest driver: NVIDIA driver query API (AjaxDriverService, for RTX 40 series laptop psid=138/pfid=1005) to obtain DownloadURL; download requires browser UA + Referer, otherwise 403. Silent install with -s -noreboot; after installation, confirm with nvidia-smi, usually no reboot needed for torch to recognize the GPU.

5) Models must be in ComfyUI standard format (most common pitfall)

  • From Comfy-Org/Wan_2.1_ComfyUI_repackaged's split_files/ safetensors:
    • diffusion_models/wan2.1_t2v_1.3B_fp16.safetensors (~2.8GB)
    • text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors (~6.7GB)
    • vae/wan_2.1_vae.safetensors (~0.25GB)
  • ⚠️ Using Wan's official raw .pth files (e.g., models_t5_umt5-xxl-enc-bf16.pth) → errors with Cannot copy out of meta tensor; no data! (during CLIPTextEncode). This is a format/name mismatch, not a VRAM issue—don't adjust VRAM parameters.
  • Domestic download: HuggingFace direct connection may fail → use hf-mirror.com; curl -C - --retry 999 --retry-all-errors for resumable download.
  • Destination: ComfyUI\models\{diffusion_models,text_encoders,vae}\.

6) Install ffmpeg (required for video encoding): python_embeded\python.exe -s -m pip install imageio-ffmpeg imageio (includes static ffmpeg). Without it, SaveVideo step will report [Errno 22].

7) Start the service

python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --disable-async-offload > log.txt 2>&1
  • --disable-async-offload: For 8GB, prevents text encoder weights from staying on the meta device.
  • ⚠️⚠️ Never use | head / | tee piping to start such long-running services: tqdm progress bar writing to a closed pipe → [Errno 22] Invalid argument directly interrupts KSampler, looking like a model error but actually a startup method problem. Use > log 2>&1 for redirection. This pitfall applies to any long-running process/gateway—a closed pipe can kill the process.
  • Check readiness: netstat -ano | grep :8188 shows LISTENING.

Run Text-to-Video (T2V)

  • Node chain: follow templates/wan21_t2v_workflow.json exactly: CLIPLoader(type=wan) + VAELoader + UNETLoader + EmptyHunyuanLatentVideo + CLIPTextEncode(positive/negative) + KSampler + VAEDecode + CreateVideo + SaveVideo
    • Use EmptyHunyuanLatentVideo for video latent; output must go through CreateVideo → SaveVideo.
    • ⚠️ VAEDecode output is IMAGE; connecting directly to SaveVideo will report received_type(IMAGE) mismatch input_type(VIDEO).
  • Submit: POST http://127.0.0.1:8188/prompt, body {"prompt": {node_id: {class_type, inputs}}}; returns node_errors:{} on success.
  • Check progress: GET /history/<prompt_id> to see status.status_str (running/success/error); on error, read messages for execution_error (contains node_id/node_type/exception_message).
  • Tested and usable parameters for 8GB: 832×480, length 33 (~2 seconds), steps 15-20, cfg 5.5-6.0, fps 16. Exceeding this will offload to memory, making it extremely slow.
  • Outputs in ComfyUI\output\*.mp4; use imageio_ffmpeg.get_ffmpeg_exe() to call ffmpeg to verify duration/resolution.

Run Image-to-Video (I2V)

  • Use LTX-2B: ltxv-2b-0.9.8-distilled-fp8.safetensors (~4.5GB) → models\diffusion_models\; text encoder uses t5xxl: t5xxl_fp8_e4m3fn.safetensors (~4.9GB, from comfyanonymous/flux_text_encoders) → models\text_encoders\.
  • ⚠️ LTX uses t5xxl, Wan uses umt5; they are not interchangeable; both need to be downloaded.
  • Consistency strategy: Use a fixed character image as the first frame for each segment, or use IPAdapter/InstantID to inject the character.

Preparation Before Running (8GB VRAM)

  • Close VRAM-consuming software like Chrome (system/desktop typically use ~1.2GB, Chrome can use ~1.9GB).
  • Run tasks sequentially; don't run multiple generations concurrently.

Deliver to Executors

Handover document structure (follow this): Environment path → Startup command (with parameters) → Model list (filename + directory + size) → Reusable workflow JSON → 8GB parameter tips → Troubleshooting quick reference → Next steps.

References

  • templates/wan21_t2v_workflow.json — Tested and working Wan2.1-1.3B text-to-video workflow (ComfyUI API format, can be POSTed directly)

About the Author

Nine-rank Jinli e | Encapsulating the pitfalls I've stepped into into a "ready-to-run" skill, not a textbook.

This skill is the version I use myself; every pitfall mentioned here is one I actually encountered. If you get stuck during use, want advanced techniques, or have other scenarios you'd like me to package into a skill, just add me on WeChat directly, mention "SkillHub" for priority approval:

Nine-rank Jinli e WeChat QR Code

Scan the QR code to add the author on WeChat · Mention "SkillHub" for priority approval

Individual skills in this repo

This repo contains 17 individual skills — each has its own dedicated page.

lingyu9495-source/agent-responsiveness-delegation

你给 AI 助手派了个重活,然后发现:发消息它不回、想插话只能排队、等十几分钟才回一句——等它抬头,需求早变了。根因不是模型慢,是主脑把重活放在前台跑,整个回合被占死。这个 Skill 把这套「重活外派 + 随时应答」机制做成可落地的东西:① 规则块(一页写清判级、派完立刻让出对话、工单四要素、只回收结论、自报≠事实、拍板留主脑、跨会话任务换机制)② 跨平台落地脚本 provision_agent_responsiveness.py:探测本机已有的 Agent 环境(Hermes 的 SOUL 置顶铁律块、Claude Code 的全局指令文件,这两条已实测),把规则块幂等写入(自动备份原文件、重复执行不重复写、绝不覆盖你已有内容);其余平台(Codex / Cursor / WorkBuddy / 任意 Agent)则导出一份可直接粘贴的规则块 markdown,你粘到系统提示或自定义指令里就生效 ③ 体检脚本 audit_agent_responsiveness.py:逐项核对规则块是否存在、是否被后续改动覆盖、探测到哪些平台——没检测到就如实报「未检测到支持的平台」,不假报通过。纯标准库、零依赖、Windows/macOS/Linux 通用。触发词:AI不回话、等太久、插话卡住、助手响应慢、主脑被占住、重活外派、子代理、多智能体、响应速度、落地配置、系统提示。

lingyu9495-source/ai-image-watermark-removal-boss

去除 AI 生成图角落的"XXAI生成"半透明/白色角标水印。像素级验证不自我欺骗、双信号交叉定位抗幻觉、多候选客观指标投票覆盖。当用户要求去除图片水印、清理 AI 生成角标、去"豆包/即梦/Kolors 生成"水印时使用。

lingyu9495-source/bank-scan-household-splitter

客户丢来一个压缩包,里面几百张身份证正反面、开卡申请书、合同——**人工一张张挑,一下午就没了,还容易漏**。

lingyu9495-source/cn-pdf-report-typeset

中文报告做成 PDF,常见翻车三件套:**字体乱码、表格错位、字号小到客户在手机上根本看不清**。这套是交付级的排版标准加可直接跑的模板。

lingyu9495-source/company-law

公司出事,十有八九出在**治理和控制权**上——股权结构一开始搭歪,后面融资、上市、分家全是坑。

lingyu9495-source/excel-keep-format-edit

客户拿来一张老报表说「就在原表上改个数,格式一点都不要动」——用 openpyxl 重建一次,字体、边框、合并单元格、条件格式、列宽全丢,客户一打开就知道这不是他原来那张表。

lingyu9495-source/feasibility-report-engine

做可研报告,卡住的往往不是不会写,是**不知道按哪版大纲、财务测算六表和正文对不上、交付前排版被退稿**。这套是从二十多万字、131 张表的真实交付里固化的流水线。

lingyu9495-source/feasibility-study-consultant

项目可行性论证与研究报告写作框架 —— 任何「这事能不能做、怎么做、值不值得做」的商业决策场景:可行性研究/立项论证/新项目评估/创业方向验证。10大论证模块 + 强制联网尽调 + 多源交叉验证 + 读者视角写作 + 结构化报告输出。(v1.4 升级:从「引导客户把项目情况讲清楚」到「按问题类型与项目类型选论证方法」再到「用假设台账逐条验证」的六步教练流程;附可行性门槛评分器与假设台账两个零依赖脚本、项目卡与决策门清单模板)

lingyu9495-source/financial-statement-adjustment

存量财务报表在原表基础上改数字并保持三表勾稽关系。当用户要求「在原报表上改某些数字,其他数据跟着调整且格式完全不变」时使用:资产负债表/利润表/现金流量表的目标值调整、未分配利润与利润总额联动、勾稽校验。

lingyu9495-source/funding-fit-diagnosis

项目想融资,卡住的往往不是不会写 BP,而是不知道够不够格、该找谁、还缺什么、多久能到钱——问 AI 只得到"建议加强团队"这类正确的废话。这套引擎把它拆成可执行的四步:①10 问项目画像采集(缺关键项就先追问,不猜)②双轨评分:市场化 VC 适配分与政府基金适配分**分开算、各自判定**(≥75 强匹配 / 60-74 可争取 / 45-59 需补短板 / <45 暂不建议,低分不许只说"不行",要给替代路径)③点名机构:按赛道/阶段/地域从 23 家头部 VC 与产业资本(CVC)、21 家政府基金的卡片里逐条对照"匹配信号/劝退信号",每家写清"为什么是你、你还缺什么、材料怎么准备、递送路径",并单列"不建议碰"的机构省时间④差距清单(差距|补齐动作|耗时|难度|优先级,只挑 3 个月内能推动的)+ 三线找钱路线图(市场化 / 政府 / 替代路径)+ 时间预期与现金流提醒。包内另附 30 个真实融资案例对标、TS 条款红线、估值倍数参考、BP 制作铁律,以及零依赖离线评分脚本(纯标准库、不联网、不调大模型 API)。输入:项目情况(照着 10 问答即可);输出:一份研判报告(评分 + 优先接触名单 + 差距清单 + 路线图 + 风险提示),脚本侧可另出 JSON 评分结果。评分是适配度不是成功率,不承诺融资结果。触发词:融资、找投资、融资研判、能不能融到钱、找哪家风投、风险投资、VC、产业资本、CVC、政府引导基金、政府基金申报、产业基金、招商返投、项目申报、补贴申报、商业计划书、BP、路演、估值、股权稀释、TS 条款、对赌、回购、FA、财务顾问、找钱、融资渠道、天使轮、Pre-A、A轮。

lingyu9495-source/gov-fund-application

想拿政府的钱,最容易白跑半年——层级选错、赛道不在目录里、返投算不清,材料递上去才发现方向不对。这套参谋按可执行顺序走:①先判层级(国家级/省级/市级/区级,门槛与目的完全不同)②赛道对目录:不在目录里直接如实说没戏,不让用户白跑③21 家基金卡片逐家对照(投资方式、返投比例、让利规则、申报条件、申报通道、真实案例),点名"你这个项目适合找谁"④返投博弈:算清落地要求,给"不想迁注册地"的三条合规路径⑤材料与时间表:申报材料清单、评审周期(6-12 个月是常态)与现金流提醒。与主技能 `funding-fit-diagnosis` 配套(做整体融资研判时用主技能,VC 与政府双轨分开算)。输入:项目基本情况与注册地/落地意愿;输出:层级判定 + 可申报基金名单 + 返投方案 + 材料清单 + 时间预期。不承诺拿到资金,申报须如实提交材料;政策口径标注截止时间,细则请向当地主管部门核实。触发词:政府基金、政府引导基金、产业基金、政府补贴、专项资金、项目申报、补贴申报、申报条件、返投、招商落地、母基金、投资方式、让利、国家级基金、省级引导基金、市级基金、科技成果转化、专精特新、科技型企业、中小企业发展基金。

lingyu9495-source/hermes-profile-browser-isolation

多个 AI 助手同时干活时,浏览器会互相抢占:弹窗抢焦点、任务互相打断、你正在用的 Chrome/Edge 被顶掉——**你连自己的网页都点不动了**。

lingyu9495-source/investment-finance

做投融资最容易踩的坑不是"不懂概念",是**条款里的每一个字都在分钱**——估值方法选错、对赌触发条件写松、回购条款没兜底,签完才发现少拿几千万。

lingyu9495-source/novel-deai-detector

写完的稿子发布前想知道会不会被判 AI 生成、平台审核会不会卡、读者会不会一眼看出机器味——这套是检测到清洗的完整闭环。

lingyu9495-source/npl

不良资产这行的钱,赚在**买入价**上——买贵了,后面怎么处置都白搭。

lingyu9495-source/subagent-first

AI 助手不是不够聪明,是被重活占住了:你让它整理 40 个文件,它一头扎进去十几分钟不抬头——你想问进度、想补需求、想改方向,只能干等。这套作业纪律解决的就是这件事:凡是预计要跑多轮的活(多文件/长研究/批量/长搜索),一律派给后台子代理并行执行,主代理只保留四个动作——拆解、派活、汇总、对话,永远保留随时回你话的能力。我们自己在多智能体团队里天天跑,踩过的 12 个坑全部写进正文:子代理自报成功却发现产出是空的、context 没写全导致跑偏返工、两个子代理并行写同一文件互相覆盖、把需要用户拍板的活派给问不了人的子代理、跨会话长任务错用子代理导致某天悄悄停掉……① 决策树四问判定轻重(一轮工具调用能做完吗/需要用户拍板吗/要活过本次会话吗/能拆成互不依赖的块吗)② 派活四要素(goal / context 必须自包含——子代理看不到你和用户的对话 / output_schema / 验收方式)③ 五步流程:拆解→派活→并行调度→验收→收口 ④ 验收清单:存在性/合规性/真实性/完整性四组逐项打勾,并随机抽一处回一手来源核对 ⑤ 6 种委派模式 + 12 条反模式。配套 scripts/delegation_planner.py:纯标准库零依赖,喂一份任务清单(轮数/文件数/是否研究/是否批量/是否需拍板/是否不可逆/是否跨会话),直接输出「该派子代理 / 自己做 / 转定时任务」+ 并行分组建议 + 主代理必做清单。正文按平台无关的作业纪律写,并附常见平台工具名对照表;Hermes 的字段名/并发上限/后台语义另附一页实况对齐,其他平台按对照表映射即可。触发词:子代理、委派、delegate、任务编排、多智能体、并行执行、上下文管理、主代理被占住、AI不回话、等太久、插话卡住、批量处理、长研究、fork-join、fan-out。

lingyu9495-source/ts-term-review

拿到 TS 或投资协议,看半天不知道哪条能签哪条得改——风险全藏在具体条目里,一句"整体没大问题"最要命。这套审查按 15 条核心条款逐条过:估值 Pre/Post、清算优先权、反稀释(完全棘轮是红线)、优先购买权、领售/拖售、对赌与业绩承诺、回购条款、个人连带担保、董事会与一票否决、保护性条款、竞业与知识产权、信息权、交割条件、股东会表决权、违约责任。每条给三级判定(🔴 红线不改就别签 / 🟡 可谈争取改 / 🟢 行业惯例)+ 谈判话术 + 替代方案,并区分"对公司"和"对创始人个人"——个人连带回购是绝大多数血案的源头,重点标红。另附谈判筹码排序、常见坑清单、BP 与数据室准备。与主技能 `funding-fit-diagnosis` 配套(做整体融资研判时用主技能)。输入:TS/投资协议条款(粘贴或描述);输出:逐条判定表 + 必须改的清单 + 谈判话术 + 底线建议。**不构成法律意见**,正式签署与司法效力请找执业律师确认。触发词:TS、Term Sheet、投资条款清单、投资协议、增资协议、股权转让协议、对赌、业绩承诺、回购、清算优先权、反稀释、完全棘轮、个人连带、一票否决、领售权、拖售权、估值、Pre/Post、股权稀释、条款谈判、FA。

相关技能