mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-06-07 06:11:20 +08:00
Update nodes.py
This commit is contained in:
parent
e9a3170c72
commit
a8aeef670b
@ -2252,8 +2252,11 @@ class LeapfusionHunyuanI2V:
|
|||||||
inp, timestep, c = args["input"], args["timestep"], args["c"]
|
inp, timestep, c = args["input"], args["timestep"], args["c"]
|
||||||
current_step_index = (steps == timestep).nonzero().item()
|
current_step_index = (steps == timestep).nonzero().item()
|
||||||
current_percent = current_step_index / (len(steps) - 1)
|
current_percent = current_step_index / (len(steps) - 1)
|
||||||
if samples is not None and start_percent <= current_percent <= end_percent:
|
if samples is not None:
|
||||||
inp[:, :, [index], :, :] = samples[:, :, [0], :, :].to(inp)
|
if start_percent <= current_percent <= end_percent:
|
||||||
|
inp[:, :, [index], :, :] = samples[:, :, [0], :, :].to(inp)
|
||||||
|
else:
|
||||||
|
inp[:, :, [index], :, :] = torch.zeros(1)
|
||||||
return apply_model(inp, timestep, **c)
|
return apply_model(inp, timestep, **c)
|
||||||
return unet_wrapper
|
return unet_wrapper
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user