Skip to content

Commit b366b22

Browse files
committed
update
1 parent 1fdae85 commit b366b22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/diffusers/models/modeling_utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,12 @@ def forward(self, x):
320320

321321
def disable_layerwise_upcasting(self):
322322
def fn_recursive_upcast(module):
323+
if hasattr(self, "_always_upcast_modules") and module.__class__.__name__ in self._always_upcast_modules:
324+
module._forward_pre_hooks = OrderedDict()
325+
module._forward_hooks = OrderedDict()
326+
327+
return
328+
323329
has_children = list(module.children())
324330
if not has_children:
325331
module._forward_pre_hooks = OrderedDict()

0 commit comments

Comments
 (0)