Unleash Creative Video Generation: How to Pack Objects into Gift Boxes with LoRA Effects

CN
ComfyUI.org
2025-04-11 12:11:01

1. Workflow Overview

m9cqwqey8oafbi5j83v8df3e2e1e94ea4d68207bac855e6c6ef3af79a43dea198403ea74e0a0a1731bb.gif
  • Function: Generates animated videos that pack input objects (e.g., dolls) into gift boxes with LoRA effects.

  • Goal: Combine WAN video models and LoRAs for creative video generation.

  • Key Models:

    • WAN2.1-I2V-14B (Base video model, FP8 precision).

    • "Packed into Box" LoRA (Animation effect).

    • UMT5-XXL (Text encoder for prompts).


2. Node Breakdown

Critical Nodes:

  1. WanVideoModelLoader: Loads WAN model (Wan2_1-I2V-14B-480P_fp8_e4m3fn.safetensors).

  2. WanVideoLoraSelect: Applies effect LoRA (e.g., "Packed into Box").

  3. LoadImage: Input static image (e.g., "POPMART-style doll").

  4. WanVideoTextEncode: Encodes prompts (e.g., "Bounce into a gift box").

  5. WanVideoSampler: Generates video frames (sampler: dpm++_sde, 20 steps).

  6. VHS_VideoCombine: Exports MP4 (16fps, H.264).

Dependencies:

  • WAN Models: Download Wan2_1-I2V-14B and Wan2_1_VAE to models/wan_video.

  • LoRA: Place Packed into Box LoRA in models/loras.


3. Workflow Structure

Group Logic:

  1. Model Loading:

    • Input: WAN model, LoRA, VAE.

    • Output: Video generation pipeline.

  2. Input Processing:

    • Input: Image + text prompts.

    • Output: Image/text embeddings.

  3. Video Generation:

    • Input: Embeddings, seed.

    • Output: Latent video frames.

  4. Video Synthesis:

    • Input: Decoded frames.

    • Output: MP4 (480P by default).


4. Inputs & Outputs

Inputs:

  • Required:

    • Static image (e.g., doll photo).

    • Positive prompt (e.g., "Bounce into a gift box").

  • Optional: Seed (randomized), LoRA strength (default 1.0).

Outputs:

  • MP4 video (e.g., WanVideo2_1_T2V.mp4) with gift box animation.


5. Notes

  1. Hardware:

    • ≥16GB VRAM (FP8 requires high-end GPUs).

    • NVIDIA 30/40-series recommended.

  2. Common Issues:

    • Missing models: Check models/wan_video.

    • Choppy video: Reduce FPS (e.g., 12) or resolution.

  3. Optimization:

    • Enable fp8_e4m3fn if supported.

    • Use offload_device to save VRAM.