The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Fix loading old stable diffusion ckpt files on newer numpy. (#10333)
comfyanonymouse4ea3936660a
diff --git a/comfy/utils.py b/comfy/utils.pyindex fab28cf08..0fd03f165 100644--- a/comfy/utils.py+++ b/comfy/utils.py@@ -39,7 +39,11 @@ if hasattr(torch.serialization, "add_safe_globals"): # TODO: this was added inpassModelCheckpoint.__module__ = "pytorch_lightning.callbacks.model_checkpoint"- from numpy.core.multiarray import scalar+ def scalar(*args, **kwargs):+ from numpy.core.multiarray import scalar as sc+ return sc(*args, **kwargs)+ scalar.__module__ = "numpy.core.multiarray"+from numpy import dtypefrom numpy.dtypes import Float64DTypefrom _codecs import encode