Files
aigc-home/docs/hel-892/animate-mask-document-evidence/mask-diff-check-full.txt
T

3484 lines
204 KiB
Plaintext

docs/hel-892/animate-mask-reference/dw-commit.txt:6: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw-commit.txt:21: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw-tag.txt:6: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw-tag.txt:21: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw____init__.py:53: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw____init__.py:138: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw____init__.py:166: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw____init__.py:174: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:25: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:65: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:81: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:83: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:85: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:90: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:99: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:114: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:194: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:211: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__hint_image_enchance.py:221: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__node_wrappers__dwpose.py:56: trailing whitespace.
+ yolo_repo = DWPOSE_MODEL_NAME
docs/hel-892/animate-mask-reference/dw__node_wrappers__dwpose.py:120: trailing whitespace.
+ yolo_repo = DWPOSE_MODEL_NAME
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:7: trailing whitespace.
+This is a license agreement ("Agreement") between your academic institution or non-profit organization or self (called "Licensee" or "You" in this Agreement) and Carnegie Mellon University (called "Licensor" in this Agreement). All rights not specifically granted to you in this Agreement are reserved for Licensor.
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:9: trailing whitespace.
+RESERVATION OF OWNERSHIP AND GRANT OF LICENSE:
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:10: trailing whitespace.
+Licensor retains exclusive ownership of any copy of the Software (as defined below) licensed under this Agreement and hereby grants to Licensee a personal, non-exclusive,
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:15: trailing whitespace.
+COPYRIGHT: The Software is owned by Licensor and is protected by United
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:38: trailing whitespace.
+SUPPORT AND MAINTENANCE: No Software support or training by the Licensor is provided as part of this Agreement.
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:42: trailing whitespace.
+EXPORT REGULATION: Licensee agrees to comply with any and all applicable
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:60: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:83: trailing whitespace.
+modification, are permitted provided that the following conditions are met:
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:86: trailing whitespace.
+ list of conditions and the following disclaimer.
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__LICENSE:89: trailing whitespace.
+ and/or other materials provided with the distribution.
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:190: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:226: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:233: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:238: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:245: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:257: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:267: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:274: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:277: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:290: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:296: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:303: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:310: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose____init__.py:328: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__wholebody.py:75: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__wholebody.py:80: trailing whitespace.
+ #Sacrifice accurate time measurement for compatibility
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__wholebody.py:81: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__wholebody.py:83: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__wholebody.py:107: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__src__custom_controlnet_aux__dwpose__wholebody.py:113: trailing whitespace.
+
docs/hel-892/animate-mask-reference/dw__utils.py:109: trailing whitespace.
+ def RESOLUTION(default=512, min=64, max=MAX_RESOLUTION, step=64):
docs/hel-892/animate-mask-reference/dw__utils.py:111: trailing whitespace.
+ def INT(default=0, min=0, max=MAX_RESOLUTION, step=1):
docs/hel-892/animate-mask-reference/dw__utils.py:115: trailing whitespace.
+ def STRING(default='', multiline=False):
docs/hel-892/animate-mask-reference/frontend-commit.txt:6: trailing whitespace.
+
docs/hel-892/animate-mask-reference/frontend-commit.txt:21: trailing whitespace.
+
docs/hel-892/animate-mask-reference/frontend-tag.txt:6: trailing whitespace.
+
docs/hel-892/animate-mask-reference/frontend-tag.txt:21: trailing whitespace.
+
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:1: trailing whitespace.
+Copyright (C) 2013 by Javi Agenjo
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:2: trailing whitespace.
+
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:3: trailing whitespace.
+Permission is hereby granted, free of charge, to any person obtaining a copy
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:4: trailing whitespace.
+of this software and associated documentation files (the "Software"), to deal
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:5: trailing whitespace.
+in the Software without restriction, including without limitation the rights
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:6: trailing whitespace.
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:7: trailing whitespace.
+copies of the Software, and to permit persons to whom the Software is
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:8: trailing whitespace.
+furnished to do so, subject to the following conditions:
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:9: trailing whitespace.
+
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:10: trailing whitespace.
+The above copyright notice and this permission notice shall be included in
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:11: trailing whitespace.
+all copies or substantial portions of the Software.
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:12: trailing whitespace.
+
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:13: trailing whitespace.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:14: trailing whitespace.
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:15: trailing whitespace.
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:16: trailing whitespace.
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:17: trailing whitespace.
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:18: trailing whitespace.
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
docs/hel-892/animate-mask-reference/frontend__src__lib__litegraph__LICENSE:19: trailing whitespace.
+THE SOFTWARE.
docs/hel-892/animate-mask-reference/gguf-commit.txt:6: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf-commit.txt:21: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf-tag.txt:6: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf-tag.txt:21: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:1: trailing whitespace.
+# (c) City96 || Apache-2.0 (apache.org/licenses/LICENSE-2.0)
docs/hel-892/animate-mask-reference/gguf__dequant.py:2: trailing whitespace.
+import gguf
docs/hel-892/animate-mask-reference/gguf__dequant.py:3: trailing whitespace.
+import torch
docs/hel-892/animate-mask-reference/gguf__dequant.py:4: trailing whitespace.
+from tqdm import tqdm
docs/hel-892/animate-mask-reference/gguf__dequant.py:5: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:6: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:7: trailing whitespace.
+TORCH_COMPATIBLE_QTYPES = (None, gguf.GGMLQuantizationType.F32, gguf.GGMLQuantizationType.F16)
docs/hel-892/animate-mask-reference/gguf__dequant.py:8: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:9: trailing whitespace.
+def is_torch_compatible(tensor):
docs/hel-892/animate-mask-reference/gguf__dequant.py:10: trailing whitespace.
+ return tensor is None or getattr(tensor, "tensor_type", None) in TORCH_COMPATIBLE_QTYPES
docs/hel-892/animate-mask-reference/gguf__dequant.py:11: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:12: trailing whitespace.
+def is_quantized(tensor):
docs/hel-892/animate-mask-reference/gguf__dequant.py:13: trailing whitespace.
+ return not is_torch_compatible(tensor)
docs/hel-892/animate-mask-reference/gguf__dequant.py:14: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:15: trailing whitespace.
+def dequantize_tensor(tensor, dtype=None, dequant_dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:16: trailing whitespace.
+ qtype = getattr(tensor, "tensor_type", None)
docs/hel-892/animate-mask-reference/gguf__dequant.py:17: trailing whitespace.
+ oshape = getattr(tensor, "tensor_shape", tensor.shape)
docs/hel-892/animate-mask-reference/gguf__dequant.py:18: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:19: trailing whitespace.
+ if qtype in TORCH_COMPATIBLE_QTYPES:
docs/hel-892/animate-mask-reference/gguf__dequant.py:20: trailing whitespace.
+ return tensor.to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:21: trailing whitespace.
+ elif qtype in dequantize_functions:
docs/hel-892/animate-mask-reference/gguf__dequant.py:22: trailing whitespace.
+ dequant_dtype = dtype if dequant_dtype == "target" else dequant_dtype
docs/hel-892/animate-mask-reference/gguf__dequant.py:23: trailing whitespace.
+ return dequantize(tensor.data, qtype, oshape, dtype=dequant_dtype).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:24: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__dequant.py:25: trailing whitespace.
+ # this is incredibly slow
docs/hel-892/animate-mask-reference/gguf__dequant.py:26: trailing whitespace.
+ tqdm.write(f"Falling back to numpy dequant for qtype: {qtype}")
docs/hel-892/animate-mask-reference/gguf__dequant.py:27: trailing whitespace.
+ new = gguf.quants.dequantize(tensor.cpu().numpy(), qtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:28: trailing whitespace.
+ return torch.from_numpy(new).to(tensor.device, dtype=dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:29: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:30: trailing whitespace.
+def dequantize(data, qtype, oshape, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:31: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__dequant.py:32: trailing whitespace.
+ Dequantize tensor back to usable shape/dtype
docs/hel-892/animate-mask-reference/gguf__dequant.py:33: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__dequant.py:34: trailing whitespace.
+ block_size, type_size = gguf.GGML_QUANT_SIZES[qtype]
docs/hel-892/animate-mask-reference/gguf__dequant.py:35: trailing whitespace.
+ dequantize_blocks = dequantize_functions[qtype]
docs/hel-892/animate-mask-reference/gguf__dequant.py:36: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:37: trailing whitespace.
+ rows = data.reshape(
docs/hel-892/animate-mask-reference/gguf__dequant.py:38: trailing whitespace.
+ (-1, data.shape[-1])
docs/hel-892/animate-mask-reference/gguf__dequant.py:39: trailing whitespace.
+ ).view(torch.uint8)
docs/hel-892/animate-mask-reference/gguf__dequant.py:40: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:41: trailing whitespace.
+ n_blocks = rows.numel() // type_size
docs/hel-892/animate-mask-reference/gguf__dequant.py:42: trailing whitespace.
+ blocks = rows.reshape((n_blocks, type_size))
docs/hel-892/animate-mask-reference/gguf__dequant.py:43: trailing whitespace.
+ blocks = dequantize_blocks(blocks, block_size, type_size, dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:44: trailing whitespace.
+ return blocks.reshape(oshape)
docs/hel-892/animate-mask-reference/gguf__dequant.py:45: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:46: trailing whitespace.
+def to_uint32(x):
docs/hel-892/animate-mask-reference/gguf__dequant.py:47: trailing whitespace.
+ # no uint32 :(
docs/hel-892/animate-mask-reference/gguf__dequant.py:48: trailing whitespace.
+ x = x.view(torch.uint8).to(torch.int32)
docs/hel-892/animate-mask-reference/gguf__dequant.py:49: trailing whitespace.
+ return (x[:, 0] | x[:, 1] << 8 | x[:, 2] << 16 | x[:, 3] << 24).unsqueeze(1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:50: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:51: trailing whitespace.
+def split_block_dims(blocks, *args):
docs/hel-892/animate-mask-reference/gguf__dequant.py:52: trailing whitespace.
+ n_max = blocks.shape[1]
docs/hel-892/animate-mask-reference/gguf__dequant.py:53: trailing whitespace.
+ dims = list(args) + [n_max - sum(args)]
docs/hel-892/animate-mask-reference/gguf__dequant.py:54: trailing whitespace.
+ return torch.split(blocks, dims, dim=1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:55: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:56: trailing whitespace.
+# Full weights #
docs/hel-892/animate-mask-reference/gguf__dequant.py:57: trailing whitespace.
+def dequantize_blocks_BF16(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:58: trailing whitespace.
+ return (blocks.view(torch.int16).to(torch.int32) << 16).view(torch.float32)
docs/hel-892/animate-mask-reference/gguf__dequant.py:59: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:60: trailing whitespace.
+# Legacy Quants #
docs/hel-892/animate-mask-reference/gguf__dequant.py:61: trailing whitespace.
+def dequantize_blocks_Q8_0(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:62: trailing whitespace.
+ d, x = split_block_dims(blocks, 2)
docs/hel-892/animate-mask-reference/gguf__dequant.py:63: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:64: trailing whitespace.
+ x = x.view(torch.int8)
docs/hel-892/animate-mask-reference/gguf__dequant.py:65: trailing whitespace.
+ return (d * x)
docs/hel-892/animate-mask-reference/gguf__dequant.py:66: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:67: trailing whitespace.
+def dequantize_blocks_Q5_1(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:68: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:69: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:70: trailing whitespace.
+ d, m, qh, qs = split_block_dims(blocks, 2, 2, 4)
docs/hel-892/animate-mask-reference/gguf__dequant.py:71: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:72: trailing whitespace.
+ m = m.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:73: trailing whitespace.
+ qh = to_uint32(qh)
docs/hel-892/animate-mask-reference/gguf__dequant.py:74: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:75: trailing whitespace.
+ qh = qh.reshape((n_blocks, 1)) >> torch.arange(32, device=d.device, dtype=torch.int32).reshape(1, 32)
docs/hel-892/animate-mask-reference/gguf__dequant.py:76: trailing whitespace.
+ ql = qs.reshape((n_blocks, -1, 1, block_size // 2)) >> torch.tensor([0, 4], device=d.device, dtype=torch.uint8).reshape(1, 1, 2, 1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:77: trailing whitespace.
+ qh = (qh & 1).to(torch.uint8)
docs/hel-892/animate-mask-reference/gguf__dequant.py:78: trailing whitespace.
+ ql = (ql & 0x0F).reshape((n_blocks, -1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:79: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:80: trailing whitespace.
+ qs = (ql | (qh << 4))
docs/hel-892/animate-mask-reference/gguf__dequant.py:81: trailing whitespace.
+ return (d * qs) + m
docs/hel-892/animate-mask-reference/gguf__dequant.py:82: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:83: trailing whitespace.
+def dequantize_blocks_Q5_0(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:84: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:85: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:86: trailing whitespace.
+ d, qh, qs = split_block_dims(blocks, 2, 4)
docs/hel-892/animate-mask-reference/gguf__dequant.py:87: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:88: trailing whitespace.
+ qh = to_uint32(qh)
docs/hel-892/animate-mask-reference/gguf__dequant.py:89: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:90: trailing whitespace.
+ qh = qh.reshape(n_blocks, 1) >> torch.arange(32, device=d.device, dtype=torch.int32).reshape(1, 32)
docs/hel-892/animate-mask-reference/gguf__dequant.py:91: trailing whitespace.
+ ql = qs.reshape(n_blocks, -1, 1, block_size // 2) >> torch.tensor([0, 4], device=d.device, dtype=torch.uint8).reshape(1, 1, 2, 1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:92: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:93: trailing whitespace.
+ qh = (qh & 1).to(torch.uint8)
docs/hel-892/animate-mask-reference/gguf__dequant.py:94: trailing whitespace.
+ ql = (ql & 0x0F).reshape(n_blocks, -1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:95: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:96: trailing whitespace.
+ qs = (ql | (qh << 4)).to(torch.int8) - 16
docs/hel-892/animate-mask-reference/gguf__dequant.py:97: trailing whitespace.
+ return (d * qs)
docs/hel-892/animate-mask-reference/gguf__dequant.py:98: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:99: trailing whitespace.
+def dequantize_blocks_Q4_1(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:100: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:101: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:102: trailing whitespace.
+ d, m, qs = split_block_dims(blocks, 2, 2)
docs/hel-892/animate-mask-reference/gguf__dequant.py:103: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:104: trailing whitespace.
+ m = m.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:105: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:106: trailing whitespace.
+ qs = qs.reshape((n_blocks, -1, 1, block_size // 2)) >> torch.tensor([0, 4], device=d.device, dtype=torch.uint8).reshape(1, 1, 2, 1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:107: trailing whitespace.
+ qs = (qs & 0x0F).reshape(n_blocks, -1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:108: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:109: trailing whitespace.
+ return (d * qs) + m
docs/hel-892/animate-mask-reference/gguf__dequant.py:110: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:111: trailing whitespace.
+def dequantize_blocks_Q4_0(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:112: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:113: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:114: trailing whitespace.
+ d, qs = split_block_dims(blocks, 2)
docs/hel-892/animate-mask-reference/gguf__dequant.py:115: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:116: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:117: trailing whitespace.
+ qs = qs.reshape((n_blocks, -1, 1, block_size // 2)) >> torch.tensor([0, 4], device=d.device, dtype=torch.uint8).reshape((1, 1, 2, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:118: trailing whitespace.
+ qs = (qs & 0x0F).reshape((n_blocks, -1)).to(torch.int8) - 8
docs/hel-892/animate-mask-reference/gguf__dequant.py:119: trailing whitespace.
+ return (d * qs)
docs/hel-892/animate-mask-reference/gguf__dequant.py:120: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:121: trailing whitespace.
+# K Quants #
docs/hel-892/animate-mask-reference/gguf__dequant.py:122: trailing whitespace.
+QK_K = 256
docs/hel-892/animate-mask-reference/gguf__dequant.py:123: trailing whitespace.
+K_SCALE_SIZE = 12
docs/hel-892/animate-mask-reference/gguf__dequant.py:124: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:125: trailing whitespace.
+def get_scale_min(scales):
docs/hel-892/animate-mask-reference/gguf__dequant.py:126: trailing whitespace.
+ n_blocks = scales.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:127: trailing whitespace.
+ scales = scales.view(torch.uint8)
docs/hel-892/animate-mask-reference/gguf__dequant.py:128: trailing whitespace.
+ scales = scales.reshape((n_blocks, 3, 4))
docs/hel-892/animate-mask-reference/gguf__dequant.py:129: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:130: trailing whitespace.
+ d, m, m_d = torch.split(scales, scales.shape[-2] // 3, dim=-2)
docs/hel-892/animate-mask-reference/gguf__dequant.py:131: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:132: trailing whitespace.
+ sc = torch.cat([d & 0x3F, (m_d & 0x0F) | ((d >> 2) & 0x30)], dim=-1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:133: trailing whitespace.
+ min = torch.cat([m & 0x3F, (m_d >> 4) | ((m >> 2) & 0x30)], dim=-1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:134: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:135: trailing whitespace.
+ return (sc.reshape((n_blocks, 8)), min.reshape((n_blocks, 8)))
docs/hel-892/animate-mask-reference/gguf__dequant.py:136: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:137: trailing whitespace.
+def dequantize_blocks_Q6_K(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:138: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:139: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:140: trailing whitespace.
+ ql, qh, scales, d, = split_block_dims(blocks, QK_K // 2, QK_K // 4, QK_K // 16)
docs/hel-892/animate-mask-reference/gguf__dequant.py:141: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:142: trailing whitespace.
+ scales = scales.view(torch.int8).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:143: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:144: trailing whitespace.
+ d = (d * scales).reshape((n_blocks, QK_K // 16, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:145: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:146: trailing whitespace.
+ ql = ql.reshape((n_blocks, -1, 1, 64)) >> torch.tensor([0, 4], device=d.device, dtype=torch.uint8).reshape((1, 1, 2, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:147: trailing whitespace.
+ ql = (ql & 0x0F).reshape((n_blocks, -1, 32))
docs/hel-892/animate-mask-reference/gguf__dequant.py:148: trailing whitespace.
+ qh = qh.reshape((n_blocks, -1, 1, 32)) >> torch.tensor([0, 2, 4, 6], device=d.device, dtype=torch.uint8).reshape((1, 1, 4, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:149: trailing whitespace.
+ qh = (qh & 0x03).reshape((n_blocks, -1, 32))
docs/hel-892/animate-mask-reference/gguf__dequant.py:150: trailing whitespace.
+ q = (ql | (qh << 4)).to(torch.int8) - 32
docs/hel-892/animate-mask-reference/gguf__dequant.py:151: trailing whitespace.
+ q = q.reshape((n_blocks, QK_K // 16, -1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:152: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:153: trailing whitespace.
+ return (d * q).reshape((n_blocks, QK_K))
docs/hel-892/animate-mask-reference/gguf__dequant.py:154: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:155: trailing whitespace.
+def dequantize_blocks_Q5_K(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:156: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:157: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:158: trailing whitespace.
+ d, dmin, scales, qh, qs = split_block_dims(blocks, 2, 2, K_SCALE_SIZE, QK_K // 8)
docs/hel-892/animate-mask-reference/gguf__dequant.py:159: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:160: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:161: trailing whitespace.
+ dmin = dmin.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:162: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:163: trailing whitespace.
+ sc, m = get_scale_min(scales)
docs/hel-892/animate-mask-reference/gguf__dequant.py:164: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:165: trailing whitespace.
+ d = (d * sc).reshape((n_blocks, -1, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:166: trailing whitespace.
+ dm = (dmin * m).reshape((n_blocks, -1, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:167: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:168: trailing whitespace.
+ ql = qs.reshape((n_blocks, -1, 1, 32)) >> torch.tensor([0, 4], device=d.device, dtype=torch.uint8).reshape((1, 1, 2, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:169: trailing whitespace.
+ qh = qh.reshape((n_blocks, -1, 1, 32)) >> torch.tensor([i for i in range(8)], device=d.device, dtype=torch.uint8).reshape((1, 1, 8, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:170: trailing whitespace.
+ ql = (ql & 0x0F).reshape((n_blocks, -1, 32))
docs/hel-892/animate-mask-reference/gguf__dequant.py:171: trailing whitespace.
+ qh = (qh & 0x01).reshape((n_blocks, -1, 32))
docs/hel-892/animate-mask-reference/gguf__dequant.py:172: trailing whitespace.
+ q = (ql | (qh << 4))
docs/hel-892/animate-mask-reference/gguf__dequant.py:173: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:174: trailing whitespace.
+ return (d * q - dm).reshape((n_blocks, QK_K))
docs/hel-892/animate-mask-reference/gguf__dequant.py:175: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:176: trailing whitespace.
+def dequantize_blocks_Q4_K(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:177: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:178: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:179: trailing whitespace.
+ d, dmin, scales, qs = split_block_dims(blocks, 2, 2, K_SCALE_SIZE)
docs/hel-892/animate-mask-reference/gguf__dequant.py:180: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:181: trailing whitespace.
+ dmin = dmin.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:182: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:183: trailing whitespace.
+ sc, m = get_scale_min(scales)
docs/hel-892/animate-mask-reference/gguf__dequant.py:184: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:185: trailing whitespace.
+ d = (d * sc).reshape((n_blocks, -1, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:186: trailing whitespace.
+ dm = (dmin * m).reshape((n_blocks, -1, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:187: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:188: trailing whitespace.
+ qs = qs.reshape((n_blocks, -1, 1, 32)) >> torch.tensor([0, 4], device=d.device, dtype=torch.uint8).reshape((1, 1, 2, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:189: trailing whitespace.
+ qs = (qs & 0x0F).reshape((n_blocks, -1, 32))
docs/hel-892/animate-mask-reference/gguf__dequant.py:190: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:191: trailing whitespace.
+ return (d * qs - dm).reshape((n_blocks, QK_K))
docs/hel-892/animate-mask-reference/gguf__dequant.py:192: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:193: trailing whitespace.
+def dequantize_blocks_Q3_K(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:194: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:195: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:196: trailing whitespace.
+ hmask, qs, scales, d = split_block_dims(blocks, QK_K // 8, QK_K // 4, 12)
docs/hel-892/animate-mask-reference/gguf__dequant.py:197: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:198: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:199: trailing whitespace.
+ lscales, hscales = scales[:, :8], scales[:, 8:]
docs/hel-892/animate-mask-reference/gguf__dequant.py:200: trailing whitespace.
+ lscales = lscales.reshape((n_blocks, 1, 8)) >> torch.tensor([0, 4], device=d.device, dtype=torch.uint8).reshape((1, 2, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:201: trailing whitespace.
+ lscales = lscales.reshape((n_blocks, 16))
docs/hel-892/animate-mask-reference/gguf__dequant.py:202: trailing whitespace.
+ hscales = hscales.reshape((n_blocks, 1, 4)) >> torch.tensor([0, 2, 4, 6], device=d.device, dtype=torch.uint8).reshape((1, 4, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:203: trailing whitespace.
+ hscales = hscales.reshape((n_blocks, 16))
docs/hel-892/animate-mask-reference/gguf__dequant.py:204: trailing whitespace.
+ scales = (lscales & 0x0F) | ((hscales & 0x03) << 4)
docs/hel-892/animate-mask-reference/gguf__dequant.py:205: trailing whitespace.
+ scales = (scales.to(torch.int8) - 32)
docs/hel-892/animate-mask-reference/gguf__dequant.py:206: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:207: trailing whitespace.
+ dl = (d * scales).reshape((n_blocks, 16, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:208: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:209: trailing whitespace.
+ ql = qs.reshape((n_blocks, -1, 1, 32)) >> torch.tensor([0, 2, 4, 6], device=d.device, dtype=torch.uint8).reshape((1, 1, 4, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:210: trailing whitespace.
+ qh = hmask.reshape(n_blocks, -1, 1, 32) >> torch.tensor([i for i in range(8)], device=d.device, dtype=torch.uint8).reshape((1, 1, 8, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:211: trailing whitespace.
+ ql = ql.reshape((n_blocks, 16, QK_K // 16)) & 3
docs/hel-892/animate-mask-reference/gguf__dequant.py:212: trailing whitespace.
+ qh = (qh.reshape((n_blocks, 16, QK_K // 16)) & 1) ^ 1
docs/hel-892/animate-mask-reference/gguf__dequant.py:213: trailing whitespace.
+ q = (ql.to(torch.int8) - (qh << 2).to(torch.int8))
docs/hel-892/animate-mask-reference/gguf__dequant.py:214: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:215: trailing whitespace.
+ return (dl * q).reshape((n_blocks, QK_K))
docs/hel-892/animate-mask-reference/gguf__dequant.py:216: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:217: trailing whitespace.
+def dequantize_blocks_Q2_K(blocks, block_size, type_size, dtype=None):
docs/hel-892/animate-mask-reference/gguf__dequant.py:218: trailing whitespace.
+ n_blocks = blocks.shape[0]
docs/hel-892/animate-mask-reference/gguf__dequant.py:219: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:220: trailing whitespace.
+ scales, qs, d, dmin = split_block_dims(blocks, QK_K // 16, QK_K // 4, 2)
docs/hel-892/animate-mask-reference/gguf__dequant.py:221: trailing whitespace.
+ d = d.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:222: trailing whitespace.
+ dmin = dmin.view(torch.float16).to(dtype)
docs/hel-892/animate-mask-reference/gguf__dequant.py:223: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:224: trailing whitespace.
+ # (n_blocks, 16, 1)
docs/hel-892/animate-mask-reference/gguf__dequant.py:225: trailing whitespace.
+ dl = (d * (scales & 0xF)).reshape((n_blocks, QK_K // 16, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:226: trailing whitespace.
+ ml = (dmin * (scales >> 4)).reshape((n_blocks, QK_K // 16, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:227: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:228: trailing whitespace.
+ shift = torch.tensor([0, 2, 4, 6], device=d.device, dtype=torch.uint8).reshape((1, 1, 4, 1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:229: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:230: trailing whitespace.
+ qs = (qs.reshape((n_blocks, -1, 1, 32)) >> shift) & 3
docs/hel-892/animate-mask-reference/gguf__dequant.py:231: trailing whitespace.
+ qs = qs.reshape((n_blocks, QK_K // 16, 16))
docs/hel-892/animate-mask-reference/gguf__dequant.py:232: trailing whitespace.
+ qs = dl * qs - ml
docs/hel-892/animate-mask-reference/gguf__dequant.py:233: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:234: trailing whitespace.
+ return qs.reshape((n_blocks, -1))
docs/hel-892/animate-mask-reference/gguf__dequant.py:235: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__dequant.py:236: trailing whitespace.
+dequantize_functions = {
docs/hel-892/animate-mask-reference/gguf__dequant.py:237: trailing whitespace.
+ gguf.GGMLQuantizationType.BF16: dequantize_blocks_BF16,
docs/hel-892/animate-mask-reference/gguf__dequant.py:238: trailing whitespace.
+ gguf.GGMLQuantizationType.Q8_0: dequantize_blocks_Q8_0,
docs/hel-892/animate-mask-reference/gguf__dequant.py:239: trailing whitespace.
+ gguf.GGMLQuantizationType.Q5_1: dequantize_blocks_Q5_1,
docs/hel-892/animate-mask-reference/gguf__dequant.py:240: trailing whitespace.
+ gguf.GGMLQuantizationType.Q5_0: dequantize_blocks_Q5_0,
docs/hel-892/animate-mask-reference/gguf__dequant.py:241: trailing whitespace.
+ gguf.GGMLQuantizationType.Q4_1: dequantize_blocks_Q4_1,
docs/hel-892/animate-mask-reference/gguf__dequant.py:242: trailing whitespace.
+ gguf.GGMLQuantizationType.Q4_0: dequantize_blocks_Q4_0,
docs/hel-892/animate-mask-reference/gguf__dequant.py:243: trailing whitespace.
+ gguf.GGMLQuantizationType.Q6_K: dequantize_blocks_Q6_K,
docs/hel-892/animate-mask-reference/gguf__dequant.py:244: trailing whitespace.
+ gguf.GGMLQuantizationType.Q5_K: dequantize_blocks_Q5_K,
docs/hel-892/animate-mask-reference/gguf__dequant.py:245: trailing whitespace.
+ gguf.GGMLQuantizationType.Q4_K: dequantize_blocks_Q4_K,
docs/hel-892/animate-mask-reference/gguf__dequant.py:246: trailing whitespace.
+ gguf.GGMLQuantizationType.Q3_K: dequantize_blocks_Q3_K,
docs/hel-892/animate-mask-reference/gguf__dequant.py:247: trailing whitespace.
+ gguf.GGMLQuantizationType.Q2_K: dequantize_blocks_Q2_K,
docs/hel-892/animate-mask-reference/gguf__dequant.py:248: trailing whitespace.
+}
docs/hel-892/animate-mask-reference/gguf__loader.py:1: trailing whitespace.
+# (c) City96 || Apache-2.0 (apache.org/licenses/LICENSE-2.0)
docs/hel-892/animate-mask-reference/gguf__loader.py:2: trailing whitespace.
+import warnings
docs/hel-892/animate-mask-reference/gguf__loader.py:3: trailing whitespace.
+import logging
docs/hel-892/animate-mask-reference/gguf__loader.py:4: trailing whitespace.
+import torch
docs/hel-892/animate-mask-reference/gguf__loader.py:5: trailing whitespace.
+import gguf
docs/hel-892/animate-mask-reference/gguf__loader.py:6: trailing whitespace.
+import re
docs/hel-892/animate-mask-reference/gguf__loader.py:7: trailing whitespace.
+import os
docs/hel-892/animate-mask-reference/gguf__loader.py:8: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:9: trailing whitespace.
+from .ops import GGMLTensor
docs/hel-892/animate-mask-reference/gguf__loader.py:10: trailing whitespace.
+from .dequant import is_quantized, dequantize_tensor
docs/hel-892/animate-mask-reference/gguf__loader.py:11: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:12: trailing whitespace.
+IMG_ARCH_LIST = {"flux", "sd1", "sdxl", "sd3", "aura", "hidream", "cosmos", "ltxv", "hyvid", "wan", "lumina2", "qwen_image"}
docs/hel-892/animate-mask-reference/gguf__loader.py:13: trailing whitespace.
+TXT_ARCH_LIST = {"t5", "t5encoder", "llama", "qwen2vl"}
docs/hel-892/animate-mask-reference/gguf__loader.py:14: trailing whitespace.
+VIS_TYPE_LIST = {"clip-vision", "mmproj"}
docs/hel-892/animate-mask-reference/gguf__loader.py:15: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:16: trailing whitespace.
+def get_orig_shape(reader, tensor_name):
docs/hel-892/animate-mask-reference/gguf__loader.py:17: trailing whitespace.
+ field_key = f"comfy.gguf.orig_shape.{tensor_name}"
docs/hel-892/animate-mask-reference/gguf__loader.py:18: trailing whitespace.
+ field = reader.get_field(field_key)
docs/hel-892/animate-mask-reference/gguf__loader.py:19: trailing whitespace.
+ if field is None:
docs/hel-892/animate-mask-reference/gguf__loader.py:20: trailing whitespace.
+ return None
docs/hel-892/animate-mask-reference/gguf__loader.py:21: trailing whitespace.
+ # Has original shape metadata, so we try to decode it.
docs/hel-892/animate-mask-reference/gguf__loader.py:22: trailing whitespace.
+ if len(field.types) != 2 or field.types[0] != gguf.GGUFValueType.ARRAY or field.types[1] != gguf.GGUFValueType.INT32:
docs/hel-892/animate-mask-reference/gguf__loader.py:23: trailing whitespace.
+ raise TypeError(f"Bad original shape metadata for {field_key}: Expected ARRAY of INT32, got {field.types}")
docs/hel-892/animate-mask-reference/gguf__loader.py:24: trailing whitespace.
+ return torch.Size(tuple(int(field.parts[part_idx][0]) for part_idx in field.data))
docs/hel-892/animate-mask-reference/gguf__loader.py:25: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:26: trailing whitespace.
+def get_field(reader, field_name, field_type):
docs/hel-892/animate-mask-reference/gguf__loader.py:27: trailing whitespace.
+ field = reader.get_field(field_name)
docs/hel-892/animate-mask-reference/gguf__loader.py:28: trailing whitespace.
+ if field is None:
docs/hel-892/animate-mask-reference/gguf__loader.py:29: trailing whitespace.
+ return None
docs/hel-892/animate-mask-reference/gguf__loader.py:30: trailing whitespace.
+ elif field_type == str:
docs/hel-892/animate-mask-reference/gguf__loader.py:31: trailing whitespace.
+ # extra check here as this is used for checking arch string
docs/hel-892/animate-mask-reference/gguf__loader.py:32: trailing whitespace.
+ if len(field.types) != 1 or field.types[0] != gguf.GGUFValueType.STRING:
docs/hel-892/animate-mask-reference/gguf__loader.py:33: trailing whitespace.
+ raise TypeError(f"Bad type for GGUF {field_name} key: expected string, got {field.types!r}")
docs/hel-892/animate-mask-reference/gguf__loader.py:34: trailing whitespace.
+ return str(field.parts[field.data[-1]], encoding="utf-8")
docs/hel-892/animate-mask-reference/gguf__loader.py:35: trailing whitespace.
+ elif field_type in [int, float, bool]:
docs/hel-892/animate-mask-reference/gguf__loader.py:36: trailing whitespace.
+ return field_type(field.parts[field.data[-1]])
docs/hel-892/animate-mask-reference/gguf__loader.py:37: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__loader.py:38: trailing whitespace.
+ raise TypeError(f"Unknown field type {field_type}")
docs/hel-892/animate-mask-reference/gguf__loader.py:39: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:40: trailing whitespace.
+def get_list_field(reader, field_name, field_type):
docs/hel-892/animate-mask-reference/gguf__loader.py:41: trailing whitespace.
+ field = reader.get_field(field_name)
docs/hel-892/animate-mask-reference/gguf__loader.py:42: trailing whitespace.
+ if field is None:
docs/hel-892/animate-mask-reference/gguf__loader.py:43: trailing whitespace.
+ return None
docs/hel-892/animate-mask-reference/gguf__loader.py:44: trailing whitespace.
+ elif field_type == str:
docs/hel-892/animate-mask-reference/gguf__loader.py:45: trailing whitespace.
+ return tuple(str(field.parts[part_idx], encoding="utf-8") for part_idx in field.data)
docs/hel-892/animate-mask-reference/gguf__loader.py:46: trailing whitespace.
+ elif field_type in [int, float, bool]:
docs/hel-892/animate-mask-reference/gguf__loader.py:47: trailing whitespace.
+ return tuple(field_type(field.parts[part_idx][0]) for part_idx in field.data)
docs/hel-892/animate-mask-reference/gguf__loader.py:48: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__loader.py:49: trailing whitespace.
+ raise TypeError(f"Unknown field type {field_type}")
docs/hel-892/animate-mask-reference/gguf__loader.py:50: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:51: trailing whitespace.
+def gguf_sd_loader(path, handle_prefix="model.diffusion_model.", return_arch=False, is_text_model=False):
docs/hel-892/animate-mask-reference/gguf__loader.py:52: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__loader.py:53: trailing whitespace.
+ Read state dict as fake tensors
docs/hel-892/animate-mask-reference/gguf__loader.py:54: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__loader.py:55: trailing whitespace.
+ reader = gguf.GGUFReader(path)
docs/hel-892/animate-mask-reference/gguf__loader.py:56: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:57: trailing whitespace.
+ # filter and strip prefix
docs/hel-892/animate-mask-reference/gguf__loader.py:58: trailing whitespace.
+ has_prefix = False
docs/hel-892/animate-mask-reference/gguf__loader.py:59: trailing whitespace.
+ if handle_prefix is not None:
docs/hel-892/animate-mask-reference/gguf__loader.py:60: trailing whitespace.
+ prefix_len = len(handle_prefix)
docs/hel-892/animate-mask-reference/gguf__loader.py:61: trailing whitespace.
+ tensor_names = set(tensor.name for tensor in reader.tensors)
docs/hel-892/animate-mask-reference/gguf__loader.py:62: trailing whitespace.
+ has_prefix = any(s.startswith(handle_prefix) for s in tensor_names)
docs/hel-892/animate-mask-reference/gguf__loader.py:63: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:64: trailing whitespace.
+ tensors = []
docs/hel-892/animate-mask-reference/gguf__loader.py:65: trailing whitespace.
+ for tensor in reader.tensors:
docs/hel-892/animate-mask-reference/gguf__loader.py:66: trailing whitespace.
+ sd_key = tensor_name = tensor.name
docs/hel-892/animate-mask-reference/gguf__loader.py:67: trailing whitespace.
+ if has_prefix:
docs/hel-892/animate-mask-reference/gguf__loader.py:68: trailing whitespace.
+ if not tensor_name.startswith(handle_prefix):
docs/hel-892/animate-mask-reference/gguf__loader.py:69: trailing whitespace.
+ continue
docs/hel-892/animate-mask-reference/gguf__loader.py:70: trailing whitespace.
+ sd_key = tensor_name[prefix_len:]
docs/hel-892/animate-mask-reference/gguf__loader.py:71: trailing whitespace.
+ tensors.append((sd_key, tensor))
docs/hel-892/animate-mask-reference/gguf__loader.py:72: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:73: trailing whitespace.
+ # detect and verify architecture
docs/hel-892/animate-mask-reference/gguf__loader.py:74: trailing whitespace.
+ compat = None
docs/hel-892/animate-mask-reference/gguf__loader.py:75: trailing whitespace.
+ arch_str = get_field(reader, "general.architecture", str)
docs/hel-892/animate-mask-reference/gguf__loader.py:76: trailing whitespace.
+ type_str = get_field(reader, "general.type", str)
docs/hel-892/animate-mask-reference/gguf__loader.py:77: trailing whitespace.
+ if arch_str in [None, "pig"]:
docs/hel-892/animate-mask-reference/gguf__loader.py:78: trailing whitespace.
+ if is_text_model:
docs/hel-892/animate-mask-reference/gguf__loader.py:79: trailing whitespace.
+ raise ValueError(f"This text model is incompatible with llama.cpp!\nConsider using the safetensors version\n({path})")
docs/hel-892/animate-mask-reference/gguf__loader.py:80: trailing whitespace.
+ compat = "sd.cpp" if arch_str is None else arch_str
docs/hel-892/animate-mask-reference/gguf__loader.py:81: trailing whitespace.
+ # import here to avoid changes to convert.py breaking regular models
docs/hel-892/animate-mask-reference/gguf__loader.py:82: trailing whitespace.
+ from .tools.convert import detect_arch
docs/hel-892/animate-mask-reference/gguf__loader.py:83: trailing whitespace.
+ try:
docs/hel-892/animate-mask-reference/gguf__loader.py:84: trailing whitespace.
+ arch_str = detect_arch(set(val[0] for val in tensors)).arch
docs/hel-892/animate-mask-reference/gguf__loader.py:85: trailing whitespace.
+ except Exception as e:
docs/hel-892/animate-mask-reference/gguf__loader.py:86: trailing whitespace.
+ raise ValueError(f"This model is not currently supported - ({e})")
docs/hel-892/animate-mask-reference/gguf__loader.py:87: trailing whitespace.
+ elif arch_str not in TXT_ARCH_LIST and is_text_model:
docs/hel-892/animate-mask-reference/gguf__loader.py:88: trailing whitespace.
+ if type_str not in VIS_TYPE_LIST:
docs/hel-892/animate-mask-reference/gguf__loader.py:89: trailing whitespace.
+ raise ValueError(f"Unexpected text model architecture type in GGUF file: {arch_str!r}")
docs/hel-892/animate-mask-reference/gguf__loader.py:90: trailing whitespace.
+ elif arch_str not in IMG_ARCH_LIST and not is_text_model:
docs/hel-892/animate-mask-reference/gguf__loader.py:91: trailing whitespace.
+ raise ValueError(f"Unexpected architecture type in GGUF file: {arch_str!r}")
docs/hel-892/animate-mask-reference/gguf__loader.py:92: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:93: trailing whitespace.
+ if compat:
docs/hel-892/animate-mask-reference/gguf__loader.py:94: trailing whitespace.
+ logging.warning(f"Warning: This gguf model file is loaded in compatibility mode '{compat}' [arch:{arch_str}]")
docs/hel-892/animate-mask-reference/gguf__loader.py:95: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:96: trailing whitespace.
+ # main loading loop
docs/hel-892/animate-mask-reference/gguf__loader.py:97: trailing whitespace.
+ state_dict = {}
docs/hel-892/animate-mask-reference/gguf__loader.py:98: trailing whitespace.
+ qtype_dict = {}
docs/hel-892/animate-mask-reference/gguf__loader.py:99: trailing whitespace.
+ for sd_key, tensor in tensors:
docs/hel-892/animate-mask-reference/gguf__loader.py:100: trailing whitespace.
+ tensor_name = tensor.name
docs/hel-892/animate-mask-reference/gguf__loader.py:101: trailing whitespace.
+ # torch_tensor = torch.from_numpy(tensor.data) # mmap
docs/hel-892/animate-mask-reference/gguf__loader.py:102: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:103: trailing whitespace.
+ # NOTE: line above replaced with this block to avoid persistent numpy warning about mmap
docs/hel-892/animate-mask-reference/gguf__loader.py:104: trailing whitespace.
+ with warnings.catch_warnings():
docs/hel-892/animate-mask-reference/gguf__loader.py:105: trailing whitespace.
+ warnings.filterwarnings("ignore", message="The given NumPy array is not writable")
docs/hel-892/animate-mask-reference/gguf__loader.py:106: trailing whitespace.
+ torch_tensor = torch.from_numpy(tensor.data) # mmap
docs/hel-892/animate-mask-reference/gguf__loader.py:107: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:108: trailing whitespace.
+ shape = get_orig_shape(reader, tensor_name)
docs/hel-892/animate-mask-reference/gguf__loader.py:109: trailing whitespace.
+ if shape is None:
docs/hel-892/animate-mask-reference/gguf__loader.py:110: trailing whitespace.
+ shape = torch.Size(tuple(int(v) for v in reversed(tensor.shape)))
docs/hel-892/animate-mask-reference/gguf__loader.py:111: trailing whitespace.
+ # Workaround for stable-diffusion.cpp SDXL detection.
docs/hel-892/animate-mask-reference/gguf__loader.py:112: trailing whitespace.
+ if compat == "sd.cpp" and arch_str == "sdxl":
docs/hel-892/animate-mask-reference/gguf__loader.py:113: trailing whitespace.
+ if any([tensor_name.endswith(x) for x in (".proj_in.weight", ".proj_out.weight")]):
docs/hel-892/animate-mask-reference/gguf__loader.py:114: trailing whitespace.
+ while len(shape) > 2 and shape[-1] == 1:
docs/hel-892/animate-mask-reference/gguf__loader.py:115: trailing whitespace.
+ shape = shape[:-1]
docs/hel-892/animate-mask-reference/gguf__loader.py:116: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:117: trailing whitespace.
+ # add to state dict
docs/hel-892/animate-mask-reference/gguf__loader.py:118: trailing whitespace.
+ if tensor.tensor_type in {gguf.GGMLQuantizationType.F32, gguf.GGMLQuantizationType.F16}:
docs/hel-892/animate-mask-reference/gguf__loader.py:119: trailing whitespace.
+ torch_tensor = torch_tensor.view(*shape)
docs/hel-892/animate-mask-reference/gguf__loader.py:120: trailing whitespace.
+ state_dict[sd_key] = GGMLTensor(torch_tensor, tensor_type=tensor.tensor_type, tensor_shape=shape)
docs/hel-892/animate-mask-reference/gguf__loader.py:121: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:122: trailing whitespace.
+ # keep track of loaded tensor types
docs/hel-892/animate-mask-reference/gguf__loader.py:123: trailing whitespace.
+ tensor_type_str = getattr(tensor.tensor_type, "name", repr(tensor.tensor_type))
docs/hel-892/animate-mask-reference/gguf__loader.py:124: trailing whitespace.
+ qtype_dict[tensor_type_str] = qtype_dict.get(tensor_type_str, 0) + 1
docs/hel-892/animate-mask-reference/gguf__loader.py:125: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:126: trailing whitespace.
+ # print loaded tensor type counts
docs/hel-892/animate-mask-reference/gguf__loader.py:127: trailing whitespace.
+ logging.info("gguf qtypes: " + ", ".join(f"{k} ({v})" for k, v in qtype_dict.items()))
docs/hel-892/animate-mask-reference/gguf__loader.py:128: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:129: trailing whitespace.
+ # mark largest tensor for vram estimation
docs/hel-892/animate-mask-reference/gguf__loader.py:130: trailing whitespace.
+ qsd = {k:v for k,v in state_dict.items() if is_quantized(v)}
docs/hel-892/animate-mask-reference/gguf__loader.py:131: trailing whitespace.
+ if len(qsd) > 0:
docs/hel-892/animate-mask-reference/gguf__loader.py:132: trailing whitespace.
+ max_key = max(qsd.keys(), key=lambda k: qsd[k].numel())
docs/hel-892/animate-mask-reference/gguf__loader.py:133: trailing whitespace.
+ state_dict[max_key].is_largest_weight = True
docs/hel-892/animate-mask-reference/gguf__loader.py:134: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:135: trailing whitespace.
+ if return_arch:
docs/hel-892/animate-mask-reference/gguf__loader.py:136: trailing whitespace.
+ return (state_dict, arch_str)
docs/hel-892/animate-mask-reference/gguf__loader.py:137: trailing whitespace.
+ return state_dict
docs/hel-892/animate-mask-reference/gguf__loader.py:138: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:139: trailing whitespace.
+# for remapping llama.cpp -> original key names
docs/hel-892/animate-mask-reference/gguf__loader.py:140: trailing whitespace.
+T5_SD_MAP = {
docs/hel-892/animate-mask-reference/gguf__loader.py:141: trailing whitespace.
+ "enc.": "encoder.",
docs/hel-892/animate-mask-reference/gguf__loader.py:142: trailing whitespace.
+ ".blk.": ".block.",
docs/hel-892/animate-mask-reference/gguf__loader.py:143: trailing whitespace.
+ "token_embd": "shared",
docs/hel-892/animate-mask-reference/gguf__loader.py:144: trailing whitespace.
+ "output_norm": "final_layer_norm",
docs/hel-892/animate-mask-reference/gguf__loader.py:145: trailing whitespace.
+ "attn_q": "layer.0.SelfAttention.q",
docs/hel-892/animate-mask-reference/gguf__loader.py:146: trailing whitespace.
+ "attn_k": "layer.0.SelfAttention.k",
docs/hel-892/animate-mask-reference/gguf__loader.py:147: trailing whitespace.
+ "attn_v": "layer.0.SelfAttention.v",
docs/hel-892/animate-mask-reference/gguf__loader.py:148: trailing whitespace.
+ "attn_o": "layer.0.SelfAttention.o",
docs/hel-892/animate-mask-reference/gguf__loader.py:149: trailing whitespace.
+ "attn_norm": "layer.0.layer_norm",
docs/hel-892/animate-mask-reference/gguf__loader.py:150: trailing whitespace.
+ "attn_rel_b": "layer.0.SelfAttention.relative_attention_bias",
docs/hel-892/animate-mask-reference/gguf__loader.py:151: trailing whitespace.
+ "ffn_up": "layer.1.DenseReluDense.wi_1",
docs/hel-892/animate-mask-reference/gguf__loader.py:152: trailing whitespace.
+ "ffn_down": "layer.1.DenseReluDense.wo",
docs/hel-892/animate-mask-reference/gguf__loader.py:153: trailing whitespace.
+ "ffn_gate": "layer.1.DenseReluDense.wi_0",
docs/hel-892/animate-mask-reference/gguf__loader.py:154: trailing whitespace.
+ "ffn_norm": "layer.1.layer_norm",
docs/hel-892/animate-mask-reference/gguf__loader.py:155: trailing whitespace.
+}
docs/hel-892/animate-mask-reference/gguf__loader.py:156: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:157: trailing whitespace.
+LLAMA_SD_MAP = {
docs/hel-892/animate-mask-reference/gguf__loader.py:158: trailing whitespace.
+ "blk.": "model.layers.",
docs/hel-892/animate-mask-reference/gguf__loader.py:159: trailing whitespace.
+ "attn_norm": "input_layernorm",
docs/hel-892/animate-mask-reference/gguf__loader.py:160: trailing whitespace.
+ "attn_q": "self_attn.q_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:161: trailing whitespace.
+ "attn_k": "self_attn.k_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:162: trailing whitespace.
+ "attn_v": "self_attn.v_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:163: trailing whitespace.
+ "attn_output": "self_attn.o_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:164: trailing whitespace.
+ "ffn_up": "mlp.up_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:165: trailing whitespace.
+ "ffn_down": "mlp.down_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:166: trailing whitespace.
+ "ffn_gate": "mlp.gate_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:167: trailing whitespace.
+ "ffn_norm": "post_attention_layernorm",
docs/hel-892/animate-mask-reference/gguf__loader.py:168: trailing whitespace.
+ "token_embd": "model.embed_tokens",
docs/hel-892/animate-mask-reference/gguf__loader.py:169: trailing whitespace.
+ "output_norm": "model.norm",
docs/hel-892/animate-mask-reference/gguf__loader.py:170: trailing whitespace.
+ "output.weight": "lm_head.weight",
docs/hel-892/animate-mask-reference/gguf__loader.py:171: trailing whitespace.
+}
docs/hel-892/animate-mask-reference/gguf__loader.py:172: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:173: trailing whitespace.
+CLIP_VISION_SD_MAP = {
docs/hel-892/animate-mask-reference/gguf__loader.py:174: trailing whitespace.
+ "mm.": "visual.merger.mlp.",
docs/hel-892/animate-mask-reference/gguf__loader.py:175: trailing whitespace.
+ "v.post_ln.": "visual.merger.ln_q.",
docs/hel-892/animate-mask-reference/gguf__loader.py:176: trailing whitespace.
+ "v.patch_embd": "visual.patch_embed.proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:177: trailing whitespace.
+ "v.blk.": "visual.blocks.",
docs/hel-892/animate-mask-reference/gguf__loader.py:178: trailing whitespace.
+ "ffn_up": "mlp.up_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:179: trailing whitespace.
+ "ffn_down": "mlp.down_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:180: trailing whitespace.
+ "ffn_gate": "mlp.gate_proj",
docs/hel-892/animate-mask-reference/gguf__loader.py:181: trailing whitespace.
+ "attn_out.": "attn.proj.",
docs/hel-892/animate-mask-reference/gguf__loader.py:182: trailing whitespace.
+ "ln1.": "norm1.",
docs/hel-892/animate-mask-reference/gguf__loader.py:183: trailing whitespace.
+ "ln2.": "norm2.",
docs/hel-892/animate-mask-reference/gguf__loader.py:184: trailing whitespace.
+}
docs/hel-892/animate-mask-reference/gguf__loader.py:185: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:186: trailing whitespace.
+def sd_map_replace(raw_sd, key_map):
docs/hel-892/animate-mask-reference/gguf__loader.py:187: trailing whitespace.
+ sd = {}
docs/hel-892/animate-mask-reference/gguf__loader.py:188: trailing whitespace.
+ for k,v in raw_sd.items():
docs/hel-892/animate-mask-reference/gguf__loader.py:189: trailing whitespace.
+ for s,d in key_map.items():
docs/hel-892/animate-mask-reference/gguf__loader.py:190: trailing whitespace.
+ k = k.replace(s,d)
docs/hel-892/animate-mask-reference/gguf__loader.py:191: trailing whitespace.
+ sd[k] = v
docs/hel-892/animate-mask-reference/gguf__loader.py:192: trailing whitespace.
+ return sd
docs/hel-892/animate-mask-reference/gguf__loader.py:193: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:194: trailing whitespace.
+def llama_permute(raw_sd, n_head, n_head_kv):
docs/hel-892/animate-mask-reference/gguf__loader.py:195: trailing whitespace.
+ # Reverse version of LlamaModel.permute in llama.cpp convert script
docs/hel-892/animate-mask-reference/gguf__loader.py:196: trailing whitespace.
+ sd = {}
docs/hel-892/animate-mask-reference/gguf__loader.py:197: trailing whitespace.
+ permute = lambda x,h: x.reshape(h, x.shape[0] // h // 2, 2, *x.shape[1:]).swapaxes(1, 2).reshape(x.shape)
docs/hel-892/animate-mask-reference/gguf__loader.py:198: trailing whitespace.
+ for k,v in raw_sd.items():
docs/hel-892/animate-mask-reference/gguf__loader.py:199: trailing whitespace.
+ if k.endswith(("q_proj.weight", "q_proj.bias")):
docs/hel-892/animate-mask-reference/gguf__loader.py:200: trailing whitespace.
+ v.data = permute(v.data, n_head)
docs/hel-892/animate-mask-reference/gguf__loader.py:201: trailing whitespace.
+ if k.endswith(("k_proj.weight", "k_proj.bias")):
docs/hel-892/animate-mask-reference/gguf__loader.py:202: trailing whitespace.
+ v.data = permute(v.data, n_head_kv)
docs/hel-892/animate-mask-reference/gguf__loader.py:203: trailing whitespace.
+ sd[k] = v
docs/hel-892/animate-mask-reference/gguf__loader.py:204: trailing whitespace.
+ return sd
docs/hel-892/animate-mask-reference/gguf__loader.py:205: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:206: trailing whitespace.
+def strip_quant_suffix(name):
docs/hel-892/animate-mask-reference/gguf__loader.py:207: trailing whitespace.
+ pattern = r"[-_]?(?:ud-)?i?q[0-9]_[a-z0-9_\-]{1,8}$"
docs/hel-892/animate-mask-reference/gguf__loader.py:208: trailing whitespace.
+ match = re.search(pattern, name, re.IGNORECASE)
docs/hel-892/animate-mask-reference/gguf__loader.py:209: trailing whitespace.
+ if match:
docs/hel-892/animate-mask-reference/gguf__loader.py:210: trailing whitespace.
+ name = name[:match.start()]
docs/hel-892/animate-mask-reference/gguf__loader.py:211: trailing whitespace.
+ return name
docs/hel-892/animate-mask-reference/gguf__loader.py:212: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:213: trailing whitespace.
+def gguf_mmproj_loader(path):
docs/hel-892/animate-mask-reference/gguf__loader.py:214: trailing whitespace.
+ # Reverse version of Qwen2VLVisionModel.modify_tensors
docs/hel-892/animate-mask-reference/gguf__loader.py:215: trailing whitespace.
+ logging.info("Attenpting to find mmproj file for text encoder...")
docs/hel-892/animate-mask-reference/gguf__loader.py:216: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:217: trailing whitespace.
+ # get name to match w/o quant suffix
docs/hel-892/animate-mask-reference/gguf__loader.py:218: trailing whitespace.
+ tenc_fname = os.path.basename(path)
docs/hel-892/animate-mask-reference/gguf__loader.py:219: trailing whitespace.
+ tenc = os.path.splitext(tenc_fname)[0].lower()
docs/hel-892/animate-mask-reference/gguf__loader.py:220: trailing whitespace.
+ tenc = strip_quant_suffix(tenc)
docs/hel-892/animate-mask-reference/gguf__loader.py:221: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:222: trailing whitespace.
+ # try and find matching mmproj
docs/hel-892/animate-mask-reference/gguf__loader.py:223: trailing whitespace.
+ target = []
docs/hel-892/animate-mask-reference/gguf__loader.py:224: trailing whitespace.
+ root = os.path.dirname(path)
docs/hel-892/animate-mask-reference/gguf__loader.py:225: trailing whitespace.
+ for fname in os.listdir(root):
docs/hel-892/animate-mask-reference/gguf__loader.py:226: trailing whitespace.
+ name, ext = os.path.splitext(fname)
docs/hel-892/animate-mask-reference/gguf__loader.py:227: trailing whitespace.
+ if ext.lower() != ".gguf":
docs/hel-892/animate-mask-reference/gguf__loader.py:228: trailing whitespace.
+ continue
docs/hel-892/animate-mask-reference/gguf__loader.py:229: trailing whitespace.
+ if "mmproj" not in name.lower():
docs/hel-892/animate-mask-reference/gguf__loader.py:230: trailing whitespace.
+ continue
docs/hel-892/animate-mask-reference/gguf__loader.py:231: trailing whitespace.
+ if tenc in name.lower():
docs/hel-892/animate-mask-reference/gguf__loader.py:232: trailing whitespace.
+ target.append(fname)
docs/hel-892/animate-mask-reference/gguf__loader.py:233: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:234: trailing whitespace.
+ if len(target) == 0:
docs/hel-892/animate-mask-reference/gguf__loader.py:235: trailing whitespace.
+ logging.error(f"Error: Can't find mmproj file for '{tenc_fname}' (matching:'{tenc}')! Qwen-Image-Edit will be broken!")
docs/hel-892/animate-mask-reference/gguf__loader.py:236: trailing whitespace.
+ return {}
docs/hel-892/animate-mask-reference/gguf__loader.py:237: trailing whitespace.
+ if len(target) > 1:
docs/hel-892/animate-mask-reference/gguf__loader.py:238: trailing whitespace.
+ logging.error(f"Ambiguous mmproj for text encoder '{tenc_fname}', will use first match.")
docs/hel-892/animate-mask-reference/gguf__loader.py:239: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:240: trailing whitespace.
+ logging.info(f"Using mmproj '{target[0]}' for text encoder '{tenc_fname}'.")
docs/hel-892/animate-mask-reference/gguf__loader.py:241: trailing whitespace.
+ target = os.path.join(root, target[0])
docs/hel-892/animate-mask-reference/gguf__loader.py:242: trailing whitespace.
+ vsd = gguf_sd_loader(target, is_text_model=True)
docs/hel-892/animate-mask-reference/gguf__loader.py:243: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:244: trailing whitespace.
+ # concat 4D to 5D
docs/hel-892/animate-mask-reference/gguf__loader.py:245: trailing whitespace.
+ if "v.patch_embd.weight.1" in vsd:
docs/hel-892/animate-mask-reference/gguf__loader.py:246: trailing whitespace.
+ w1 = dequantize_tensor(vsd.pop("v.patch_embd.weight"), dtype=torch.float32)
docs/hel-892/animate-mask-reference/gguf__loader.py:247: trailing whitespace.
+ w2 = dequantize_tensor(vsd.pop("v.patch_embd.weight.1"), dtype=torch.float32)
docs/hel-892/animate-mask-reference/gguf__loader.py:248: trailing whitespace.
+ vsd["v.patch_embd.weight"] = torch.stack([w1, w2], dim=2)
docs/hel-892/animate-mask-reference/gguf__loader.py:249: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:250: trailing whitespace.
+ # run main replacement
docs/hel-892/animate-mask-reference/gguf__loader.py:251: trailing whitespace.
+ vsd = sd_map_replace(vsd, CLIP_VISION_SD_MAP)
docs/hel-892/animate-mask-reference/gguf__loader.py:252: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:253: trailing whitespace.
+ # handle split Q/K/V
docs/hel-892/animate-mask-reference/gguf__loader.py:254: trailing whitespace.
+ if "visual.blocks.0.attn_q.weight" in vsd:
docs/hel-892/animate-mask-reference/gguf__loader.py:255: trailing whitespace.
+ attns = {}
docs/hel-892/animate-mask-reference/gguf__loader.py:256: trailing whitespace.
+ # filter out attentions + group
docs/hel-892/animate-mask-reference/gguf__loader.py:257: trailing whitespace.
+ for k,v in vsd.items():
docs/hel-892/animate-mask-reference/gguf__loader.py:258: trailing whitespace.
+ if any(x in k for x in ["attn_q", "attn_k", "attn_v"]):
docs/hel-892/animate-mask-reference/gguf__loader.py:259: trailing whitespace.
+ k_attn, k_name = k.rsplit(".attn_", 1)
docs/hel-892/animate-mask-reference/gguf__loader.py:260: trailing whitespace.
+ k_attn += ".attn.qkv." + k_name.split(".")[-1]
docs/hel-892/animate-mask-reference/gguf__loader.py:261: trailing whitespace.
+ if k_attn not in attns:
docs/hel-892/animate-mask-reference/gguf__loader.py:262: trailing whitespace.
+ attns[k_attn] = {}
docs/hel-892/animate-mask-reference/gguf__loader.py:263: trailing whitespace.
+ attns[k_attn][k_name] = dequantize_tensor(
docs/hel-892/animate-mask-reference/gguf__loader.py:264: trailing whitespace.
+ v, dtype=(torch.bfloat16 if is_quantized(v) else torch.float16)
docs/hel-892/animate-mask-reference/gguf__loader.py:265: trailing whitespace.
+ )
docs/hel-892/animate-mask-reference/gguf__loader.py:266: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:267: trailing whitespace.
+ # recombine
docs/hel-892/animate-mask-reference/gguf__loader.py:268: trailing whitespace.
+ for k,v in attns.items():
docs/hel-892/animate-mask-reference/gguf__loader.py:269: trailing whitespace.
+ suffix = k.split(".")[-1]
docs/hel-892/animate-mask-reference/gguf__loader.py:270: trailing whitespace.
+ vsd[k] = torch.cat([
docs/hel-892/animate-mask-reference/gguf__loader.py:271: trailing whitespace.
+ v[f"q.{suffix}"],
docs/hel-892/animate-mask-reference/gguf__loader.py:272: trailing whitespace.
+ v[f"k.{suffix}"],
docs/hel-892/animate-mask-reference/gguf__loader.py:273: trailing whitespace.
+ v[f"v.{suffix}"],
docs/hel-892/animate-mask-reference/gguf__loader.py:274: trailing whitespace.
+ ], dim=0)
docs/hel-892/animate-mask-reference/gguf__loader.py:275: trailing whitespace.
+ del attns
docs/hel-892/animate-mask-reference/gguf__loader.py:276: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:277: trailing whitespace.
+ return vsd
docs/hel-892/animate-mask-reference/gguf__loader.py:278: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:279: trailing whitespace.
+def gguf_tokenizer_loader(path, temb_shape):
docs/hel-892/animate-mask-reference/gguf__loader.py:280: trailing whitespace.
+ # convert gguf tokenizer to spiece
docs/hel-892/animate-mask-reference/gguf__loader.py:281: trailing whitespace.
+ logging.info("Attempting to recreate sentencepiece tokenizer from GGUF file metadata...")
docs/hel-892/animate-mask-reference/gguf__loader.py:282: trailing whitespace.
+ try:
docs/hel-892/animate-mask-reference/gguf__loader.py:283: trailing whitespace.
+ from sentencepiece import sentencepiece_model_pb2 as model
docs/hel-892/animate-mask-reference/gguf__loader.py:284: trailing whitespace.
+ except ImportError:
docs/hel-892/animate-mask-reference/gguf__loader.py:285: trailing whitespace.
+ raise ImportError("Please make sure sentencepiece and protobuf are installed.\npip install sentencepiece protobuf")
docs/hel-892/animate-mask-reference/gguf__loader.py:286: trailing whitespace.
+ spm = model.ModelProto()
docs/hel-892/animate-mask-reference/gguf__loader.py:287: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:288: trailing whitespace.
+ reader = gguf.GGUFReader(path)
docs/hel-892/animate-mask-reference/gguf__loader.py:289: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:290: trailing whitespace.
+ if get_field(reader, "tokenizer.ggml.model", str) == "t5":
docs/hel-892/animate-mask-reference/gguf__loader.py:291: trailing whitespace.
+ if temb_shape == (256384, 4096): # probably UMT5
docs/hel-892/animate-mask-reference/gguf__loader.py:292: trailing whitespace.
+ spm.trainer_spec.model_type == 1 # Unigram (do we have a T5 w/ BPE?)
docs/hel-892/animate-mask-reference/gguf__loader.py:293: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__loader.py:294: trailing whitespace.
+ raise NotImplementedError("Unknown model, can't set tokenizer!")
docs/hel-892/animate-mask-reference/gguf__loader.py:295: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__loader.py:296: trailing whitespace.
+ raise NotImplementedError("Unknown model, can't set tokenizer!")
docs/hel-892/animate-mask-reference/gguf__loader.py:297: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:298: trailing whitespace.
+ spm.normalizer_spec.add_dummy_prefix = get_field(reader, "tokenizer.ggml.add_space_prefix", bool)
docs/hel-892/animate-mask-reference/gguf__loader.py:299: trailing whitespace.
+ spm.normalizer_spec.remove_extra_whitespaces = get_field(reader, "tokenizer.ggml.remove_extra_whitespaces", bool)
docs/hel-892/animate-mask-reference/gguf__loader.py:300: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:301: trailing whitespace.
+ tokens = get_list_field(reader, "tokenizer.ggml.tokens", str)
docs/hel-892/animate-mask-reference/gguf__loader.py:302: trailing whitespace.
+ scores = get_list_field(reader, "tokenizer.ggml.scores", float)
docs/hel-892/animate-mask-reference/gguf__loader.py:303: trailing whitespace.
+ toktypes = get_list_field(reader, "tokenizer.ggml.token_type", int)
docs/hel-892/animate-mask-reference/gguf__loader.py:304: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:305: trailing whitespace.
+ for idx, (token, score, toktype) in enumerate(zip(tokens, scores, toktypes)):
docs/hel-892/animate-mask-reference/gguf__loader.py:306: trailing whitespace.
+ # # These aren't present in the original?
docs/hel-892/animate-mask-reference/gguf__loader.py:307: trailing whitespace.
+ # if toktype == 5 and idx >= temb_shape[0]%1000):
docs/hel-892/animate-mask-reference/gguf__loader.py:308: trailing whitespace.
+ # continue
docs/hel-892/animate-mask-reference/gguf__loader.py:309: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:310: trailing whitespace.
+ piece = spm.SentencePiece()
docs/hel-892/animate-mask-reference/gguf__loader.py:311: trailing whitespace.
+ piece.piece = token
docs/hel-892/animate-mask-reference/gguf__loader.py:312: trailing whitespace.
+ piece.score = score
docs/hel-892/animate-mask-reference/gguf__loader.py:313: trailing whitespace.
+ piece.type = toktype
docs/hel-892/animate-mask-reference/gguf__loader.py:314: trailing whitespace.
+ spm.pieces.append(piece)
docs/hel-892/animate-mask-reference/gguf__loader.py:315: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:316: trailing whitespace.
+ # unsure if any of these are correct
docs/hel-892/animate-mask-reference/gguf__loader.py:317: trailing whitespace.
+ spm.trainer_spec.byte_fallback = True
docs/hel-892/animate-mask-reference/gguf__loader.py:318: trailing whitespace.
+ spm.trainer_spec.vocab_size = len(tokens) # split off unused?
docs/hel-892/animate-mask-reference/gguf__loader.py:319: trailing whitespace.
+ spm.trainer_spec.max_sentence_length = 4096
docs/hel-892/animate-mask-reference/gguf__loader.py:320: trailing whitespace.
+ spm.trainer_spec.eos_id = get_field(reader, "tokenizer.ggml.eos_token_id", int)
docs/hel-892/animate-mask-reference/gguf__loader.py:321: trailing whitespace.
+ spm.trainer_spec.pad_id = get_field(reader, "tokenizer.ggml.padding_token_id", int)
docs/hel-892/animate-mask-reference/gguf__loader.py:322: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:323: trailing whitespace.
+ logging.info(f"Created tokenizer with vocab size of {len(spm.pieces)}")
docs/hel-892/animate-mask-reference/gguf__loader.py:324: trailing whitespace.
+ del reader
docs/hel-892/animate-mask-reference/gguf__loader.py:325: trailing whitespace.
+ return torch.ByteTensor(list(spm.SerializeToString()))
docs/hel-892/animate-mask-reference/gguf__loader.py:326: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__loader.py:327: trailing whitespace.
+def gguf_clip_loader(path):
docs/hel-892/animate-mask-reference/gguf__loader.py:328: trailing whitespace.
+ sd, arch = gguf_sd_loader(path, return_arch=True, is_text_model=True)
docs/hel-892/animate-mask-reference/gguf__loader.py:329: trailing whitespace.
+ if arch in {"t5", "t5encoder"}:
docs/hel-892/animate-mask-reference/gguf__loader.py:330: trailing whitespace.
+ temb_key = "token_embd.weight"
docs/hel-892/animate-mask-reference/gguf__loader.py:331: trailing whitespace.
+ if temb_key in sd and sd[temb_key].shape == (256384, 4096):
docs/hel-892/animate-mask-reference/gguf__loader.py:332: trailing whitespace.
+ # non-standard Comfy-Org tokenizer
docs/hel-892/animate-mask-reference/gguf__loader.py:333: trailing whitespace.
+ sd["spiece_model"] = gguf_tokenizer_loader(path, sd[temb_key].shape)
docs/hel-892/animate-mask-reference/gguf__loader.py:334: trailing whitespace.
+ # TODO: dequantizing token embed here is janky but otherwise we OOM due to tensor being massive.
docs/hel-892/animate-mask-reference/gguf__loader.py:335: trailing whitespace.
+ logging.warning(f"Dequantizing {temb_key} to prevent runtime OOM.")
docs/hel-892/animate-mask-reference/gguf__loader.py:336: trailing whitespace.
+ sd[temb_key] = dequantize_tensor(sd[temb_key], dtype=torch.float16)
docs/hel-892/animate-mask-reference/gguf__loader.py:337: trailing whitespace.
+ sd = sd_map_replace(sd, T5_SD_MAP)
docs/hel-892/animate-mask-reference/gguf__loader.py:338: trailing whitespace.
+ elif arch in {"llama", "qwen2vl"}:
docs/hel-892/animate-mask-reference/gguf__loader.py:339: trailing whitespace.
+ # TODO: pass model_options["vocab_size"] to loader somehow
docs/hel-892/animate-mask-reference/gguf__loader.py:340: trailing whitespace.
+ temb_key = "token_embd.weight"
docs/hel-892/animate-mask-reference/gguf__loader.py:341: trailing whitespace.
+ if temb_key in sd and sd[temb_key].shape[0] >= (64 * 1024):
docs/hel-892/animate-mask-reference/gguf__loader.py:342: trailing whitespace.
+ # See note above for T5.
docs/hel-892/animate-mask-reference/gguf__loader.py:343: trailing whitespace.
+ logging.warning(f"Dequantizing {temb_key} to prevent runtime OOM.")
docs/hel-892/animate-mask-reference/gguf__loader.py:344: trailing whitespace.
+ sd[temb_key] = dequantize_tensor(sd[temb_key], dtype=torch.float16)
docs/hel-892/animate-mask-reference/gguf__loader.py:345: trailing whitespace.
+ sd = sd_map_replace(sd, LLAMA_SD_MAP)
docs/hel-892/animate-mask-reference/gguf__loader.py:346: trailing whitespace.
+ if arch == "llama":
docs/hel-892/animate-mask-reference/gguf__loader.py:347: trailing whitespace.
+ sd = llama_permute(sd, 32, 8) # L3
docs/hel-892/animate-mask-reference/gguf__loader.py:348: trailing whitespace.
+ if arch == "qwen2vl":
docs/hel-892/animate-mask-reference/gguf__loader.py:349: trailing whitespace.
+ vsd = gguf_mmproj_loader(path)
docs/hel-892/animate-mask-reference/gguf__loader.py:350: trailing whitespace.
+ sd.update(vsd)
docs/hel-892/animate-mask-reference/gguf__loader.py:351: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__loader.py:352: trailing whitespace.
+ pass
docs/hel-892/animate-mask-reference/gguf__loader.py:353: trailing whitespace.
+ return sd
docs/hel-892/animate-mask-reference/gguf__nodes.py:1: trailing whitespace.
+# (c) City96 || Apache-2.0 (apache.org/licenses/LICENSE-2.0)
docs/hel-892/animate-mask-reference/gguf__nodes.py:2: trailing whitespace.
+import torch
docs/hel-892/animate-mask-reference/gguf__nodes.py:3: trailing whitespace.
+import logging
docs/hel-892/animate-mask-reference/gguf__nodes.py:4: trailing whitespace.
+import collections
docs/hel-892/animate-mask-reference/gguf__nodes.py:5: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:6: trailing whitespace.
+import nodes
docs/hel-892/animate-mask-reference/gguf__nodes.py:7: trailing whitespace.
+import comfy.sd
docs/hel-892/animate-mask-reference/gguf__nodes.py:8: trailing whitespace.
+import comfy.lora
docs/hel-892/animate-mask-reference/gguf__nodes.py:9: trailing whitespace.
+import comfy.float
docs/hel-892/animate-mask-reference/gguf__nodes.py:10: trailing whitespace.
+import comfy.utils
docs/hel-892/animate-mask-reference/gguf__nodes.py:11: trailing whitespace.
+import comfy.model_patcher
docs/hel-892/animate-mask-reference/gguf__nodes.py:12: trailing whitespace.
+import comfy.model_management
docs/hel-892/animate-mask-reference/gguf__nodes.py:13: trailing whitespace.
+import folder_paths
docs/hel-892/animate-mask-reference/gguf__nodes.py:14: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:15: trailing whitespace.
+from .ops import GGMLOps, move_patch_to_device
docs/hel-892/animate-mask-reference/gguf__nodes.py:16: trailing whitespace.
+from .loader import gguf_sd_loader, gguf_clip_loader
docs/hel-892/animate-mask-reference/gguf__nodes.py:17: trailing whitespace.
+from .dequant import is_quantized, is_torch_compatible
docs/hel-892/animate-mask-reference/gguf__nodes.py:18: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:19: trailing whitespace.
+def update_folder_names_and_paths(key, targets=[]):
docs/hel-892/animate-mask-reference/gguf__nodes.py:20: trailing whitespace.
+ # check for existing key
docs/hel-892/animate-mask-reference/gguf__nodes.py:21: trailing whitespace.
+ base = folder_paths.folder_names_and_paths.get(key, ([], {}))
docs/hel-892/animate-mask-reference/gguf__nodes.py:22: trailing whitespace.
+ base = base[0] if isinstance(base[0], (list, set, tuple)) else []
docs/hel-892/animate-mask-reference/gguf__nodes.py:23: trailing whitespace.
+ # find base key & add w/ fallback, sanity check + warning
docs/hel-892/animate-mask-reference/gguf__nodes.py:24: trailing whitespace.
+ target = next((x for x in targets if x in folder_paths.folder_names_and_paths), targets[0])
docs/hel-892/animate-mask-reference/gguf__nodes.py:25: trailing whitespace.
+ orig, _ = folder_paths.folder_names_and_paths.get(target, ([], {}))
docs/hel-892/animate-mask-reference/gguf__nodes.py:26: trailing whitespace.
+ folder_paths.folder_names_and_paths[key] = (orig or base, {".gguf"})
docs/hel-892/animate-mask-reference/gguf__nodes.py:27: trailing whitespace.
+ if base and base != orig:
docs/hel-892/animate-mask-reference/gguf__nodes.py:28: trailing whitespace.
+ logging.warning(f"Unknown file list already present on key {key}: {base}")
docs/hel-892/animate-mask-reference/gguf__nodes.py:29: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:30: trailing whitespace.
+# Add a custom keys for files ending in .gguf
docs/hel-892/animate-mask-reference/gguf__nodes.py:31: trailing whitespace.
+update_folder_names_and_paths("unet_gguf", ["diffusion_models", "unet"])
docs/hel-892/animate-mask-reference/gguf__nodes.py:32: trailing whitespace.
+update_folder_names_and_paths("clip_gguf", ["text_encoders", "clip"])
docs/hel-892/animate-mask-reference/gguf__nodes.py:33: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:34: trailing whitespace.
+class GGUFModelPatcher(comfy.model_patcher.ModelPatcher):
docs/hel-892/animate-mask-reference/gguf__nodes.py:35: trailing whitespace.
+ patch_on_device = False
docs/hel-892/animate-mask-reference/gguf__nodes.py:36: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:37: trailing whitespace.
+ def patch_weight_to_device(self, key, device_to=None, inplace_update=False):
docs/hel-892/animate-mask-reference/gguf__nodes.py:38: trailing whitespace.
+ if key not in self.patches:
docs/hel-892/animate-mask-reference/gguf__nodes.py:39: trailing whitespace.
+ return
docs/hel-892/animate-mask-reference/gguf__nodes.py:40: trailing whitespace.
+ weight = comfy.utils.get_attr(self.model, key)
docs/hel-892/animate-mask-reference/gguf__nodes.py:41: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:42: trailing whitespace.
+ patches = self.patches[key]
docs/hel-892/animate-mask-reference/gguf__nodes.py:43: trailing whitespace.
+ if is_quantized(weight):
docs/hel-892/animate-mask-reference/gguf__nodes.py:44: trailing whitespace.
+ out_weight = weight.to(device_to)
docs/hel-892/animate-mask-reference/gguf__nodes.py:45: trailing whitespace.
+ patches = move_patch_to_device(patches, self.load_device if self.patch_on_device else self.offload_device)
docs/hel-892/animate-mask-reference/gguf__nodes.py:46: trailing whitespace.
+ # TODO: do we ever have legitimate duplicate patches? (i.e. patch on top of patched weight)
docs/hel-892/animate-mask-reference/gguf__nodes.py:47: trailing whitespace.
+ out_weight.patches = [(patches, key)]
docs/hel-892/animate-mask-reference/gguf__nodes.py:48: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__nodes.py:49: trailing whitespace.
+ inplace_update = self.weight_inplace_update or inplace_update
docs/hel-892/animate-mask-reference/gguf__nodes.py:50: trailing whitespace.
+ if key not in self.backup:
docs/hel-892/animate-mask-reference/gguf__nodes.py:51: trailing whitespace.
+ self.backup[key] = collections.namedtuple('Dimension', ['weight', 'inplace_update'])(
docs/hel-892/animate-mask-reference/gguf__nodes.py:52: trailing whitespace.
+ weight.to(device=self.offload_device, copy=inplace_update), inplace_update
docs/hel-892/animate-mask-reference/gguf__nodes.py:53: trailing whitespace.
+ )
docs/hel-892/animate-mask-reference/gguf__nodes.py:54: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:55: trailing whitespace.
+ if device_to is not None:
docs/hel-892/animate-mask-reference/gguf__nodes.py:56: trailing whitespace.
+ temp_weight = comfy.model_management.cast_to_device(weight, device_to, torch.float32, copy=True)
docs/hel-892/animate-mask-reference/gguf__nodes.py:57: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__nodes.py:58: trailing whitespace.
+ temp_weight = weight.to(torch.float32, copy=True)
docs/hel-892/animate-mask-reference/gguf__nodes.py:59: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:60: trailing whitespace.
+ out_weight = comfy.lora.calculate_weight(patches, temp_weight, key)
docs/hel-892/animate-mask-reference/gguf__nodes.py:61: trailing whitespace.
+ out_weight = comfy.float.stochastic_rounding(out_weight, weight.dtype)
docs/hel-892/animate-mask-reference/gguf__nodes.py:62: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:63: trailing whitespace.
+ if inplace_update:
docs/hel-892/animate-mask-reference/gguf__nodes.py:64: trailing whitespace.
+ comfy.utils.copy_to_param(self.model, key, out_weight)
docs/hel-892/animate-mask-reference/gguf__nodes.py:65: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__nodes.py:66: trailing whitespace.
+ comfy.utils.set_attr_param(self.model, key, out_weight)
docs/hel-892/animate-mask-reference/gguf__nodes.py:67: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:68: trailing whitespace.
+ def unpatch_model(self, device_to=None, unpatch_weights=True):
docs/hel-892/animate-mask-reference/gguf__nodes.py:69: trailing whitespace.
+ if unpatch_weights:
docs/hel-892/animate-mask-reference/gguf__nodes.py:70: trailing whitespace.
+ for p in self.model.parameters():
docs/hel-892/animate-mask-reference/gguf__nodes.py:71: trailing whitespace.
+ if is_torch_compatible(p):
docs/hel-892/animate-mask-reference/gguf__nodes.py:72: trailing whitespace.
+ continue
docs/hel-892/animate-mask-reference/gguf__nodes.py:73: trailing whitespace.
+ patches = getattr(p, "patches", [])
docs/hel-892/animate-mask-reference/gguf__nodes.py:74: trailing whitespace.
+ if len(patches) > 0:
docs/hel-892/animate-mask-reference/gguf__nodes.py:75: trailing whitespace.
+ p.patches = []
docs/hel-892/animate-mask-reference/gguf__nodes.py:76: trailing whitespace.
+ # TODO: Find another way to not unload after patches
docs/hel-892/animate-mask-reference/gguf__nodes.py:77: trailing whitespace.
+ return super().unpatch_model(device_to=device_to, unpatch_weights=unpatch_weights)
docs/hel-892/animate-mask-reference/gguf__nodes.py:78: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:79: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:80: trailing whitespace.
+ def pin_weight_to_device(self, key):
docs/hel-892/animate-mask-reference/gguf__nodes.py:81: trailing whitespace.
+ op_key = key.rsplit('.', 1)[0]
docs/hel-892/animate-mask-reference/gguf__nodes.py:82: trailing whitespace.
+ if not self.mmap_released and op_key in self.named_modules_to_munmap:
docs/hel-892/animate-mask-reference/gguf__nodes.py:83: trailing whitespace.
+ # TODO: possible to OOM, find better way to detach
docs/hel-892/animate-mask-reference/gguf__nodes.py:84: trailing whitespace.
+ self.named_modules_to_munmap[op_key].to(self.load_device).to(self.offload_device)
docs/hel-892/animate-mask-reference/gguf__nodes.py:85: trailing whitespace.
+ del self.named_modules_to_munmap[op_key]
docs/hel-892/animate-mask-reference/gguf__nodes.py:86: trailing whitespace.
+ super().pin_weight_to_device(key)
docs/hel-892/animate-mask-reference/gguf__nodes.py:87: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:88: trailing whitespace.
+ mmap_released = False
docs/hel-892/animate-mask-reference/gguf__nodes.py:89: trailing whitespace.
+ named_modules_to_munmap = {}
docs/hel-892/animate-mask-reference/gguf__nodes.py:90: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:91: trailing whitespace.
+ def load(self, *args, force_patch_weights=False, **kwargs):
docs/hel-892/animate-mask-reference/gguf__nodes.py:92: trailing whitespace.
+ if not self.mmap_released:
docs/hel-892/animate-mask-reference/gguf__nodes.py:93: trailing whitespace.
+ self.named_modules_to_munmap = dict(self.model.named_modules())
docs/hel-892/animate-mask-reference/gguf__nodes.py:94: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:95: trailing whitespace.
+ # always call `patch_weight_to_device` even for lowvram
docs/hel-892/animate-mask-reference/gguf__nodes.py:96: trailing whitespace.
+ super().load(*args, force_patch_weights=True, **kwargs)
docs/hel-892/animate-mask-reference/gguf__nodes.py:97: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:98: trailing whitespace.
+ # make sure nothing stays linked to mmap after first load
docs/hel-892/animate-mask-reference/gguf__nodes.py:99: trailing whitespace.
+ if not self.mmap_released:
docs/hel-892/animate-mask-reference/gguf__nodes.py:100: trailing whitespace.
+ linked = []
docs/hel-892/animate-mask-reference/gguf__nodes.py:101: trailing whitespace.
+ if kwargs.get("lowvram_model_memory", 0) > 0:
docs/hel-892/animate-mask-reference/gguf__nodes.py:102: trailing whitespace.
+ for n, m in self.named_modules_to_munmap.items():
docs/hel-892/animate-mask-reference/gguf__nodes.py:103: trailing whitespace.
+ if hasattr(m, "weight"):
docs/hel-892/animate-mask-reference/gguf__nodes.py:104: trailing whitespace.
+ device = getattr(m.weight, "device", None)
docs/hel-892/animate-mask-reference/gguf__nodes.py:105: trailing whitespace.
+ if device == self.offload_device:
docs/hel-892/animate-mask-reference/gguf__nodes.py:106: trailing whitespace.
+ linked.append((n, m))
docs/hel-892/animate-mask-reference/gguf__nodes.py:107: trailing whitespace.
+ continue
docs/hel-892/animate-mask-reference/gguf__nodes.py:108: trailing whitespace.
+ if hasattr(m, "bias"):
docs/hel-892/animate-mask-reference/gguf__nodes.py:109: trailing whitespace.
+ device = getattr(m.bias, "device", None)
docs/hel-892/animate-mask-reference/gguf__nodes.py:110: trailing whitespace.
+ if device == self.offload_device:
docs/hel-892/animate-mask-reference/gguf__nodes.py:111: trailing whitespace.
+ linked.append((n, m))
docs/hel-892/animate-mask-reference/gguf__nodes.py:112: trailing whitespace.
+ continue
docs/hel-892/animate-mask-reference/gguf__nodes.py:113: trailing whitespace.
+ if linked and self.load_device != self.offload_device:
docs/hel-892/animate-mask-reference/gguf__nodes.py:114: trailing whitespace.
+ logging.info(f"Attempting to release mmap ({len(linked)})")
docs/hel-892/animate-mask-reference/gguf__nodes.py:115: trailing whitespace.
+ for n, m in linked:
docs/hel-892/animate-mask-reference/gguf__nodes.py:116: trailing whitespace.
+ # TODO: possible to OOM, find better way to detach
docs/hel-892/animate-mask-reference/gguf__nodes.py:117: trailing whitespace.
+ m.to(self.load_device).to(self.offload_device)
docs/hel-892/animate-mask-reference/gguf__nodes.py:118: trailing whitespace.
+ self.mmap_released = True
docs/hel-892/animate-mask-reference/gguf__nodes.py:119: trailing whitespace.
+ self.named_modules_to_munmap = {}
docs/hel-892/animate-mask-reference/gguf__nodes.py:120: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:121: trailing whitespace.
+ def clone(self, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__nodes.py:122: trailing whitespace.
+ src_cls = self.__class__
docs/hel-892/animate-mask-reference/gguf__nodes.py:123: trailing whitespace.
+ self.__class__ = GGUFModelPatcher
docs/hel-892/animate-mask-reference/gguf__nodes.py:124: trailing whitespace.
+ n = super().clone(*args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__nodes.py:125: trailing whitespace.
+ n.__class__ = GGUFModelPatcher
docs/hel-892/animate-mask-reference/gguf__nodes.py:126: trailing whitespace.
+ self.__class__ = src_cls
docs/hel-892/animate-mask-reference/gguf__nodes.py:127: trailing whitespace.
+ # GGUF specific clone values below
docs/hel-892/animate-mask-reference/gguf__nodes.py:128: trailing whitespace.
+ n.patch_on_device = getattr(self, "patch_on_device", False)
docs/hel-892/animate-mask-reference/gguf__nodes.py:129: trailing whitespace.
+ n.mmap_released = getattr(self, "mmap_released", False)
docs/hel-892/animate-mask-reference/gguf__nodes.py:130: trailing whitespace.
+ if src_cls != GGUFModelPatcher:
docs/hel-892/animate-mask-reference/gguf__nodes.py:131: trailing whitespace.
+ n.size = 0 # force recalc
docs/hel-892/animate-mask-reference/gguf__nodes.py:132: trailing whitespace.
+ return n
docs/hel-892/animate-mask-reference/gguf__nodes.py:133: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:134: trailing whitespace.
+class UnetLoaderGGUF:
docs/hel-892/animate-mask-reference/gguf__nodes.py:135: trailing whitespace.
+ @classmethod
docs/hel-892/animate-mask-reference/gguf__nodes.py:136: trailing whitespace.
+ def INPUT_TYPES(s):
docs/hel-892/animate-mask-reference/gguf__nodes.py:137: trailing whitespace.
+ unet_names = [x for x in folder_paths.get_filename_list("unet_gguf")]
docs/hel-892/animate-mask-reference/gguf__nodes.py:138: trailing whitespace.
+ return {
docs/hel-892/animate-mask-reference/gguf__nodes.py:139: trailing whitespace.
+ "required": {
docs/hel-892/animate-mask-reference/gguf__nodes.py:140: trailing whitespace.
+ "unet_name": (unet_names,),
docs/hel-892/animate-mask-reference/gguf__nodes.py:141: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:142: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:143: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:144: trailing whitespace.
+ RETURN_TYPES = ("MODEL",)
docs/hel-892/animate-mask-reference/gguf__nodes.py:145: trailing whitespace.
+ FUNCTION = "load_unet"
docs/hel-892/animate-mask-reference/gguf__nodes.py:146: trailing whitespace.
+ CATEGORY = "bootleg"
docs/hel-892/animate-mask-reference/gguf__nodes.py:147: trailing whitespace.
+ TITLE = "Unet Loader (GGUF)"
docs/hel-892/animate-mask-reference/gguf__nodes.py:148: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:149: trailing whitespace.
+ def load_unet(self, unet_name, dequant_dtype=None, patch_dtype=None, patch_on_device=None):
docs/hel-892/animate-mask-reference/gguf__nodes.py:150: trailing whitespace.
+ ops = GGMLOps()
docs/hel-892/animate-mask-reference/gguf__nodes.py:151: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:152: trailing whitespace.
+ if dequant_dtype in ("default", None):
docs/hel-892/animate-mask-reference/gguf__nodes.py:153: trailing whitespace.
+ ops.Linear.dequant_dtype = None
docs/hel-892/animate-mask-reference/gguf__nodes.py:154: trailing whitespace.
+ elif dequant_dtype in ["target"]:
docs/hel-892/animate-mask-reference/gguf__nodes.py:155: trailing whitespace.
+ ops.Linear.dequant_dtype = dequant_dtype
docs/hel-892/animate-mask-reference/gguf__nodes.py:156: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__nodes.py:157: trailing whitespace.
+ ops.Linear.dequant_dtype = getattr(torch, dequant_dtype)
docs/hel-892/animate-mask-reference/gguf__nodes.py:158: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:159: trailing whitespace.
+ if patch_dtype in ("default", None):
docs/hel-892/animate-mask-reference/gguf__nodes.py:160: trailing whitespace.
+ ops.Linear.patch_dtype = None
docs/hel-892/animate-mask-reference/gguf__nodes.py:161: trailing whitespace.
+ elif patch_dtype in ["target"]:
docs/hel-892/animate-mask-reference/gguf__nodes.py:162: trailing whitespace.
+ ops.Linear.patch_dtype = patch_dtype
docs/hel-892/animate-mask-reference/gguf__nodes.py:163: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__nodes.py:164: trailing whitespace.
+ ops.Linear.patch_dtype = getattr(torch, patch_dtype)
docs/hel-892/animate-mask-reference/gguf__nodes.py:165: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:166: trailing whitespace.
+ # init model
docs/hel-892/animate-mask-reference/gguf__nodes.py:167: trailing whitespace.
+ unet_path = folder_paths.get_full_path("unet", unet_name)
docs/hel-892/animate-mask-reference/gguf__nodes.py:168: trailing whitespace.
+ sd = gguf_sd_loader(unet_path)
docs/hel-892/animate-mask-reference/gguf__nodes.py:169: trailing whitespace.
+ model = comfy.sd.load_diffusion_model_state_dict(
docs/hel-892/animate-mask-reference/gguf__nodes.py:170: trailing whitespace.
+ sd, model_options={"custom_operations": ops}
docs/hel-892/animate-mask-reference/gguf__nodes.py:171: trailing whitespace.
+ )
docs/hel-892/animate-mask-reference/gguf__nodes.py:172: trailing whitespace.
+ if model is None:
docs/hel-892/animate-mask-reference/gguf__nodes.py:173: trailing whitespace.
+ logging.error("ERROR UNSUPPORTED UNET {}".format(unet_path))
docs/hel-892/animate-mask-reference/gguf__nodes.py:174: trailing whitespace.
+ raise RuntimeError("ERROR: Could not detect model type of: {}".format(unet_path))
docs/hel-892/animate-mask-reference/gguf__nodes.py:175: trailing whitespace.
+ model = GGUFModelPatcher.clone(model)
docs/hel-892/animate-mask-reference/gguf__nodes.py:176: trailing whitespace.
+ model.patch_on_device = patch_on_device
docs/hel-892/animate-mask-reference/gguf__nodes.py:177: trailing whitespace.
+ return (model,)
docs/hel-892/animate-mask-reference/gguf__nodes.py:178: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:179: trailing whitespace.
+class UnetLoaderGGUFAdvanced(UnetLoaderGGUF):
docs/hel-892/animate-mask-reference/gguf__nodes.py:180: trailing whitespace.
+ @classmethod
docs/hel-892/animate-mask-reference/gguf__nodes.py:181: trailing whitespace.
+ def INPUT_TYPES(s):
docs/hel-892/animate-mask-reference/gguf__nodes.py:182: trailing whitespace.
+ unet_names = [x for x in folder_paths.get_filename_list("unet_gguf")]
docs/hel-892/animate-mask-reference/gguf__nodes.py:183: trailing whitespace.
+ return {
docs/hel-892/animate-mask-reference/gguf__nodes.py:184: trailing whitespace.
+ "required": {
docs/hel-892/animate-mask-reference/gguf__nodes.py:185: trailing whitespace.
+ "unet_name": (unet_names,),
docs/hel-892/animate-mask-reference/gguf__nodes.py:186: trailing whitespace.
+ "dequant_dtype": (["default", "target", "float32", "float16", "bfloat16"], {"default": "default"}),
docs/hel-892/animate-mask-reference/gguf__nodes.py:187: trailing whitespace.
+ "patch_dtype": (["default", "target", "float32", "float16", "bfloat16"], {"default": "default"}),
docs/hel-892/animate-mask-reference/gguf__nodes.py:188: trailing whitespace.
+ "patch_on_device": ("BOOLEAN", {"default": False}),
docs/hel-892/animate-mask-reference/gguf__nodes.py:189: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:190: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:191: trailing whitespace.
+ TITLE = "Unet Loader (GGUF/Advanced)"
docs/hel-892/animate-mask-reference/gguf__nodes.py:192: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:193: trailing whitespace.
+class CLIPLoaderGGUF:
docs/hel-892/animate-mask-reference/gguf__nodes.py:194: trailing whitespace.
+ @classmethod
docs/hel-892/animate-mask-reference/gguf__nodes.py:195: trailing whitespace.
+ def INPUT_TYPES(s):
docs/hel-892/animate-mask-reference/gguf__nodes.py:196: trailing whitespace.
+ base = nodes.CLIPLoader.INPUT_TYPES()
docs/hel-892/animate-mask-reference/gguf__nodes.py:197: trailing whitespace.
+ return {
docs/hel-892/animate-mask-reference/gguf__nodes.py:198: trailing whitespace.
+ "required": {
docs/hel-892/animate-mask-reference/gguf__nodes.py:199: trailing whitespace.
+ "clip_name": (s.get_filename_list(),),
docs/hel-892/animate-mask-reference/gguf__nodes.py:200: trailing whitespace.
+ "type": base["required"]["type"],
docs/hel-892/animate-mask-reference/gguf__nodes.py:201: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:202: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:203: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:204: trailing whitespace.
+ RETURN_TYPES = ("CLIP",)
docs/hel-892/animate-mask-reference/gguf__nodes.py:205: trailing whitespace.
+ FUNCTION = "load_clip"
docs/hel-892/animate-mask-reference/gguf__nodes.py:206: trailing whitespace.
+ CATEGORY = "bootleg"
docs/hel-892/animate-mask-reference/gguf__nodes.py:207: trailing whitespace.
+ TITLE = "CLIPLoader (GGUF)"
docs/hel-892/animate-mask-reference/gguf__nodes.py:208: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:209: trailing whitespace.
+ @classmethod
docs/hel-892/animate-mask-reference/gguf__nodes.py:210: trailing whitespace.
+ def get_filename_list(s):
docs/hel-892/animate-mask-reference/gguf__nodes.py:211: trailing whitespace.
+ files = []
docs/hel-892/animate-mask-reference/gguf__nodes.py:212: trailing whitespace.
+ files += folder_paths.get_filename_list("clip")
docs/hel-892/animate-mask-reference/gguf__nodes.py:213: trailing whitespace.
+ files += folder_paths.get_filename_list("clip_gguf")
docs/hel-892/animate-mask-reference/gguf__nodes.py:214: trailing whitespace.
+ return sorted(files)
docs/hel-892/animate-mask-reference/gguf__nodes.py:215: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:216: trailing whitespace.
+ def load_data(self, ckpt_paths):
docs/hel-892/animate-mask-reference/gguf__nodes.py:217: trailing whitespace.
+ clip_data = []
docs/hel-892/animate-mask-reference/gguf__nodes.py:218: trailing whitespace.
+ for p in ckpt_paths:
docs/hel-892/animate-mask-reference/gguf__nodes.py:219: trailing whitespace.
+ if p.endswith(".gguf"):
docs/hel-892/animate-mask-reference/gguf__nodes.py:220: trailing whitespace.
+ sd = gguf_clip_loader(p)
docs/hel-892/animate-mask-reference/gguf__nodes.py:221: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__nodes.py:222: trailing whitespace.
+ sd = comfy.utils.load_torch_file(p, safe_load=True)
docs/hel-892/animate-mask-reference/gguf__nodes.py:223: trailing whitespace.
+ if "scaled_fp8" in sd: # NOTE: Scaled FP8 would require different custom ops, but only one can be active
docs/hel-892/animate-mask-reference/gguf__nodes.py:224: trailing whitespace.
+ raise NotImplementedError(f"Mixing scaled FP8 with GGUF is not supported! Use regular CLIP loader or switch model(s)\n({p})")
docs/hel-892/animate-mask-reference/gguf__nodes.py:225: trailing whitespace.
+ clip_data.append(sd)
docs/hel-892/animate-mask-reference/gguf__nodes.py:226: trailing whitespace.
+ return clip_data
docs/hel-892/animate-mask-reference/gguf__nodes.py:227: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:228: trailing whitespace.
+ def load_patcher(self, clip_paths, clip_type, clip_data):
docs/hel-892/animate-mask-reference/gguf__nodes.py:229: trailing whitespace.
+ clip = comfy.sd.load_text_encoder_state_dicts(
docs/hel-892/animate-mask-reference/gguf__nodes.py:230: trailing whitespace.
+ clip_type = clip_type,
docs/hel-892/animate-mask-reference/gguf__nodes.py:231: trailing whitespace.
+ state_dicts = clip_data,
docs/hel-892/animate-mask-reference/gguf__nodes.py:232: trailing whitespace.
+ model_options = {
docs/hel-892/animate-mask-reference/gguf__nodes.py:233: trailing whitespace.
+ "custom_operations": GGMLOps,
docs/hel-892/animate-mask-reference/gguf__nodes.py:234: trailing whitespace.
+ "initial_device": comfy.model_management.text_encoder_offload_device()
docs/hel-892/animate-mask-reference/gguf__nodes.py:235: trailing whitespace.
+ },
docs/hel-892/animate-mask-reference/gguf__nodes.py:236: trailing whitespace.
+ embedding_directory = folder_paths.get_folder_paths("embeddings"),
docs/hel-892/animate-mask-reference/gguf__nodes.py:237: trailing whitespace.
+ )
docs/hel-892/animate-mask-reference/gguf__nodes.py:238: trailing whitespace.
+ clip.patcher = GGUFModelPatcher.clone(clip.patcher)
docs/hel-892/animate-mask-reference/gguf__nodes.py:239: trailing whitespace.
+ return clip
docs/hel-892/animate-mask-reference/gguf__nodes.py:240: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:241: trailing whitespace.
+ def load_clip(self, clip_name, type="stable_diffusion"):
docs/hel-892/animate-mask-reference/gguf__nodes.py:242: trailing whitespace.
+ clip_path = folder_paths.get_full_path("clip", clip_name)
docs/hel-892/animate-mask-reference/gguf__nodes.py:243: trailing whitespace.
+ clip_type = getattr(comfy.sd.CLIPType, type.upper(), comfy.sd.CLIPType.STABLE_DIFFUSION)
docs/hel-892/animate-mask-reference/gguf__nodes.py:244: trailing whitespace.
+ return (self.load_patcher([clip_path], clip_type, self.load_data([clip_path])),)
docs/hel-892/animate-mask-reference/gguf__nodes.py:245: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:246: trailing whitespace.
+class DualCLIPLoaderGGUF(CLIPLoaderGGUF):
docs/hel-892/animate-mask-reference/gguf__nodes.py:247: trailing whitespace.
+ @classmethod
docs/hel-892/animate-mask-reference/gguf__nodes.py:248: trailing whitespace.
+ def INPUT_TYPES(s):
docs/hel-892/animate-mask-reference/gguf__nodes.py:249: trailing whitespace.
+ base = nodes.DualCLIPLoader.INPUT_TYPES()
docs/hel-892/animate-mask-reference/gguf__nodes.py:250: trailing whitespace.
+ file_options = (s.get_filename_list(), )
docs/hel-892/animate-mask-reference/gguf__nodes.py:251: trailing whitespace.
+ return {
docs/hel-892/animate-mask-reference/gguf__nodes.py:252: trailing whitespace.
+ "required": {
docs/hel-892/animate-mask-reference/gguf__nodes.py:253: trailing whitespace.
+ "clip_name1": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:254: trailing whitespace.
+ "clip_name2": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:255: trailing whitespace.
+ "type": base["required"]["type"],
docs/hel-892/animate-mask-reference/gguf__nodes.py:256: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:257: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:258: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:259: trailing whitespace.
+ TITLE = "DualCLIPLoader (GGUF)"
docs/hel-892/animate-mask-reference/gguf__nodes.py:260: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:261: trailing whitespace.
+ def load_clip(self, clip_name1, clip_name2, type):
docs/hel-892/animate-mask-reference/gguf__nodes.py:262: trailing whitespace.
+ clip_path1 = folder_paths.get_full_path("clip", clip_name1)
docs/hel-892/animate-mask-reference/gguf__nodes.py:263: trailing whitespace.
+ clip_path2 = folder_paths.get_full_path("clip", clip_name2)
docs/hel-892/animate-mask-reference/gguf__nodes.py:264: trailing whitespace.
+ clip_paths = (clip_path1, clip_path2)
docs/hel-892/animate-mask-reference/gguf__nodes.py:265: trailing whitespace.
+ clip_type = getattr(comfy.sd.CLIPType, type.upper(), comfy.sd.CLIPType.STABLE_DIFFUSION)
docs/hel-892/animate-mask-reference/gguf__nodes.py:266: trailing whitespace.
+ return (self.load_patcher(clip_paths, clip_type, self.load_data(clip_paths)),)
docs/hel-892/animate-mask-reference/gguf__nodes.py:267: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:268: trailing whitespace.
+class TripleCLIPLoaderGGUF(CLIPLoaderGGUF):
docs/hel-892/animate-mask-reference/gguf__nodes.py:269: trailing whitespace.
+ @classmethod
docs/hel-892/animate-mask-reference/gguf__nodes.py:270: trailing whitespace.
+ def INPUT_TYPES(s):
docs/hel-892/animate-mask-reference/gguf__nodes.py:271: trailing whitespace.
+ file_options = (s.get_filename_list(), )
docs/hel-892/animate-mask-reference/gguf__nodes.py:272: trailing whitespace.
+ return {
docs/hel-892/animate-mask-reference/gguf__nodes.py:273: trailing whitespace.
+ "required": {
docs/hel-892/animate-mask-reference/gguf__nodes.py:274: trailing whitespace.
+ "clip_name1": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:275: trailing whitespace.
+ "clip_name2": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:276: trailing whitespace.
+ "clip_name3": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:277: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:278: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:279: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:280: trailing whitespace.
+ TITLE = "TripleCLIPLoader (GGUF)"
docs/hel-892/animate-mask-reference/gguf__nodes.py:281: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:282: trailing whitespace.
+ def load_clip(self, clip_name1, clip_name2, clip_name3, type="sd3"):
docs/hel-892/animate-mask-reference/gguf__nodes.py:283: trailing whitespace.
+ clip_path1 = folder_paths.get_full_path("clip", clip_name1)
docs/hel-892/animate-mask-reference/gguf__nodes.py:284: trailing whitespace.
+ clip_path2 = folder_paths.get_full_path("clip", clip_name2)
docs/hel-892/animate-mask-reference/gguf__nodes.py:285: trailing whitespace.
+ clip_path3 = folder_paths.get_full_path("clip", clip_name3)
docs/hel-892/animate-mask-reference/gguf__nodes.py:286: trailing whitespace.
+ clip_paths = (clip_path1, clip_path2, clip_path3)
docs/hel-892/animate-mask-reference/gguf__nodes.py:287: trailing whitespace.
+ clip_type = getattr(comfy.sd.CLIPType, type.upper(), comfy.sd.CLIPType.STABLE_DIFFUSION)
docs/hel-892/animate-mask-reference/gguf__nodes.py:288: trailing whitespace.
+ return (self.load_patcher(clip_paths, clip_type, self.load_data(clip_paths)),)
docs/hel-892/animate-mask-reference/gguf__nodes.py:289: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:290: trailing whitespace.
+class QuadrupleCLIPLoaderGGUF(CLIPLoaderGGUF):
docs/hel-892/animate-mask-reference/gguf__nodes.py:291: trailing whitespace.
+ @classmethod
docs/hel-892/animate-mask-reference/gguf__nodes.py:292: trailing whitespace.
+ def INPUT_TYPES(s):
docs/hel-892/animate-mask-reference/gguf__nodes.py:293: trailing whitespace.
+ file_options = (s.get_filename_list(), )
docs/hel-892/animate-mask-reference/gguf__nodes.py:294: trailing whitespace.
+ return {
docs/hel-892/animate-mask-reference/gguf__nodes.py:295: trailing whitespace.
+ "required": {
docs/hel-892/animate-mask-reference/gguf__nodes.py:296: trailing whitespace.
+ "clip_name1": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:297: trailing whitespace.
+ "clip_name2": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:298: trailing whitespace.
+ "clip_name3": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:299: trailing whitespace.
+ "clip_name4": file_options,
docs/hel-892/animate-mask-reference/gguf__nodes.py:300: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:301: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/gguf__nodes.py:302: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:303: trailing whitespace.
+ TITLE = "QuadrupleCLIPLoader (GGUF)"
docs/hel-892/animate-mask-reference/gguf__nodes.py:304: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:305: trailing whitespace.
+ def load_clip(self, clip_name1, clip_name2, clip_name3, clip_name4, type="stable_diffusion"):
docs/hel-892/animate-mask-reference/gguf__nodes.py:306: trailing whitespace.
+ clip_path1 = folder_paths.get_full_path("clip", clip_name1)
docs/hel-892/animate-mask-reference/gguf__nodes.py:307: trailing whitespace.
+ clip_path2 = folder_paths.get_full_path("clip", clip_name2)
docs/hel-892/animate-mask-reference/gguf__nodes.py:308: trailing whitespace.
+ clip_path3 = folder_paths.get_full_path("clip", clip_name3)
docs/hel-892/animate-mask-reference/gguf__nodes.py:309: trailing whitespace.
+ clip_path4 = folder_paths.get_full_path("clip", clip_name4)
docs/hel-892/animate-mask-reference/gguf__nodes.py:310: trailing whitespace.
+ clip_paths = (clip_path1, clip_path2, clip_path3, clip_path4)
docs/hel-892/animate-mask-reference/gguf__nodes.py:311: trailing whitespace.
+ clip_type = getattr(comfy.sd.CLIPType, type.upper(), comfy.sd.CLIPType.STABLE_DIFFUSION)
docs/hel-892/animate-mask-reference/gguf__nodes.py:312: trailing whitespace.
+ return (self.load_patcher(clip_paths, clip_type, self.load_data(clip_paths)),)
docs/hel-892/animate-mask-reference/gguf__nodes.py:313: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__nodes.py:314: trailing whitespace.
+NODE_CLASS_MAPPINGS = {
docs/hel-892/animate-mask-reference/gguf__nodes.py:315: trailing whitespace.
+ "UnetLoaderGGUF": UnetLoaderGGUF,
docs/hel-892/animate-mask-reference/gguf__nodes.py:316: trailing whitespace.
+ "CLIPLoaderGGUF": CLIPLoaderGGUF,
docs/hel-892/animate-mask-reference/gguf__nodes.py:317: trailing whitespace.
+ "DualCLIPLoaderGGUF": DualCLIPLoaderGGUF,
docs/hel-892/animate-mask-reference/gguf__nodes.py:318: trailing whitespace.
+ "TripleCLIPLoaderGGUF": TripleCLIPLoaderGGUF,
docs/hel-892/animate-mask-reference/gguf__nodes.py:319: trailing whitespace.
+ "QuadrupleCLIPLoaderGGUF": QuadrupleCLIPLoaderGGUF,
docs/hel-892/animate-mask-reference/gguf__nodes.py:320: trailing whitespace.
+ "UnetLoaderGGUFAdvanced": UnetLoaderGGUFAdvanced,
docs/hel-892/animate-mask-reference/gguf__nodes.py:321: trailing whitespace.
+}
docs/hel-892/animate-mask-reference/gguf__ops.py:1: trailing whitespace.
+# (c) City96 || Apache-2.0 (apache.org/licenses/LICENSE-2.0)
docs/hel-892/animate-mask-reference/gguf__ops.py:2: trailing whitespace.
+import gguf
docs/hel-892/animate-mask-reference/gguf__ops.py:3: trailing whitespace.
+import torch
docs/hel-892/animate-mask-reference/gguf__ops.py:4: trailing whitespace.
+import logging
docs/hel-892/animate-mask-reference/gguf__ops.py:5: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:6: trailing whitespace.
+import comfy.ops
docs/hel-892/animate-mask-reference/gguf__ops.py:7: trailing whitespace.
+import comfy.lora
docs/hel-892/animate-mask-reference/gguf__ops.py:8: trailing whitespace.
+import comfy.model_management
docs/hel-892/animate-mask-reference/gguf__ops.py:9: trailing whitespace.
+from .dequant import dequantize_tensor, is_quantized
docs/hel-892/animate-mask-reference/gguf__ops.py:10: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:11: trailing whitespace.
+def chained_hasattr(obj, chained_attr):
docs/hel-892/animate-mask-reference/gguf__ops.py:12: trailing whitespace.
+ probe = obj
docs/hel-892/animate-mask-reference/gguf__ops.py:13: trailing whitespace.
+ for attr in chained_attr.split('.'):
docs/hel-892/animate-mask-reference/gguf__ops.py:14: trailing whitespace.
+ if hasattr(probe, attr):
docs/hel-892/animate-mask-reference/gguf__ops.py:15: trailing whitespace.
+ probe = getattr(probe, attr)
docs/hel-892/animate-mask-reference/gguf__ops.py:16: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__ops.py:17: trailing whitespace.
+ return False
docs/hel-892/animate-mask-reference/gguf__ops.py:18: trailing whitespace.
+ return True
docs/hel-892/animate-mask-reference/gguf__ops.py:19: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:20: trailing whitespace.
+# A bakcward and forward compatible way to get `torch.compiler.disable`.
docs/hel-892/animate-mask-reference/gguf__ops.py:21: trailing whitespace.
+def get_torch_compiler_disable_decorator():
docs/hel-892/animate-mask-reference/gguf__ops.py:22: trailing whitespace.
+ def dummy_decorator(*args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:23: trailing whitespace.
+ def noop(x):
docs/hel-892/animate-mask-reference/gguf__ops.py:24: trailing whitespace.
+ return x
docs/hel-892/animate-mask-reference/gguf__ops.py:25: trailing whitespace.
+ return noop
docs/hel-892/animate-mask-reference/gguf__ops.py:26: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:27: trailing whitespace.
+ from packaging import version
docs/hel-892/animate-mask-reference/gguf__ops.py:28: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:29: trailing whitespace.
+ if not chained_hasattr(torch, "compiler.disable"):
docs/hel-892/animate-mask-reference/gguf__ops.py:30: trailing whitespace.
+ logging.info("ComfyUI-GGUF: Torch too old for torch.compile - bypassing")
docs/hel-892/animate-mask-reference/gguf__ops.py:31: trailing whitespace.
+ return dummy_decorator # torch too old
docs/hel-892/animate-mask-reference/gguf__ops.py:32: trailing whitespace.
+ elif version.parse(torch.__version__) >= version.parse("2.8"):
docs/hel-892/animate-mask-reference/gguf__ops.py:33: trailing whitespace.
+ logging.info("ComfyUI-GGUF: Allowing full torch compile")
docs/hel-892/animate-mask-reference/gguf__ops.py:34: trailing whitespace.
+ return dummy_decorator # torch compile works
docs/hel-892/animate-mask-reference/gguf__ops.py:35: trailing whitespace.
+ if chained_hasattr(torch, "_dynamo.config.nontraceable_tensor_subclasses"):
docs/hel-892/animate-mask-reference/gguf__ops.py:36: trailing whitespace.
+ logging.info("ComfyUI-GGUF: Allowing full torch compile (nightly)")
docs/hel-892/animate-mask-reference/gguf__ops.py:37: trailing whitespace.
+ return dummy_decorator # torch compile works, nightly before 2.8 release
docs/hel-892/animate-mask-reference/gguf__ops.py:38: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__ops.py:39: trailing whitespace.
+ logging.info("ComfyUI-GGUF: Partial torch compile only, consider updating pytorch")
docs/hel-892/animate-mask-reference/gguf__ops.py:40: trailing whitespace.
+ return torch.compiler.disable
docs/hel-892/animate-mask-reference/gguf__ops.py:41: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:42: trailing whitespace.
+torch_compiler_disable = get_torch_compiler_disable_decorator()
docs/hel-892/animate-mask-reference/gguf__ops.py:43: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:44: trailing whitespace.
+class GGMLTensor(torch.Tensor):
docs/hel-892/animate-mask-reference/gguf__ops.py:45: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__ops.py:46: trailing whitespace.
+ Main tensor-like class for storing quantized weights
docs/hel-892/animate-mask-reference/gguf__ops.py:47: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__ops.py:48: trailing whitespace.
+ def __init__(self, *args, tensor_type, tensor_shape, patches=[], **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:49: trailing whitespace.
+ super().__init__()
docs/hel-892/animate-mask-reference/gguf__ops.py:50: trailing whitespace.
+ self.tensor_type = tensor_type
docs/hel-892/animate-mask-reference/gguf__ops.py:51: trailing whitespace.
+ self.tensor_shape = tensor_shape
docs/hel-892/animate-mask-reference/gguf__ops.py:52: trailing whitespace.
+ self.patches = patches
docs/hel-892/animate-mask-reference/gguf__ops.py:53: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:54: trailing whitespace.
+ def __new__(cls, *args, tensor_type, tensor_shape, patches=[], **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:55: trailing whitespace.
+ return super().__new__(cls, *args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:56: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:57: trailing whitespace.
+ def to(self, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:58: trailing whitespace.
+ new = super().to(*args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:59: trailing whitespace.
+ new.tensor_type = getattr(self, "tensor_type", None)
docs/hel-892/animate-mask-reference/gguf__ops.py:60: trailing whitespace.
+ new.tensor_shape = getattr(self, "tensor_shape", new.data.shape)
docs/hel-892/animate-mask-reference/gguf__ops.py:61: trailing whitespace.
+ new.patches = getattr(self, "patches", []).copy()
docs/hel-892/animate-mask-reference/gguf__ops.py:62: trailing whitespace.
+ return new
docs/hel-892/animate-mask-reference/gguf__ops.py:63: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:64: trailing whitespace.
+ def clone(self, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:65: trailing whitespace.
+ return self
docs/hel-892/animate-mask-reference/gguf__ops.py:66: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:67: trailing whitespace.
+ def detach(self, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:68: trailing whitespace.
+ return self
docs/hel-892/animate-mask-reference/gguf__ops.py:69: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:70: trailing whitespace.
+ def copy_(self, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:71: trailing whitespace.
+ # fixes .weight.copy_ in comfy/clip_model/CLIPTextModel
docs/hel-892/animate-mask-reference/gguf__ops.py:72: trailing whitespace.
+ try:
docs/hel-892/animate-mask-reference/gguf__ops.py:73: trailing whitespace.
+ return super().copy_(*args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:74: trailing whitespace.
+ except Exception as e:
docs/hel-892/animate-mask-reference/gguf__ops.py:75: trailing whitespace.
+ logging.warning(f"ignoring 'copy_' on tensor: {e}")
docs/hel-892/animate-mask-reference/gguf__ops.py:76: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:77: trailing whitespace.
+ def new_empty(self, size, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:78: trailing whitespace.
+ # Intel Arc fix, ref#50
docs/hel-892/animate-mask-reference/gguf__ops.py:79: trailing whitespace.
+ new_tensor = super().new_empty(size, *args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:80: trailing whitespace.
+ return GGMLTensor(
docs/hel-892/animate-mask-reference/gguf__ops.py:81: trailing whitespace.
+ new_tensor,
docs/hel-892/animate-mask-reference/gguf__ops.py:82: trailing whitespace.
+ tensor_type = getattr(self, "tensor_type", None),
docs/hel-892/animate-mask-reference/gguf__ops.py:83: trailing whitespace.
+ tensor_shape = size,
docs/hel-892/animate-mask-reference/gguf__ops.py:84: trailing whitespace.
+ patches = getattr(self, "patches", []).copy()
docs/hel-892/animate-mask-reference/gguf__ops.py:85: trailing whitespace.
+ )
docs/hel-892/animate-mask-reference/gguf__ops.py:86: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:87: trailing whitespace.
+ @property
docs/hel-892/animate-mask-reference/gguf__ops.py:88: trailing whitespace.
+ def shape(self):
docs/hel-892/animate-mask-reference/gguf__ops.py:89: trailing whitespace.
+ if not hasattr(self, "tensor_shape"):
docs/hel-892/animate-mask-reference/gguf__ops.py:90: trailing whitespace.
+ self.tensor_shape = self.size()
docs/hel-892/animate-mask-reference/gguf__ops.py:91: trailing whitespace.
+ return self.tensor_shape
docs/hel-892/animate-mask-reference/gguf__ops.py:92: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:93: trailing whitespace.
+class GGMLLayer(torch.nn.Module):
docs/hel-892/animate-mask-reference/gguf__ops.py:94: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__ops.py:95: trailing whitespace.
+ This (should) be responsible for de-quantizing on the fly
docs/hel-892/animate-mask-reference/gguf__ops.py:96: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__ops.py:97: trailing whitespace.
+ comfy_cast_weights = True
docs/hel-892/animate-mask-reference/gguf__ops.py:98: trailing whitespace.
+ dequant_dtype = None
docs/hel-892/animate-mask-reference/gguf__ops.py:99: trailing whitespace.
+ patch_dtype = None
docs/hel-892/animate-mask-reference/gguf__ops.py:100: trailing whitespace.
+ largest_layer = False
docs/hel-892/animate-mask-reference/gguf__ops.py:101: trailing whitespace.
+ torch_compatible_tensor_types = {None, gguf.GGMLQuantizationType.F32, gguf.GGMLQuantizationType.F16}
docs/hel-892/animate-mask-reference/gguf__ops.py:102: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:103: trailing whitespace.
+ def is_ggml_quantized(self, *, weight=None, bias=None):
docs/hel-892/animate-mask-reference/gguf__ops.py:104: trailing whitespace.
+ if weight is None:
docs/hel-892/animate-mask-reference/gguf__ops.py:105: trailing whitespace.
+ weight = self.weight
docs/hel-892/animate-mask-reference/gguf__ops.py:106: trailing whitespace.
+ if bias is None:
docs/hel-892/animate-mask-reference/gguf__ops.py:107: trailing whitespace.
+ bias = self.bias
docs/hel-892/animate-mask-reference/gguf__ops.py:108: trailing whitespace.
+ return is_quantized(weight) or is_quantized(bias)
docs/hel-892/animate-mask-reference/gguf__ops.py:109: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:110: trailing whitespace.
+ def _load_from_state_dict(self, state_dict, prefix, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:111: trailing whitespace.
+ weight, bias = state_dict.get(f"{prefix}weight"), state_dict.get(f"{prefix}bias")
docs/hel-892/animate-mask-reference/gguf__ops.py:112: trailing whitespace.
+ # NOTE: using modified load for linear due to not initializing on creation, see GGMLOps todo
docs/hel-892/animate-mask-reference/gguf__ops.py:113: trailing whitespace.
+ if self.is_ggml_quantized(weight=weight, bias=bias) or isinstance(self, torch.nn.Linear):
docs/hel-892/animate-mask-reference/gguf__ops.py:114: trailing whitespace.
+ return self.ggml_load_from_state_dict(state_dict, prefix, *args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:115: trailing whitespace.
+ # Not strictly required, but fixes embedding shape mismatch. Threshold set in loader.py
docs/hel-892/animate-mask-reference/gguf__ops.py:116: trailing whitespace.
+ if isinstance(self, torch.nn.Embedding) and self.weight.shape[0] >= (64 * 1024):
docs/hel-892/animate-mask-reference/gguf__ops.py:117: trailing whitespace.
+ return self.ggml_load_from_state_dict(state_dict, prefix, *args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:118: trailing whitespace.
+ return super()._load_from_state_dict(state_dict, prefix, *args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:119: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:120: trailing whitespace.
+ def ggml_load_from_state_dict(self, state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs):
docs/hel-892/animate-mask-reference/gguf__ops.py:121: trailing whitespace.
+ prefix_len = len(prefix)
docs/hel-892/animate-mask-reference/gguf__ops.py:122: trailing whitespace.
+ for k,v in state_dict.items():
docs/hel-892/animate-mask-reference/gguf__ops.py:123: trailing whitespace.
+ if k[prefix_len:] == "weight":
docs/hel-892/animate-mask-reference/gguf__ops.py:124: trailing whitespace.
+ self.weight = torch.nn.Parameter(v, requires_grad=False)
docs/hel-892/animate-mask-reference/gguf__ops.py:125: trailing whitespace.
+ elif k[prefix_len:] == "bias" and v is not None:
docs/hel-892/animate-mask-reference/gguf__ops.py:126: trailing whitespace.
+ self.bias = torch.nn.Parameter(v, requires_grad=False)
docs/hel-892/animate-mask-reference/gguf__ops.py:127: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__ops.py:128: trailing whitespace.
+ unexpected_keys.append(k)
docs/hel-892/animate-mask-reference/gguf__ops.py:129: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:130: trailing whitespace.
+ # For Linear layer with missing weight
docs/hel-892/animate-mask-reference/gguf__ops.py:131: trailing whitespace.
+ if self.weight is None and isinstance(self, torch.nn.Linear):
docs/hel-892/animate-mask-reference/gguf__ops.py:132: trailing whitespace.
+ v = torch.zeros(self.in_features, self.out_features)
docs/hel-892/animate-mask-reference/gguf__ops.py:133: trailing whitespace.
+ self.weight = torch.nn.Parameter(v, requires_grad=False)
docs/hel-892/animate-mask-reference/gguf__ops.py:134: trailing whitespace.
+ missing_keys.append(prefix+"weight")
docs/hel-892/animate-mask-reference/gguf__ops.py:135: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:136: trailing whitespace.
+ # for vram estimation (TODO: less fragile logic?)
docs/hel-892/animate-mask-reference/gguf__ops.py:137: trailing whitespace.
+ if getattr(self.weight, "is_largest_weight", False):
docs/hel-892/animate-mask-reference/gguf__ops.py:138: trailing whitespace.
+ self.largest_layer = True
docs/hel-892/animate-mask-reference/gguf__ops.py:139: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:140: trailing whitespace.
+ def _save_to_state_dict(self, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:141: trailing whitespace.
+ if self.is_ggml_quantized():
docs/hel-892/animate-mask-reference/gguf__ops.py:142: trailing whitespace.
+ return self.ggml_save_to_state_dict(*args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:143: trailing whitespace.
+ return super()._save_to_state_dict(*args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:144: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:145: trailing whitespace.
+ def ggml_save_to_state_dict(self, destination, prefix, keep_vars):
docs/hel-892/animate-mask-reference/gguf__ops.py:146: trailing whitespace.
+ # This is a fake state dict for vram estimation
docs/hel-892/animate-mask-reference/gguf__ops.py:147: trailing whitespace.
+ weight = torch.zeros_like(self.weight, device=torch.device("meta"))
docs/hel-892/animate-mask-reference/gguf__ops.py:148: trailing whitespace.
+ destination[prefix + "weight"] = weight
docs/hel-892/animate-mask-reference/gguf__ops.py:149: trailing whitespace.
+ if self.bias is not None:
docs/hel-892/animate-mask-reference/gguf__ops.py:150: trailing whitespace.
+ bias = torch.zeros_like(self.bias, device=torch.device("meta"))
docs/hel-892/animate-mask-reference/gguf__ops.py:151: trailing whitespace.
+ destination[prefix + "bias"] = bias
docs/hel-892/animate-mask-reference/gguf__ops.py:152: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:153: trailing whitespace.
+ # Take into account space required for dequantizing the largest tensor
docs/hel-892/animate-mask-reference/gguf__ops.py:154: trailing whitespace.
+ if self.largest_layer:
docs/hel-892/animate-mask-reference/gguf__ops.py:155: trailing whitespace.
+ shape = getattr(self.weight, "tensor_shape", self.weight.shape)
docs/hel-892/animate-mask-reference/gguf__ops.py:156: trailing whitespace.
+ dtype = self.dequant_dtype if self.dequant_dtype and self.dequant_dtype != "target" else torch.float16
docs/hel-892/animate-mask-reference/gguf__ops.py:157: trailing whitespace.
+ temp = torch.empty(*shape, device=torch.device("meta"), dtype=dtype)
docs/hel-892/animate-mask-reference/gguf__ops.py:158: trailing whitespace.
+ destination[prefix + "temp.weight"] = temp
docs/hel-892/animate-mask-reference/gguf__ops.py:159: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:160: trailing whitespace.
+ return
docs/hel-892/animate-mask-reference/gguf__ops.py:161: trailing whitespace.
+ # This would return the dequantized state dict
docs/hel-892/animate-mask-reference/gguf__ops.py:162: trailing whitespace.
+ destination[prefix + "weight"] = self.get_weight(self.weight)
docs/hel-892/animate-mask-reference/gguf__ops.py:163: trailing whitespace.
+ if bias is not None:
docs/hel-892/animate-mask-reference/gguf__ops.py:164: trailing whitespace.
+ destination[prefix + "bias"] = self.get_weight(self.bias)
docs/hel-892/animate-mask-reference/gguf__ops.py:165: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:166: trailing whitespace.
+ def get_weight(self, tensor, dtype):
docs/hel-892/animate-mask-reference/gguf__ops.py:167: trailing whitespace.
+ if tensor is None:
docs/hel-892/animate-mask-reference/gguf__ops.py:168: trailing whitespace.
+ return
docs/hel-892/animate-mask-reference/gguf__ops.py:169: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:170: trailing whitespace.
+ # consolidate and load patches to GPU in async
docs/hel-892/animate-mask-reference/gguf__ops.py:171: trailing whitespace.
+ patch_list = []
docs/hel-892/animate-mask-reference/gguf__ops.py:172: trailing whitespace.
+ device = tensor.device
docs/hel-892/animate-mask-reference/gguf__ops.py:173: trailing whitespace.
+ for patches, key in getattr(tensor, "patches", []):
docs/hel-892/animate-mask-reference/gguf__ops.py:174: trailing whitespace.
+ patch_list += move_patch_to_device(patches, device)
docs/hel-892/animate-mask-reference/gguf__ops.py:175: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:176: trailing whitespace.
+ # dequantize tensor while patches load
docs/hel-892/animate-mask-reference/gguf__ops.py:177: trailing whitespace.
+ weight = dequantize_tensor(tensor, dtype, self.dequant_dtype)
docs/hel-892/animate-mask-reference/gguf__ops.py:178: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:179: trailing whitespace.
+ # prevent propagating custom tensor class
docs/hel-892/animate-mask-reference/gguf__ops.py:180: trailing whitespace.
+ if isinstance(weight, GGMLTensor):
docs/hel-892/animate-mask-reference/gguf__ops.py:181: trailing whitespace.
+ weight = torch.Tensor(weight)
docs/hel-892/animate-mask-reference/gguf__ops.py:182: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:183: trailing whitespace.
+ # apply patches
docs/hel-892/animate-mask-reference/gguf__ops.py:184: trailing whitespace.
+ if len(patch_list) > 0:
docs/hel-892/animate-mask-reference/gguf__ops.py:185: trailing whitespace.
+ if self.patch_dtype is None:
docs/hel-892/animate-mask-reference/gguf__ops.py:186: trailing whitespace.
+ weight = comfy.lora.calculate_weight(patch_list, weight, key)
docs/hel-892/animate-mask-reference/gguf__ops.py:187: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__ops.py:188: trailing whitespace.
+ # for testing, may degrade image quality
docs/hel-892/animate-mask-reference/gguf__ops.py:189: trailing whitespace.
+ patch_dtype = dtype if self.patch_dtype == "target" else self.patch_dtype
docs/hel-892/animate-mask-reference/gguf__ops.py:190: trailing whitespace.
+ weight = comfy.lora.calculate_weight(patch_list, weight, key, patch_dtype)
docs/hel-892/animate-mask-reference/gguf__ops.py:191: trailing whitespace.
+ return weight
docs/hel-892/animate-mask-reference/gguf__ops.py:192: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:193: trailing whitespace.
+ @torch_compiler_disable()
docs/hel-892/animate-mask-reference/gguf__ops.py:194: trailing whitespace.
+ def cast_bias_weight(s, input=None, dtype=None, device=None, bias_dtype=None):
docs/hel-892/animate-mask-reference/gguf__ops.py:195: trailing whitespace.
+ if input is not None:
docs/hel-892/animate-mask-reference/gguf__ops.py:196: trailing whitespace.
+ if dtype is None:
docs/hel-892/animate-mask-reference/gguf__ops.py:197: trailing whitespace.
+ dtype = getattr(input, "dtype", torch.float32)
docs/hel-892/animate-mask-reference/gguf__ops.py:198: trailing whitespace.
+ if bias_dtype is None:
docs/hel-892/animate-mask-reference/gguf__ops.py:199: trailing whitespace.
+ bias_dtype = dtype
docs/hel-892/animate-mask-reference/gguf__ops.py:200: trailing whitespace.
+ if device is None:
docs/hel-892/animate-mask-reference/gguf__ops.py:201: trailing whitespace.
+ device = input.device
docs/hel-892/animate-mask-reference/gguf__ops.py:202: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:203: trailing whitespace.
+ bias = None
docs/hel-892/animate-mask-reference/gguf__ops.py:204: trailing whitespace.
+ non_blocking = comfy.model_management.device_supports_non_blocking(device)
docs/hel-892/animate-mask-reference/gguf__ops.py:205: trailing whitespace.
+ if s.bias is not None:
docs/hel-892/animate-mask-reference/gguf__ops.py:206: trailing whitespace.
+ bias = s.get_weight(s.bias.to(device), dtype)
docs/hel-892/animate-mask-reference/gguf__ops.py:207: trailing whitespace.
+ bias = comfy.ops.cast_to(bias, bias_dtype, device, non_blocking=non_blocking, copy=False)
docs/hel-892/animate-mask-reference/gguf__ops.py:208: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:209: trailing whitespace.
+ weight = s.get_weight(s.weight.to(device), dtype)
docs/hel-892/animate-mask-reference/gguf__ops.py:210: trailing whitespace.
+ weight = comfy.ops.cast_to(weight, dtype, device, non_blocking=non_blocking, copy=False)
docs/hel-892/animate-mask-reference/gguf__ops.py:211: trailing whitespace.
+ return weight, bias
docs/hel-892/animate-mask-reference/gguf__ops.py:212: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:213: trailing whitespace.
+ def forward_comfy_cast_weights(self, input, *args, **kwargs):
docs/hel-892/animate-mask-reference/gguf__ops.py:214: trailing whitespace.
+ if self.is_ggml_quantized():
docs/hel-892/animate-mask-reference/gguf__ops.py:215: trailing whitespace.
+ out = self.forward_ggml_cast_weights(input, *args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:216: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__ops.py:217: trailing whitespace.
+ out = super().forward_comfy_cast_weights(input, *args, **kwargs)
docs/hel-892/animate-mask-reference/gguf__ops.py:218: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:219: trailing whitespace.
+ # non-ggml forward might still propagate custom tensor class
docs/hel-892/animate-mask-reference/gguf__ops.py:220: trailing whitespace.
+ if isinstance(out, GGMLTensor):
docs/hel-892/animate-mask-reference/gguf__ops.py:221: trailing whitespace.
+ out = torch.Tensor(out)
docs/hel-892/animate-mask-reference/gguf__ops.py:222: trailing whitespace.
+ return out
docs/hel-892/animate-mask-reference/gguf__ops.py:223: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:224: trailing whitespace.
+ def forward_ggml_cast_weights(self, input):
docs/hel-892/animate-mask-reference/gguf__ops.py:225: trailing whitespace.
+ raise NotImplementedError
docs/hel-892/animate-mask-reference/gguf__ops.py:226: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:227: trailing whitespace.
+class GGMLOps(comfy.ops.manual_cast):
docs/hel-892/animate-mask-reference/gguf__ops.py:228: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__ops.py:229: trailing whitespace.
+ Dequantize weights on the fly before doing the compute
docs/hel-892/animate-mask-reference/gguf__ops.py:230: trailing whitespace.
+ """
docs/hel-892/animate-mask-reference/gguf__ops.py:231: trailing whitespace.
+ class Linear(GGMLLayer, comfy.ops.manual_cast.Linear):
docs/hel-892/animate-mask-reference/gguf__ops.py:232: trailing whitespace.
+ def __init__(self, in_features, out_features, bias=True, device=None, dtype=None):
docs/hel-892/animate-mask-reference/gguf__ops.py:233: trailing whitespace.
+ torch.nn.Module.__init__(self)
docs/hel-892/animate-mask-reference/gguf__ops.py:234: trailing whitespace.
+ # TODO: better workaround for reserved memory spike on windows
docs/hel-892/animate-mask-reference/gguf__ops.py:235: trailing whitespace.
+ # Issue is with `torch.empty` still reserving the full memory for the layer
docs/hel-892/animate-mask-reference/gguf__ops.py:236: trailing whitespace.
+ # Windows doesn't over-commit memory so without this 24GB+ of pagefile is used
docs/hel-892/animate-mask-reference/gguf__ops.py:237: trailing whitespace.
+ self.in_features = in_features
docs/hel-892/animate-mask-reference/gguf__ops.py:238: trailing whitespace.
+ self.out_features = out_features
docs/hel-892/animate-mask-reference/gguf__ops.py:239: trailing whitespace.
+ self.weight = None
docs/hel-892/animate-mask-reference/gguf__ops.py:240: trailing whitespace.
+ self.bias = None
docs/hel-892/animate-mask-reference/gguf__ops.py:241: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:242: trailing whitespace.
+ def forward_ggml_cast_weights(self, input):
docs/hel-892/animate-mask-reference/gguf__ops.py:243: trailing whitespace.
+ weight, bias = self.cast_bias_weight(input)
docs/hel-892/animate-mask-reference/gguf__ops.py:244: trailing whitespace.
+ return torch.nn.functional.linear(input, weight, bias)
docs/hel-892/animate-mask-reference/gguf__ops.py:245: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:246: trailing whitespace.
+ class Conv2d(GGMLLayer, comfy.ops.manual_cast.Conv2d):
docs/hel-892/animate-mask-reference/gguf__ops.py:247: trailing whitespace.
+ def forward_ggml_cast_weights(self, input):
docs/hel-892/animate-mask-reference/gguf__ops.py:248: trailing whitespace.
+ weight, bias = self.cast_bias_weight(input)
docs/hel-892/animate-mask-reference/gguf__ops.py:249: trailing whitespace.
+ return self._conv_forward(input, weight, bias)
docs/hel-892/animate-mask-reference/gguf__ops.py:250: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:251: trailing whitespace.
+ class Embedding(GGMLLayer, comfy.ops.manual_cast.Embedding):
docs/hel-892/animate-mask-reference/gguf__ops.py:252: trailing whitespace.
+ def forward_ggml_cast_weights(self, input, out_dtype=None):
docs/hel-892/animate-mask-reference/gguf__ops.py:253: trailing whitespace.
+ output_dtype = out_dtype
docs/hel-892/animate-mask-reference/gguf__ops.py:254: trailing whitespace.
+ if self.weight.dtype == torch.float16 or self.weight.dtype == torch.bfloat16:
docs/hel-892/animate-mask-reference/gguf__ops.py:255: trailing whitespace.
+ out_dtype = None
docs/hel-892/animate-mask-reference/gguf__ops.py:256: trailing whitespace.
+ weight, _bias = self.cast_bias_weight(self, device=input.device, dtype=out_dtype)
docs/hel-892/animate-mask-reference/gguf__ops.py:257: trailing whitespace.
+ return torch.nn.functional.embedding(
docs/hel-892/animate-mask-reference/gguf__ops.py:258: trailing whitespace.
+ input, weight, self.padding_idx, self.max_norm, self.norm_type, self.scale_grad_by_freq, self.sparse
docs/hel-892/animate-mask-reference/gguf__ops.py:259: trailing whitespace.
+ ).to(dtype=output_dtype)
docs/hel-892/animate-mask-reference/gguf__ops.py:260: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:261: trailing whitespace.
+ class LayerNorm(GGMLLayer, comfy.ops.manual_cast.LayerNorm):
docs/hel-892/animate-mask-reference/gguf__ops.py:262: trailing whitespace.
+ def forward_ggml_cast_weights(self, input):
docs/hel-892/animate-mask-reference/gguf__ops.py:263: trailing whitespace.
+ if self.weight is None:
docs/hel-892/animate-mask-reference/gguf__ops.py:264: trailing whitespace.
+ return super().forward_comfy_cast_weights(input)
docs/hel-892/animate-mask-reference/gguf__ops.py:265: trailing whitespace.
+ weight, bias = self.cast_bias_weight(input)
docs/hel-892/animate-mask-reference/gguf__ops.py:266: trailing whitespace.
+ return torch.nn.functional.layer_norm(input, self.normalized_shape, weight, bias, self.eps)
docs/hel-892/animate-mask-reference/gguf__ops.py:267: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:268: trailing whitespace.
+ class GroupNorm(GGMLLayer, comfy.ops.manual_cast.GroupNorm):
docs/hel-892/animate-mask-reference/gguf__ops.py:269: trailing whitespace.
+ def forward_ggml_cast_weights(self, input):
docs/hel-892/animate-mask-reference/gguf__ops.py:270: trailing whitespace.
+ weight, bias = self.cast_bias_weight(input)
docs/hel-892/animate-mask-reference/gguf__ops.py:271: trailing whitespace.
+ return torch.nn.functional.group_norm(input, self.num_groups, weight, bias, self.eps)
docs/hel-892/animate-mask-reference/gguf__ops.py:272: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__ops.py:273: trailing whitespace.
+def move_patch_to_device(item, device):
docs/hel-892/animate-mask-reference/gguf__ops.py:274: trailing whitespace.
+ if isinstance(item, torch.Tensor):
docs/hel-892/animate-mask-reference/gguf__ops.py:275: trailing whitespace.
+ return item.to(device, non_blocking=True)
docs/hel-892/animate-mask-reference/gguf__ops.py:276: trailing whitespace.
+ elif isinstance(item, tuple):
docs/hel-892/animate-mask-reference/gguf__ops.py:277: trailing whitespace.
+ return tuple(move_patch_to_device(x, device) for x in item)
docs/hel-892/animate-mask-reference/gguf__ops.py:278: trailing whitespace.
+ elif isinstance(item, list):
docs/hel-892/animate-mask-reference/gguf__ops.py:279: trailing whitespace.
+ return [move_patch_to_device(x, device) for x in item]
docs/hel-892/animate-mask-reference/gguf__ops.py:280: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/gguf__ops.py:281: trailing whitespace.
+ return item
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:1: trailing whitespace.
+[project]
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:2: trailing whitespace.
+name = "comfyui-gguf"
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:3: trailing whitespace.
+description = "GGUF Quantization support for native ComfyUI models."
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:4: trailing whitespace.
+version = "2.0.0" # 2.0.0 = GitHub main, 1.X.X = ComfyUI Registry
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:5: trailing whitespace.
+license = { file = "LICENSE" }
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:6: trailing whitespace.
+dependencies = ["gguf>=0.13.0", "sentencepiece", "protobuf"]
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:7: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:8: trailing whitespace.
+[project.urls]
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:9: trailing whitespace.
+Repository = "https://github.com/city96/ComfyUI-GGUF"
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:10: trailing whitespace.
+
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:11: trailing whitespace.
+[tool.comfy]
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:12: trailing whitespace.
+PublisherId = "city96"
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:13: trailing whitespace.
+DisplayName = "ComfyUI-GGUF"
docs/hel-892/animate-mask-reference/gguf__pyproject.toml:14: trailing whitespace.
+Icon = ""
docs/hel-892/animate-mask-reference/gguf__requirements.txt:1: trailing whitespace.
+# main
docs/hel-892/animate-mask-reference/gguf__requirements.txt:2: trailing whitespace.
+gguf>=0.13.0
docs/hel-892/animate-mask-reference/gguf__requirements.txt:3: trailing whitespace.
+# optional - tokenizer
docs/hel-892/animate-mask-reference/gguf__requirements.txt:4: trailing whitespace.
+sentencepiece
docs/hel-892/animate-mask-reference/gguf__requirements.txt:5: trailing whitespace.
+protobuf
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:32: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:99: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:101: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:117: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:119: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:120: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:124: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:127: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:130: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:135: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:138: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:145: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:161: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:162: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:164: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:166: trailing whitespace.
+ latent_samples = samples["samples"]
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:170: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:173: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:184: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:238: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:241: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:261: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:282: trailing whitespace.
+Creates single string, or a list of strings, from
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:283: trailing whitespace.
+multiple input strings.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:284: trailing whitespace.
+You can set how many inputs the node has,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:314: trailing whitespace.
+ },
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:333: trailing whitespace.
+ "required": {
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:337: trailing whitespace.
+ },
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:358: trailing whitespace.
+ c.append(n)
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:599: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:601: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:603: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:607: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:618: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:624: trailing whitespace.
+Returns the inputs unchanged, they are only used as triggers,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:625: trailing whitespace.
+and performs comfy model management functions and garbage collection,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:643: trailing whitespace.
+ "text": [f"{freemem_before:,.0f}x{freemem_after:,.0f}"]},
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:644: trailing whitespace.
+ "result": (any_input, image_pass, model_pass, freemem_before, freemem_after)
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:649: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:702: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:705: trailing whitespace.
+ def INPUT_TYPES(cls):
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:724: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:746: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:770: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:785: trailing whitespace.
+Generates an empty latent image with the specified dimensions.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:795: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:798: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:800: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:821: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:832: trailing whitespace.
+Selects a node and it's specified widget and outputs the value as a string.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:833: trailing whitespace.
+If no node id or title is provided it will use the 'any_input' link and use that node.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:834: trailing whitespace.
+To see node id's, enable node id display from Manager badge menu.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:835: trailing whitespace.
+Alternatively you can search with the node title. Node titles ONLY exist if they
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:836: trailing whitespace.
+are manually edited!
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:865: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:878: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:923: trailing whitespace.
+Does nothing, used to trigger generic workflow output.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:929: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:946: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:957: trailing whitespace.
+ adjusted_sigmas[i] = 0.0001
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:959: trailing whitespace.
+ adjusted_sigmas[0] = 0.0001
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:967: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:982: trailing whitespace.
+Creates a sigmas tensor from a string of comma separated values.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:983: trailing whitespace.
+Examples:
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:984: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:985: trailing whitespace.
+Nvidia's optimized AYS 10 step schedule for SD 1.5:
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:986: trailing whitespace.
+14.615, 6.475, 3.861, 2.697, 1.886, 1.396, 0.963, 0.652, 0.399, 0.152, 0.029
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:987: trailing whitespace.
+SDXL:
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:988: trailing whitespace.
+14.615, 6.315, 3.771, 2.181, 1.342, 0.862, 0.555, 0.380, 0.234, 0.113, 0.029
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:989: trailing whitespace.
+SVD:
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:990: trailing whitespace.
+700.00, 54.5, 15.886, 7.977, 4.248, 1.789, 0.981, 0.403, 0.173, 0.034, 0.002
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1000: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1009: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1012: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1016: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1034: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1039: trailing whitespace.
+ "latents":("LATENT",),
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1051: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1055: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1078: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1080: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1084: trailing whitespace.
+ return {"required": {
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1093: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1099: trailing whitespace.
+Reacts to the sound level of the input.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1100: trailing whitespace.
+Uses your browsers sound input options and requires.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1103: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1112: trailing whitespace.
+ return (sound_level, sound_level_int, )
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1113: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1117: trailing whitespace.
+ return {"required": {
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1133: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1140: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1162: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1204: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1223: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1230: trailing whitespace.
+ azimuth = float(azimuth_str.strip()[1:-1])
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1241: trailing whitespace.
+ elevation_val = float(elevation_str.strip()[1:-1])
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1254: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1274: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1295: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1337: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1343: trailing whitespace.
+Allow scheduling of the azimuth and elevation conditions for SV3D.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1344: trailing whitespace.
+Note that SV3D is still a video model and the schedule needs to always go forward
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1361: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1368: trailing whitespace.
+ azimuth = float(azimuth_str.strip()[1:-1])
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1379: trailing whitespace.
+ elevation_val = float(elevation_str.strip()[1:-1])
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1407: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1429: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1454: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1487: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1496: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1504: trailing whitespace.
+A T5 model fine-tuned on the SuperPrompt dataset for
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1505: trailing whitespace.
+upsampling text prompts to more detailed descriptions.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1506: trailing whitespace.
+Meant to be used as a pre-generation step for text-to-image
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1507: trailing whitespace.
+models that benefit from more detailed prompts.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1519: trailing whitespace.
+ snapshot_download(repo_id="roborovski/superprompt-v1",
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1520: trailing whitespace.
+ local_dir=checkpoint_path,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1527: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1533: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1538: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1554: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1559: trailing whitespace.
+Visualizes the camera poses, from Animatediff-Evolved CameraCtrl Pose
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1560: trailing whitespace.
+or a .txt file with RealEstate camera intrinsics and coordinates, in a 3D plot.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1562: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1632: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1691: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1692: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1693: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1728: trailing whitespace.
+ print(f'{k}: {v.std()}')
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1739: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1777: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1794: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1805: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1819: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1841: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1852: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1862: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1870: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1878: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1885: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1892: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1956: trailing whitespace.
+ k = new_modelpatcher.add_patches(loaded, strength_model)
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1957: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1964: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1978: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1988: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:1997: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2050: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2076: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2126: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2182: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2204: trailing whitespace.
+ Add noise to an image.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2294: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2352: trailing whitespace.
+ return sampling_function(self.inner_model, x, timestep, uncond, self.conds.get("positive", None), cfg, model_options=model_options, seed=seed)
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2353: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2357: trailing whitespace.
+ return {"required": {
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2370: trailing whitespace.
+CFG Guider that allows for scheduled CFG changes over steps, the steps outside the range will use CFG 1.0 thus being processed faster.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2371: trailing whitespace.
+cfg input can be a list of floats matching step count, or a single float for all steps.
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2375: trailing whitespace.
+ guider = Guider_ScheduledCFG(model)
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2379: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2389: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2400: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2406: trailing whitespace.
+ d,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2407: trailing whitespace.
+ 10000.0,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2412: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2414: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2416: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2425: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2436: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2441: trailing whitespace.
+ model_class.params.hidden_size // model_class.params.num_heads,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2442: trailing whitespace.
+ model_class.params.theta,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2443: trailing whitespace.
+ model_class.params.axes_dim,
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2447: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2449: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2498: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2519: trailing whitespace.
+ timer = Timer(name=name)
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2522: trailing whitespace.
+ "text": [f"{timer.start_time}"]},
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2523: trailing whitespace.
+ "result": (any_input, timer, 0)
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2563: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjconstant__nodes__nodes.py:2596: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:10: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:30: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:41: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:101: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:125: trailing whitespace.
+Plots coordinates to sequence of images using Matplotlib.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:139: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:141: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:154: trailing whitespace.
+ [
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:164: trailing whitespace.
+ [
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:180: trailing whitespace.
+ [
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:201: trailing whitespace.
+# WORK IN PROGRESS
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:202: trailing whitespace.
+Do not count on this as part of your workflow yet,
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:203: trailing whitespace.
+probably contains lots of bugs and stability is not
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:204: trailing whitespace.
+guaranteed!!
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:205: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:206: trailing whitespace.
+## Graphical editor to create values for various
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:207: trailing whitespace.
+## schedules and/or mask batches.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:210: trailing whitespace.
+**Ctrl + click** to add control point (subdivide) between two points.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:211: trailing whitespace.
+**Right click on a point** to delete it.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:212: trailing whitespace.
+Note that you can't delete from start/end.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:213: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:214: trailing whitespace.
+Right click on canvas for context menu:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:217: trailing whitespace.
+ - Creates a new spline on same canvas, currently these paths are only outputed
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:220: trailing whitespace.
+ - Creates a single point that only returns it's current position coords
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:222: trailing whitespace.
+ - Deletes the currently selected spline, you can select a spline by clicking on
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:223: trailing whitespace.
+ it's path, or cycle through them with the 'Next spline' -option.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:225: trailing whitespace.
+These are purely visual options, doesn't affect the output:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:227: trailing whitespace.
+ - Display sample points: display the points to be returned.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:229: trailing whitespace.
+**points_to_sample** value sets the number of samples
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:230: trailing whitespace.
+returned from the **drawn spline itself**, this is independent from the
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:231: trailing whitespace.
+actual control points, so the interpolation type matters.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:232: trailing whitespace.
+sampling_method:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:233: trailing whitespace.
+ - time: samples along the time axis, used for schedules
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:234: trailing whitespace.
+ - path: samples along the path itself, useful for coordinates
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:235: trailing whitespace.
+ - controlpoints: samples only the control points themselves
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:238: trailing whitespace.
+ - mask batch
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:239: trailing whitespace.
+ example compatible nodes: anything that takes masks
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:241: trailing whitespace.
+ example compatible nodes: IPAdapter weights
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:243: trailing whitespace.
+ example compatible nodes: anything that takes Fizz'
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:244: trailing whitespace.
+ nodes Batch Value Schedule
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:245: trailing whitespace.
+ - torch tensor
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:249: trailing whitespace.
+ def splinedata(self, mask_width, mask_height, coordinates, float_output_type, interpolation,
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:250: trailing whitespace.
+ points_to_sample, sampling_method, points_store, tension, repeat_output,
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:252: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:254: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:258: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:266: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:271: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:279: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:282: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:294: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:303: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:315: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:320: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:323: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:329: trailing whitespace.
+Creates a mask or batch of masks with the specified shape.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:330: trailing whitespace.
+Locations are center locations.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:355: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:390: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:407: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:413: trailing whitespace.
+Creates an image or batch of images with the specified shape.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:414: trailing whitespace.
+Locations are center locations.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:445: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:447: trailing whitespace.
+ def createshapemask(self, coordinates, frame_width, frame_height, shape_width, shape_height, shape_color,
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:473: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:477: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:494: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:500: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:509: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:523: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:525: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:531: trailing whitespace.
+Creates a mask or batch of masks with the specified text.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:532: trailing whitespace.
+Locations are center locations.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:557: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:571: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:592: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:600: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:612: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:618: trailing whitespace.
+Creates a gradient image from coordinates.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:632: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:633: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:662: trailing whitespace.
+ blend = projection * multiplier / gradient_length
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:680: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:686: trailing whitespace.
+Calculates list of floats from image.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:696: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:697: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:717: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:725: trailing whitespace.
+ [
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:737: trailing whitespace.
+ "masks": ("MASK",),
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:745: trailing whitespace.
+Gets the mean values from mask or image batch
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:746: trailing whitespace.
+and returns that as the selected output type.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:759: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:772: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:781: trailing whitespace.
+ [
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:800: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:806: trailing whitespace.
+Converts different value lists/series to another type.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:855: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:867: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:872: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:878: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:881: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:884: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:886: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:925: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:936: trailing whitespace.
+ [
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:946: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:952: trailing whitespace.
+Extends, and converts if needed, different value lists/series
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:983: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:985: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:999: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1013: trailing whitespace.
+Creates a sigmas tensor from list of float values.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1032: trailing whitespace.
+Creates a float list from sigmas tensors.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1057: trailing whitespace.
+This node allows scheduling GLIGEN text box positions in a batch,
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1058: trailing whitespace.
+to be used with AnimateDiff-Evolved. Intended to pair with the
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1059: trailing whitespace.
+Spline Editor -node.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1061: trailing whitespace.
+GLIGEN model can be downloaded through the Manage's "Install Models" menu.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1062: trailing whitespace.
+Or directly from here:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1063: trailing whitespace.
+https://huggingface.co/comfyanonymous/GLIGEN_pruned_safetensors/tree/main
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1064: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1065: trailing whitespace.
+Inputs:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1066: trailing whitespace.
+- **latents** input is used to calculate batch size
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1067: trailing whitespace.
+- **clip** is your standard text encoder, use same as for the main prompt
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1068: trailing whitespace.
+- **gligen_textbox_model** connects to GLIGEN Loader
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1069: trailing whitespace.
+- **coordinates** takes a json string of points, directly compatible
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1071: trailing whitespace.
+- **text** is the part of the prompt to set position for
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1072: trailing whitespace.
+- **width** and **height** are the size of the GLIGEN bounding box
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1073: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1075: trailing whitespace.
+- **conditioning** goes between to clip text encode and the sampler
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1076: trailing whitespace.
+- **coord_preview** is an optional preview of the coordinates and
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1094: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1118: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1120: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1122: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1128: trailing whitespace.
+Creates tracking data to be used with InstanceDiffusion:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1129: trailing whitespace.
+https://github.com/logtd/ComfyUI-InstanceDiffusion
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1130: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1131: trailing whitespace.
+InstanceDiffusion prompt format:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1132: trailing whitespace.
+"class_id.class_name": "prompt",
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1133: trailing whitespace.
+for example:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1134: trailing whitespace.
+"1.head": "((head))",
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1154: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1197: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1215: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1221: trailing whitespace.
+Appends tracking data to be used with InstanceDiffusion:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1222: trailing whitespace.
+https://github.com/logtd/ComfyUI-InstanceDiffusion
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1237: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1251: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1253: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1259: trailing whitespace.
+Interpolates coordinates based on a curve.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1268: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1270: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1280: trailing whitespace.
+ path_length = sum(np.linalg.norm(np.array(coordinates[i]) - np.array(coordinates[i-1]))
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1318: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1320: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1326: trailing whitespace.
+Draws the tracking data from
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1342: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1348: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1359: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1361: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1387: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1391: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1394: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1408: trailing whitespace.
+ [
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1427: trailing whitespace.
+# WORK IN PROGRESS
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1428: trailing whitespace.
+Do not count on this as part of your workflow yet,
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1429: trailing whitespace.
+probably contains lots of bugs and stability is not
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1430: trailing whitespace.
+guaranteed!!
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1431: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1436: trailing whitespace.
+**Ctrl + click** to draw a box.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1437: trailing whitespace.
+**Right click on a point** to delete it.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1438: trailing whitespace.
+Note that you can't delete from start/end of the points array.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1439: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1440: trailing whitespace.
+To add an image select the node and copy/paste or drag in the image.
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1441: trailing whitespace.
+Or from the bg_image input on queue (first frame of the batch).
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1443: trailing whitespace.
+**THE IMAGE IS SAVED TO THE NODE AND WORKFLOW METADATA**
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1444: trailing whitespace.
+you can clear the image from the context menu by right clicking on the canvas
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1485: trailing whitespace.
+ else:
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1491: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1509: trailing whitespace.
+ bboxes = bboxes_xyxy
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1532: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1534: trailing whitespace.
+ "ui": {"bg_image": [img_base64]},
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1541: trailing whitespace.
+ FUNCTION = "cutanddrag"
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1580: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1583: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1589: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1601: trailing whitespace.
+ np.array(background),
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1602: trailing whitespace.
+ np.array(fill_mask),
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1603: trailing whitespace.
+ inpaintRadius=3,
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1609: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__nodes__curve_nodes.py:1628: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__utility__utility.py:26: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__web__js__point_editor.js:334: trailing whitespace.
+ .event("mousedown", function () {
docs/hel-892/animate-mask-reference/kjpoints__web__js__point_editor.js:379: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__web__js__point_editor.js:418: trailing whitespace.
+ let adjustedY = this.mouse().y / app.canvas.ds.scale;
docs/hel-892/animate-mask-reference/kjpoints__web__js__point_editor.js:569: trailing whitespace.
+ if (this.bbox.length != 0) {
docs/hel-892/animate-mask-reference/kjpoints__web__js__point_editor.js:574: trailing whitespace.
+
docs/hel-892/animate-mask-reference/kjpoints__web__js__point_editor.js:697: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:23: trailing whitespace.
+ "model": ([
docs/hel-892/animate-mask-reference/sam2__nodes.py:68: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:94: trailing whitespace.
+ (os.path.join(script_directory, "sam2_configs", cfg)
docs/hel-892/animate-mask-reference/sam2__nodes.py:101: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:103: trailing whitespace.
+ 'model': model,
docs/hel-892/animate-mask-reference/sam2__nodes.py:122: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:124: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:151: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:173: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:177: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:193: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:196: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:202: trailing whitespace.
+ def segment(self, image, sam2_model, keep_model_loaded, coordinates_positive=None, coordinates_negative=None,
docs/hel-892/animate-mask-reference/sam2__nodes.py:210: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:239: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:285: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:296: trailing whitespace.
+ final_labels = np.concatenate((positive_point_labels, negative_point_labels), axis=1)
docs/hel-892/animate-mask-reference/sam2__nodes.py:300: trailing whitespace.
+ print("combined labels shape: ", final_labels.shape)
docs/hel-892/animate-mask-reference/sam2__nodes.py:301: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:307: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:322: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:324: trailing whitespace.
+ point_coords=final_coords if coordinates_positive is not None else None,
docs/hel-892/animate-mask-reference/sam2__nodes.py:330: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:357: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:378: trailing whitespace.
+ points=final_coords if coordinates_positive is not None else None,
docs/hel-892/animate-mask-reference/sam2__nodes.py:395: trailing whitespace.
+ combined_mask = np.zeros((H, W), dtype=np.uint8)
docs/hel-892/animate-mask-reference/sam2__nodes.py:414: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:443: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:455: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:473: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:499: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:501: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:503: trailing whitespace.
+ with torch.autocast(mm.get_autocast_device(model.device), dtype=dtype) if autocast_condition else nullcontext():
docs/hel-892/animate-mask-reference/sam2__nodes.py:525: trailing whitespace.
+ 'model': model,
docs/hel-892/animate-mask-reference/sam2__nodes.py:529: trailing whitespace.
+ }
docs/hel-892/animate-mask-reference/sam2__nodes.py:542: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:561: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:563: trailing whitespace.
+ with torch.autocast(mm.get_autocast_device(device), dtype=dtype) if autocast_condition else nullcontext():
docs/hel-892/animate-mask-reference/sam2__nodes.py:564: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:574: trailing whitespace.
+ combined_mask = np.zeros((H, W), dtype=np.uint8)
docs/hel-892/animate-mask-reference/sam2__nodes.py:589: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:598: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:622: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:628: trailing whitespace.
+ def segment(self, image, sam2_model, points_per_side, points_per_batch, pred_iou_thresh, stability_score_thresh,
docs/hel-892/animate-mask-reference/sam2__nodes.py:629: trailing whitespace.
+ stability_score_offset, crop_n_layers, box_nms_thresh, crop_n_points_downscale_factor, min_mask_region_area,
docs/hel-892/animate-mask-reference/sam2__nodes.py:636: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:639: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:653: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:655: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:662: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:674: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:686: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:689: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:694: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:706: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:710: trailing whitespace.
+#WIP
docs/hel-892/animate-mask-reference/sam2__nodes.py:719: trailing whitespace.
+
docs/hel-892/animate-mask-reference/sam2__nodes.py:751: trailing whitespace.
+
docs/hel-892/animate-mask-reference/vhs177__videohelpersuite__documentation.py:616: new blank line at EOF.
docs/hel-892/animate-mask-reference/vhs177__videohelpersuite__nodes.py:691: trailing whitespace.
+
docs/hel-892/animate-mask-reference/vhs177__videohelpersuite__nodes.py:897: trailing whitespace.
+
docs/hel-892/animate-mask-reference/vhs177__videohelpersuite__nodes.py:931: trailing whitespace.
+
docs/hel-892/animate-mask-reference/vhs177__videohelpersuite__nodes.py:963: trailing whitespace.
+