mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-16 00:16:39 +08:00
22 lines
488 B
Python
22 lines
488 B
Python
#!/usr/bin/python3
|
|
import os
|
|
import sys
|
|
import gguf
|
|
|
|
def read_tensors(path):
|
|
reader = gguf.GGUFReader(path)
|
|
for tensor in reader.tensors:
|
|
if tensor.tensor_type == gguf.GGMLQuantizationType.F32:
|
|
continue
|
|
print(f"{str(tensor.tensor_type):32}: {tensor.name}")
|
|
|
|
try:
|
|
path = sys.argv[1]
|
|
assert os.path.isfile(path), "Invalid path"
|
|
print(f"input: {path}")
|
|
except Exception as e:
|
|
input(f"failed: {e}")
|
|
else:
|
|
read_tensors(path)
|
|
input()
|