Comfy-Org / Comfy-Org/ComfyUI

Painter I2V like motion amplification in WanImageToVideo node.

Open
#10,921 0 comments 0 reactions 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Feature Idea

adding

```
io.Float.Input("motion_amplitude", default=1.0, min=0.0, max=10.0, step=0.01),
```

In comfy_extras/nodes_wan.py under class WanImageToVideo def execute after line 48 concat_latent_image = vae.encode(image[:, :, :, :3]) you can add the following:

```
idx = ((start_image.shape[0] - 1) // 4) + 1
if idx < concat_latent_image.shape[2]:
concat_latent_image[:, :, idx:] = torch.clamp(
concat_latent_image[:, :, idx-1:idx] +
(concat_latent_image[:, :, idx:] - concat_latent_image[:, :, idx-1:idx]) * motion_amplitude, -6.0, 6.0
)
```

where motion_amplitude is a parameter somewhere between 1 and 1.15 typically. It seems to work

[Inspired by Painter I2V](https://github.com/princepainter/ComfyUI-PainterI2V) which unfortunately breaks the multiple start images feature, that I didn't even know was there until today!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.