Skip to content

MANFIT7/comfy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ComfyUI Wan Animate - Video Generation Scripts

Kumpulan scripts untuk generate video menggunakan Wan Animate di ComfyUI.

πŸ“ Files

Working Scripts (Tested & Success)

  • run-workflow-simple-with-video.ts - Main script dengan video motion reference βœ…
  • run-workflow-correct.ts - Workflow dengan parameter original
  • run-workflow-http.ts - Upload files + run workflow

RunPod API Scripts

  • run-workflow-runpod-api.ts - RunPod serverless API (requires custom deployment)
  • check-runpod-capabilities.ts - Test endpoint capabilities

Deployment Files

  • Dockerfile.runpod - Docker image untuk deploy custom ComfyUI
  • handler.py - RunPod serverless handler

βœ… Hasil yang Berhasil

Video berhasil di-generate dengan settings optimal:

https://zqyh42lvmsz2qy-8188.proxy.runpod.net:443/view?filename=WanComfy_00003.mp4&type=output
https://zqyh42lvmsz2qy-8188.proxy.runpod.net:443/view?filename=WanComfy_00006.mp4&type=output

🎯 Parameter Optimal (VRAM Friendly)

{
  video_width: 720,
  video_height: 1280,
  video_length_frames: 144,    // 9 seconds @ 16fps
  skip_first_frames: 24,        // Skip 1.5 detik
  steps: 6,                     // Balanced quality/speed
  cfg_scale: 1.2,
  positive_prompt: "photorealistic video of blond women wearing navy blue bikini",
  negative_prompt: "blurry, low quality, distorted, noise, grainy, artifacts, watermark"
}

πŸš€ Cara Pakai

Option 1: ComfyUI Direct (Recommended)

Jika punya akses ke ComfyUI server langsung:

# 1. Upload files dulu (myimage.png, myvideo.mp4)
# 2. Update server URL di script (line 271)
# 3. Run
npx tsx run-workflow-simple-with-video.ts

Option 2: RunPod Serverless

Problem: Endpoint RunPod saat ini (ns0kzuko048dbt) tidak support custom nodes:

  • ❌ VHS_LoadVideo tidak tersedia
  • ❌ WanAnimateToVideo tidak tersedia

Solutions:

A. Deploy Custom Docker Image

# 1. Build Docker image dengan Wan Animate
docker build -f Dockerfile.runpod -t your-registry/comfyui-wan:latest .

# 2. Push to Docker registry
docker push your-registry/comfyui-wan:latest

# 3. Deploy di RunPod Serverless:
#    - Go to RunPod > Serverless
#    - Create new endpoint
#    - Use custom Docker image
#    - Configure GPU & storage

B. Gunakan RunPod GPU Pod (Non-Serverless)

# 1. Launch RunPod GPU Pod
# 2. Install ComfyUI + Wan Animate
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install -r requirements.txt

# Install custom nodes
cd custom_nodes
git clone <WAN_ANIMATE_REPO>
git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite

# 3. Download models (Wan 2.2, VAE, CLIP)
# 4. Start ComfyUI
python main.py --listen 0.0.0.0 --port 8188

# 5. Update script dengan pod URL

C. Alternative: Replicate API

Cari Wan Animate model di Replicate.com yang sudah deployed.

πŸ“Š Troubleshooting

Issue 1: Noise di Video

Cause: Steps terlalu rendah (4) Fix: Naikkan ke 6-8 steps, tapi reduce frame count untuk VRAM

Issue 2: Frame Pertama Static Image

Cause: Video belum mulai bergerak Fix: skip_first_frames: 24 (1.5 detik)

Issue 3: Out of Memory (OOM)

Cause: Resolution + frames terlalu besar Fix:

  • Reduce resolution: 1080x1920 β†’ 720x1280
  • Reduce frames: 176 β†’ 144
  • Reduce steps: 20 β†’ 6

Issue 4: Server 404 Error

Cause: ComfyUI server shutdown (RunPod auto-shutdown) Fix: Restart server atau launch new pod

πŸ”§ Advanced Configuration

Custom Video Settings

Edit di run-workflow-simple-with-video.ts:

const inputs = {
  positive_prompt: "YOUR_PROMPT_HERE",
  video_width: 720,           // Max 1080 untuk VRAM 24GB
  video_height: 1280,         // Vertical video
  video_length_frames: 144,   // 9 detik @ 16fps
  seed: 940412395777954,      // Random atau fixed
  steps: 6,                    // 4-8 range optimal
  cfg_scale: 1.2,             // 1.0-2.0 range
};

Skip More Frames

Jika masih ada static image:

skip_first_frames: 32,  // Skip 2 detik

πŸ“ Workflow Structure

Workflow menggunakan:

  1. LoadImage - Load subject image
  2. VHS_LoadVideo - Load reference video (motion)
  3. CLIPTextEncode - Process prompts
  4. CLIPVisionEncode - Extract visual features
  5. WanAnimateToVideo - Generate latent with motion
    • face_video: Video reference untuk wajah
    • pose_video: Video reference untuk pose
    • background_video: Video reference untuk background
  6. KSampler - Denoise latents
  7. VAEDecode - Decode to pixels
  8. VHS_VideoCombine - Combine frames to video

🎬 Input Files

  • myimage.png - Subject image (390KB)
  • myvideo.mp4 - Reference video (2.7MB, 332 frames @ 30fps)

πŸ“¦ Dependencies

{
  "dependencies": {
    "@types/node": "^24.10.1",
    "form-data": "^4.0.4"
  },
  "devDependencies": {
    "@types/form-data": "^2.2.1",
    "ts-node": "^10.9.2",
    "typescript": "^5.9.3"
  }
}

🌐 Resources

πŸ“„ License

MIT


Note: Wan Animate models sangat besar (~14GB). Pastikan storage cukup saat deploy.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors