Agent Skills
› nomadoor/ComfyUI-Video-Stabilizer
› stabilizer-backend-change
stabilizer-backend-change
GitHub用于视频稳定器后端变更的指南,涵盖特征跟踪、光流(DIS/TV-L1)、变换拟合及降级策略。指导在OpenCV环境差异下选择CPU后端并实现安全回退,确保行为确定性。
触发场景
修改运动估计或光流算法
调整OpenCV后端或降级逻辑
处理视频稳定中的变换与平滑
安装
npx skills add nomadoor/ComfyUI-Video-Stabilizer --skill stabilizer-backend-change -g -y
SKILL.md
Frontmatter
{
"name": "stabilizer-backend-change",
"description": "Use when changing Classic\/Flow motion estimation, OpenCV backend selection, fallback behavior, or stabilization math."
}
Stabilizer Backend Change
Use this skill for work on feature tracking, dense optical flow, DIS/TV-L1, transform fitting, smoothing, crop handling, or fallback behavior.
Context
- Classic estimates sparse feature motion with OpenCV GFTT/LK.
- Flow normally uses OpenCV DIS optical flow.
cv2.optflowis not available in standard OpenCV wheels; TV-L1 requires contrib OpenCV or an equivalent available API.- Existing sample workflows use the Flow node.
Rules
- Do not assume
cv2orcv2.optflowexists unless declared and checked. - If a stronger backend is unavailable, prefer safe fallback: perspective -> similarity -> translation -> identity.
- Keep fallback metadata auditable (
flow_backend, applied transform mode, confidence/residual data where available). - Preserve deterministic behavior for identical frames and inputs.
- Avoid GPU-only dependencies; this node is CPU-oriented.
Useful Checks
python3 scripts/validate_repo.py
python3 -c "import cv2; print(cv2.__version__, hasattr(cv2, 'DISOpticalFlow'), hasattr(cv2, 'optflow'))"
If using a ComfyUI venv, run the cv2 check inside that venv too.
版本历史
- d516bf0 当前 2026-07-05 11:55


