🦞 小龙虾品牌
Created by 小龙虾 AI 工作室
"小龙虾,有大钳(前)途!"
Contact for custom services: +86 15805942886
Need custom AI video workflows, automation setup, or bulk content generation? Reach out!
Video Generator + Auto Post
Generate AI videos locally and publish them to social media platforms automatically.
Requirements
Hardware
- - GPU: NVIDIA RTX 3060 12GB or better (recommended)
- RAM: 16GB+ system memory
- Storage: 50GB+ free space on D: drive (recommended)
Software
- - ComfyUI Desktop - Install from https://comfyui.org
- Python 3.10+ - For scripts
- Node.js 18+ - For CLI tools
Quick Start
Step 1: Install ComfyUI
CODEBLOCK0
Step 2: Install Video Models
In ComfyUI Manager, install:
- - Stable Video Diffusion (SVD)
- AnimateDiff
- ModelScope Text-to-Video
Step 3: Configure Output Paths (D: Drive)
Recommended: Store videos on D: drive to save C: space
Edit comfyui/settings.json:
CODEBLOCK1
Or use command line:
CODEBLOCK2
Step 4: Generate Your First Video
- 1. Open ComfyUI
- Load "Text to Video" workflow
- Enter your prompt
- Click "Generate"
- Wait 2-5 minutes (depends on GPU)
Workflows
Text-to-Video (SVD)
Best for: Short clips (2-4 seconds), realistic motion
CODEBLOCK3
Settings:
- - Resolution: 1024x576 or 576x1024
- Frames: 25
- FPS: 6
- Motion bucket: 127 (adjust for more/less movement)
Image-to-Video
Best for: Bringing static images to life
CODEBLOCK4
Tips:
- - Use high-quality source images
- Add motion hints in prompt
- Experiment with motion bucket (100-150)
AnimateDiff (Longer Videos)
Best for: 5-15 second animated clips
CODEBLOCK5
Settings:
- - Context length: 16 frames
- Context overlap: 4 frames
- Model: mmsdv15_v2.ckpt
Auto-Post to Social Media
Platform Specifications
| Platform | Max Duration | Aspect Ratio | Max File Size |
|---|
| Twitter/X | 2:20 | 16:9, 1:1, 9:16 | 512MB |
| TikTok |
10:00 | 9:16 | 287.6MB |
| Instagram Reels | 1:30 | 9:16 | 4GB |
| LinkedIn | 15:00 | 16:9, 1:1, 9:16 | 200MB |
| YouTube Shorts | 1:00 | 9:16 | 128MB |
Automated Posting Script
See scripts/auto-post.py for automation.
Setup:
- 1. Install dependencies: INLINECODE2
- Configure API keys in INLINECODE3
- Run: INLINECODE4
Content Strategy
For each video:
- 1. Generate 3-5 caption variations
- Add relevant hashtags (5-10)
- Schedule posts at optimal times
- Engage with comments
See references/caption-templates.md for examples.
Batch Processing
Generate multiple videos at once:
CODEBLOCK6
Optimization Tips
Speed Up Generation
- 1. Use FP16 precision - 2x faster, minimal quality loss
- Reduce frames - 16 frames instead of 25 for drafts
- Lower resolution - 512x512 for testing, upscale later
- Batch multiple prompts - Process in parallel
Improve Quality
- 1. Use better prompts - Be specific about motion
- Adjust motion bucket - Higher = more movement
- Add negative prompts - Reduce artifacts
- Upscale output - Use ESRGAN or similar
Troubleshooting
Out of Memory (OOM)
Fix:
- - Reduce resolution
- Decrease batch size to 1
- Close other GPU applications
- Use
--lowvram flag
Slow Generation
Fix:
- - Check GPU utilization (should be 90%+)
- Update NVIDIA drivers
- Use INLINECODE7
- Close background apps
Poor Video Quality
Fix:
- - Use more detailed prompts
- Try different models (SVD vs AnimateDiff)
- Adjust motion settings
- Generate at higher resolution, then compress
Scripts
- -
scripts/generate-video.py - Single video generation - INLINECODE9 - Batch processing
- INLINECODE10 - Auto-publish to social media
- INLINECODE11 - Compress for platforms
References
- -
references/prompt-guide.md - Writing effective video prompts - INLINECODE13 - Detailed platform requirements
- INLINECODE14 - Social media caption templates
- INLINECODE15 - ComfyUI workflow examples
Assets
- -
assets/default-workflow.json - Basic text-to-video workflow - INLINECODE17 - Recommended settings per platform
- INLINECODE18 - Curated hashtag collections
Commands / Triggers
Use this skill when:
- - "Generate a video of..."
- "Create AI video for social media"
- "Auto-post this video to..."
- "Batch generate videos from prompts"
- "Optimize video for TikTok/Instagram"
📊 Performance Benchmarks (RTX 3060 12GB)
| Task | Time | VRAM Usage |
|---|
| SVD 25 frames | 2-3 min | 8-10 GB |
| AnimateDiff 16 frames |
3-4 min | 7-9 GB |
| Image-to-Video | 1-2 min | 6-8 GB |
| Upscale 2x | 30-60 sec | 4-6 GB |
Ready to create viral AI videos? Let's go! 🦞🎬
🦞 小龙虾品牌
由小龙虾 AI 工作室创建
小龙虾,有大钳(前)途!
定制服务联系: +86 15805942886
需要定制 AI 视频工作流、自动化设置或批量内容生成?欢迎联系!
视频生成器 + 自动发布
在本地生成 AI 视频并自动发布到社交媒体平台。
系统要求
硬件
- - GPU: NVIDIA RTX 3060 12GB 或更高(推荐)
- 内存: 16GB+ 系统内存
- 存储: D 盘 50GB+ 可用空间(推荐)
软件
- - ComfyUI Desktop - 从 https://comfyui.org 安装
- Python 3.10+ - 用于脚本运行
- Node.js 18+ - 用于 CLI 工具
快速上手
第一步:安装 ComfyUI
bash
Windows(winget)
winget install Comfy.ComfyUI-Desktop
或从 https://comfyui.org 下载
第二步:安装视频模型
在 ComfyUI Manager 中安装:
- - Stable Video Diffusion (SVD)
- AnimateDiff
- ModelScope Text-to-Video
第三步:配置输出路径(D 盘)
推荐: 将视频存储在 D 盘以节省 C 盘空间
编辑 comfyui/settings.json:
json
{
output_directory: D:/AI-Video-Studio/outputs,
model_path: D:/AI-Video-Studio/models,
workflow_path: D:/AI-Video-Studio/workflows,
auto_save: true
}
或使用命令行:
bash
ComfyUI.exe --output-directory D:/AI-Video-Studio/outputs --model-path D:/AI-Video-Studio/models
第四步:生成第一个视频
- 1. 打开 ComfyUI
- 加载文本转视频工作流
- 输入提示词
- 点击生成
- 等待 2-5 分钟(取决于 GPU)
工作流
文本转视频(SVD)
最佳用途: 短视频片段(2-4 秒),逼真运动效果
提示词 → SVD 模型 → 解码 → 保存 MP4
设置:
- - 分辨率:1024x576 或 576x1024
- 帧数:25
- 帧率:6
- 运动幅度:127(可调整以控制运动量)
图片转视频
最佳用途: 让静态图片动起来
图片 + 提示词 → SVD XT → 解码 → 保存 MP4
提示:
- - 使用高质量源图片
- 在提示词中添加运动描述
- 尝试调整运动幅度(100-150)
AnimateDiff(长视频)
最佳用途: 5-15 秒动画片段
提示词 → Stable Diffusion XL → AnimateDiff → 保存 MP4
设置:
- - 上下文长度:16 帧
- 上下文重叠:4 帧
- 模型:mmsdv15_v2.ckpt
自动发布到社交媒体
平台规格
| 平台 | 最长时长 | 画面比例 | 最大文件大小 |
|---|
| Twitter/X | 2:20 | 16:9, 1:1, 9:16 | 512MB |
| TikTok |
10:00 | 9:16 | 287.6MB |
| Instagram Reels | 1:30 | 9:16 | 4GB |
| LinkedIn | 15:00 | 16:9, 1:1, 9:16 | 200MB |
| YouTube Shorts | 1:00 | 9:16 | 128MB |
自动发布脚本
详见 scripts/auto-post.py。
设置:
- 1. 安装依赖:pip install tweepy google-auth
- 在 .env 中配置 API 密钥
- 运行:python scripts/auto-post.py video.mp4 --platforms all
内容策略
每个视频:
- 1. 生成 3-5 个标题变体
- 添加相关标签(5-10 个)
- 在最佳时间安排发布
- 与评论互动
示例见 references/caption-templates.md。
批量处理
一次性生成多个视频:
bash
使用批处理脚本
python scripts/batch-generate.py --prompts prompts.txt --output ./videos
通宵处理 100 个视频
python scripts/batch-generate.py --prompts prompts.txt --count 100 --queue
优化技巧
加速生成
- 1. 使用 FP16 精度 - 速度提升 2 倍,画质损失极小
- 减少帧数 - 草稿用 16 帧代替 25 帧
- 降低分辨率 - 测试用 512x512,后期再放大
- 批量处理多个提示词 - 并行处理
提升画质
- 1. 优化提示词 - 具体描述运动效果
- 调整运动幅度 - 数值越高运动越多
- 添加负面提示词 - 减少伪影
- 放大输出 - 使用 ESRGAN 或类似工具
故障排除
内存不足(OOM)
解决方法:
- - 降低分辨率
- 将批次大小减为 1
- 关闭其他 GPU 应用
- 使用 --lowvram 参数
生成速度慢
解决方法:
- - 检查 GPU 利用率(应达到 90%+)
- 更新 NVIDIA 驱动
- 使用 --precision fp16
- 关闭后台应用
视频画质差
解决方法:
- - 使用更详细的提示词
- 尝试不同模型(SVD vs AnimateDiff)
- 调整运动设置
- 以更高分辨率生成,再压缩
脚本
- - scripts/generate-video.py - 单个视频生成
- scripts/batch-generate.py - 批量处理
- scripts/auto-post.py - 自动发布到社交媒体
- scripts/optimize-video.py - 按平台要求压缩
参考资料
- - references/prompt-guide.md - 编写有效的视频提示词
- references/platform-specs.md - 各平台详细要求
- references/caption-templates.md - 社交媒体标题模板
- references/workflow-examples.json - ComfyUI 工作流示例
资源文件
- - assets/default-workflow.json - 基础文本转视频工作流
- assets/optimal-settings.json - 各平台推荐设置
- assets/hashtag-lists.json - 精选标签集合
命令 / 触发词
在以下场景使用此技能:
- - 生成一个关于...的视频
- 为社交媒体创建 AI 视频
- 将此视频自动发布到...
- 根据提示词批量生成视频
- 为 TikTok/Instagram 优化视频
📊 性能基准测试(RTX 3060 12GB)
| 任务 | 时间 | 显存占用 |
|---|
| SVD 25 帧 | 2-3 分钟 | 8-10 GB |
| AnimateDiff 16 帧 |
3-4 分钟 | 7-9 GB |
| 图片转视频 | 1-2 分钟 | 6-8 GB |
| 2 倍放大 | 30-60 秒 | 4-6 GB |
准备好创作爆款 AI 视频了吗?开始吧!🦞🎬