Update nodes_sampler.py
This commit is contained in:
+9
-6
@@ -1351,12 +1351,15 @@ class WanVideoSampler:
|
|||||||
z = z * c_in
|
z = z * c_in
|
||||||
timestep = c_noise
|
timestep = c_noise
|
||||||
|
|
||||||
self.noise_front_pad_num = image_cond_input.shape[1] - z.shape[1]
|
if image_cond is not None:
|
||||||
if self.noise_front_pad_num > 0:
|
self.noise_front_pad_num = image_cond_input.shape[1] - z.shape[1]
|
||||||
pad = torch.zeros((z.shape[0], self.noise_front_pad_num, z.shape[2], z.shape[3]), dtype=z.dtype, device=z.device)
|
if self.noise_front_pad_num > 0:
|
||||||
z = torch.concat([pad, z], dim=1)
|
pad = torch.zeros((z.shape[0], self.noise_front_pad_num, z.shape[2], z.shape[3]), dtype=z.dtype, device=z.device)
|
||||||
nonlocal seq_len
|
z = torch.concat([pad, z], dim=1)
|
||||||
seq_len = math.ceil((z.shape[2] * z.shape[3]) / 4 * z.shape[1])
|
nonlocal seq_len
|
||||||
|
seq_len = math.ceil((z.shape[2] * z.shape[3]) / 4 * z.shape[1])
|
||||||
|
else:
|
||||||
|
self.noise_front_pad_num = 0
|
||||||
|
|
||||||
base_params = {
|
base_params = {
|
||||||
'x': [z], # latent
|
'x': [z], # latent
|
||||||
|
|||||||
Reference in New Issue
Block a user