Skip to content

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 last pr.

comfyanonymous728613bb3e9a
diff --git a/comfy/sd1_clip.py b/comfy/sd1_clip.py
index af621b2dc..58acb97fc 100644
--- a/comfy/sd1_clip.py
+++ b/comfy/sd1_clip.py
@@ -173,7 +173,7 @@ class SDClipModel(torch.nn.Module, ClipTokenWeightEncoder):
if getattr(self.transformer, self.inner_name).final_layer_norm.weight.dtype != torch.float32:
precision_scope = torch.autocast
else:
- precision_scope = lambda a, b: contextlib.nullcontext(a)
+ precision_scope = lambda a, dtype: contextlib.nullcontext(a)
with precision_scope(model_management.get_autocast_device(device), dtype=torch.float32):
attention_mask = None