This commit is contained in:
kijai
2025-09-27 00:49:38 +03:00
parent ab31158673
commit cf235c0728
2 changed files with 8 additions and 12 deletions
-2
View File
@@ -29,8 +29,6 @@ class WanLynxIPCrossAttention(nn.Module):
def forward(self, block, q, x, ip_x):
b, n, d = x.size(0), block.num_heads, block.head_dim
print("ip_x.shape", ip_x.shape) #torch.Size([1, 16, 5120])
if self.registers is not None:
print("self.registers.shape", self.registers.shape) #torch.Size([1, 16, 5120])
print("ip_x.shape", ip_x.shape) #torch.Size([1, 16, 5120])
+8 -10
View File
@@ -52,8 +52,6 @@ class LoadLynxResampler:
).eval()
resampler.to(offload_device, dtype)
resampler.load_state_dict(resampler_sd, strict=True)
#for name, param in resampler.named_parameters():
# print(f"{name}: {param.shape} {param.dtype}")
return resampler,
@@ -91,13 +89,13 @@ class LynxEncodeFace:
image_np = (image[0].numpy() * 255).astype(np.uint8)
# Landmarks
landmarks = np.array([
[200.509, 213.98592],
[297.2495, 212.67685],
[245.74419, 272.85718],
[212.2043, 331.09564],
[288.75986, 330.27188]
])
# landmarks = np.array([
# [200.509, 213.98592],
# [297.2495, 212.67685],
# [245.74419, 272.85718],
# [212.2043, 331.09564],
# [288.75986, 330.27188]
# ])
# landmarks = np.array([[379.35895, 381.4803],
# [542.8676, 362.75436],
@@ -105,7 +103,7 @@ class LynxEncodeFace:
# [407.03708, 555.56305],
# [554.57874, 539.22833]])
#landmarks = get_landmarks_from_image(image_np)
landmarks = get_landmarks_from_image(image_np)
print(landmarks)