Update fix.py
Browse files
fix.py
CHANGED
@@ -4,6 +4,10 @@ from safetensors.torch import load_file
|
|
4 |
checkpoint_path = 'flowgram.safetensors' # Replace with your actual file path
|
5 |
checkpoint = load_file(checkpoint_path)
|
6 |
|
7 |
-
# Step 2:
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
4 |
checkpoint_path = 'flowgram.safetensors' # Replace with your actual file path
|
5 |
checkpoint = load_file(checkpoint_path)
|
6 |
|
7 |
+
# Step 2: Open a log file to save the output
|
8 |
+
with open("log.txt", "w") as log_file:
|
9 |
+
# Step 3: Write the size (shape) of each tensor to the file
|
10 |
+
for tensor_name, tensor in checkpoint.items():
|
11 |
+
log_file.write(f"Tensor Name: {tensor_name}, Size: {tensor.shape}\n")
|
12 |
+
|
13 |
+
print("Tensor sizes saved to log.txt")
|