mmap loading, lowvram support

This should fix both types of OOM issues!
This commit is contained in:
City
2024-08-16 04:29:14 +02:00
parent d4c75a69c9
commit de5f6e9dcc
2 changed files with 33 additions and 10 deletions
-3
View File
@@ -22,9 +22,6 @@ def gguf_sd_loader(path):
for tensor in reader.tensors:
sd[str(tensor.name)] = GGMLTensor(tensor)
dt[str(tensor.tensor_type)] = dt.get(str(tensor.tensor_type), 0) + 1
# TODO: .to doesn't get passed later on for some reason, this is a hotfix
#sd = {k:v.to(comfy.model_management.get_torch_device()) for k,v in sd.items()}
# sanity check debug print
print("\nggml_sd_loader:")