demobook

ComfyUI: Preparing character reference images

Demo summary

The creator demonstrates resizing and padding a target character image to match the video aspect ratio using color padding to avoid distortion.

Step-by-step

  1. Upload the character image you want to replace in the video
  2. Resize the image to match the video dimensions
  3. Set 'keep proportion' to 'pad'
  4. Set 'color pad' to '127 127 127' to apply gray padding
  5. Set 'divisible by' and 'round to multiple' to the same value

Watch out for

  • The 'divisible by' and 'round to multiple' values must match to prevent dimension mismatch errors during sampling

Tips

  • Use color padding instead of stretching to keep proportions and avoid distortion

All demos from “Mocha vs Wan2.2 Animate: Best Workflow for PERFECT Character Replacement in ComfyUI

  1. 4:221:26Configuring Mocha Embeds in ComfyUIThe creator demonstrates how to set up the Mocha Embeds node in ComfyUI, connecting the VAE model, reference video, first-frame mask, and character reference images.ComfyUIAI Image Generator
  2. 5:500:25Processing reference video for MochaThe video shows how to use the Load Video and Image Scale nodes to prepare the reference video frames and prevent RAM overflow.ComfyUIAI Video Editor
  3. 6:150:37Creating a single-frame mask with SAM 2The demo shows how to use the Point Editor and SAM 2 nodes to generate a mask for only the first frame of the video, as required by Mocha.ComfyUIAI Video Editor
  4. 6:520:39Preparing character reference imagesCurrentThe creator demonstrates resizing and padding a target character image to match the video aspect ratio using color padding to avoid distortion.ComfyUIAI Expand Image
  5. 8:521:04Replacing a dancing character with MochaA concrete demonstration of replacing a woman dancing in a video with a new character using the Mocha workflow in ComfyUI.ComfyUIVideo to Video
  6. 12:450:58Replacing a human with an animated werewolfThe video demonstrates replacing a human actor with a stylized werewolf character while maintaining consistent textures and movement.ComfyUIVideo to Video
  7. Watch “Mocha vs Wan2.2 Animate: Best Workflow for PERFECT Character Replacement in ComfyUI” →

AI Expand Image

  1. 6:520:39Preparing character reference imagesCurrentThe creator demonstrates resizing and padding a target character image to match the video aspect ratio using color padding to avoid distortion.SOTAI