mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 23:00:51 +08:00
- fix #29 str(model) no longer raises exceptions like with HyVideoModelLoader - don't try to format CUDA tensors because that can sometimes raise exceptions - cudaAllocAsync has been disabled for now due to 2.6.0 bugs - improve florence2 support - add support for paligemma 2. This requires the fix for transformers that is currently staged in another repo, install with `uv pip install --no-deps "transformers@git+https://github.com/zucchini-nlp/transformers.git#branch=paligemma-fix-kwargs"` - triton has been updated - fix missing __init__.py files
17 lines
496 B
Python
17 lines
496 B
Python
import torch.nn
|
|
|
|
from comfy.model_patcher import ModelPatcher
|
|
|
|
|
|
class HasOperationsNoName(torch.nn.Module):
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.operations = object()
|
|
if hasattr(self.operations, "__name__"):
|
|
delattr(self.operations, "__name__")
|
|
|
|
|
|
def test_str_model_patcher():
|
|
model_patcher = ModelPatcher(HasOperationsNoName(), torch.device('cpu'), torch.device('cpu'))
|
|
assert str(model_patcher) is not None
|