fix added
Browse files- SkinGPT.py +2 -2
SkinGPT.py
CHANGED
@@ -299,7 +299,7 @@ class SkinGPT4(nn.Module):
|
|
299 |
print(f"\n[DEBUG] Before replacement:")
|
300 |
print(f"Text embeddings shape: {input_embeddings.shape}")
|
301 |
print(f"Visual embeddings shape: {visual_embeds.shape}")
|
302 |
-
print(f"Image token embedding (before):\n{input_embeddings[0, replace_positions
|
303 |
|
304 |
for pos in replace_positions:
|
305 |
input_embeddings[0, pos[1]] = visual_embeds[0]
|
@@ -309,7 +309,7 @@ class SkinGPT4(nn.Module):
|
|
309 |
# input_embeddings[image_token_pos] = visual_embeds
|
310 |
|
311 |
print(f"\n[DEBUG] After replacement:")
|
312 |
-
print(f"Image token embedding (after):\n{input_embeddings[0, replace_positions
|
313 |
|
314 |
# outputs = self.llama.generate(
|
315 |
# inputs_embeds=input_embeddings,
|
|
|
299 |
print(f"\n[DEBUG] Before replacement:")
|
300 |
print(f"Text embeddings shape: {input_embeddings.shape}")
|
301 |
print(f"Visual embeddings shape: {visual_embeds.shape}")
|
302 |
+
print(f"Image token embedding (before):\n{input_embeddings[0, replace_positions, :5]}...")
|
303 |
|
304 |
for pos in replace_positions:
|
305 |
input_embeddings[0, pos[1]] = visual_embeds[0]
|
|
|
309 |
# input_embeddings[image_token_pos] = visual_embeds
|
310 |
|
311 |
print(f"\n[DEBUG] After replacement:")
|
312 |
+
print(f"Image token embedding (after):\n{input_embeddings[0, replace_positions, :5]}...")
|
313 |
|
314 |
# outputs = self.llama.generate(
|
315 |
# inputs_embeds=input_embeddings,
|