Skip to content

Commit 5d1850e

Browse files
authored
Merge pull request #12 from Sxela/warp-sched
Warp sched
2 parents aa9b9ec + a84e003 commit 5d1850e

File tree

5 files changed

+1060
-7
lines changed

5 files changed

+1060
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,9 @@ Click to render a set of frames from start to end. Plug end output to your Rende
121121
Works like its WarpFusion counterpart.
122122
blends previously stylized and warped frame (with cc mask applied) with the corresponding raw video frame. Acts like style opacity. 0 - no style, only raw frame, 1 - only stylized frame, intermediary values - linear interpolation between raw and stylized frame.
123123

124+
**KeyframedFlowApplication**
125+
A node that takes a video and applies motion from it to another video (frame sizes are expected to match)
126+
You can specify a dict or list (as string inputs) to repeat some frame's motion multiple times (repeat), or exaggerate the motion of a frame (weight)
127+
124128
- v0.4.2 : [WarpFusion: ComfyWarp v0.4.2 (schedulers, flow_blend)](https://www.youtube.com/watch?v=CdP8fus_vNg)
125129

flow_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def get_flow_and_mask(frame1, frame2, num_flow_updates=20, raft_model=None, edge
254254
occlusion_mask = (torch.from_numpy(255-(filter_unreliable(occlusion_mask, dilation)*255)).transpose(0,1)/255).cpu()[None,...]
255255
border_mask = (torch.from_numpy(overshoot*255).transpose(0,1)/255).cpu()[None,...]
256256
edge_mask = (torch.from_numpy(255-edge).transpose(0,1)/255).cpu()[None,...]
257-
print(flow_imgs.max(), flow_imgs.min())
257+
# print(flow_imgs.max(), flow_imgs.min())
258258
flow_imgs = (torch.from_numpy(flow_imgs.transpose(1,0,2))/255).cpu()[None,]
259259
raft_model.cpu()
260260

@@ -278,10 +278,10 @@ def apply_warp(current_frame, flow, padding=0):
278278
current_frame = current_frame[0]
279279
if pad_pct>0:
280280
pad = int(max(flow21.shape)*pad_pct)
281-
print(current_frame.shape, flow21.shape)
281+
# print(current_frame.shape, flow21.shape)
282282
flow21 = np.pad(flow21.numpy(), pad_width=((pad,pad),(pad,pad),(0,0)),mode='constant')
283283
current_frame = np.pad(current_frame.numpy().transpose(1,0,2), pad_width=((pad,pad),(pad,pad),(0,0)),mode='reflect')
284-
print(flow21.max(), flow21.shape, flow21.dtype)
284+
# print(flow21.max(), flow21.shape, flow21.dtype)
285285
warped_frame = warp_flow(current_frame , flow21).transpose(1,0,2)
286286
warped_frame = warped_frame[pad:warped_frame.shape[0]-pad,pad:warped_frame.shape[1]-pad,:]
287287
warped_frame = torch.from_numpy(warped_frame).cpu()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "comfywarp"
33
description = "WarpFusion workflow wrapper for ComfyUI"
4-
version = "0.6.1"
4+
version = "0.7.0"
55
license = {file = "LICENSE"}
66
dependencies = ["opencv-python", "scikit-image"]
77

0 commit comments

Comments
 (0)