Skip to content

Commit 1fa4ee5

Browse files
committed
remove dynamo disable
1 parent 7ed7141 commit 1fa4ee5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/diffusers/models/hooks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,13 @@ def init_hook(self, module: torch.nn.Module):
139139
module.to(dtype=self.storage_dtype)
140140
return module
141141

142-
@torch._dynamo.disable(recursive=False)
143142
def pre_forward(self, module: torch.nn.Module, *args, **kwargs):
144143
module.to(dtype=self.compute_dtype)
145144
# How do we account for LongTensor, BoolTensor, etc.?
146145
# args = tuple(align_maybe_tensor_dtype(arg, self.compute_dtype) for arg in args)
147146
# kwargs = {k: align_maybe_tensor_dtype(v, self.compute_dtype) for k, v in kwargs.items()}
148147
return args, kwargs
149148

150-
@torch._dynamo.disable(recursive=False)
151149
def post_forward(self, module: torch.nn.Module, output):
152150
module.to(dtype=self.storage_dtype)
153151
return output

0 commit comments

Comments
 (0)