We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fdae85 commit b366b22Copy full SHA for b366b22
src/diffusers/models/modeling_utils.py
@@ -320,6 +320,12 @@ def forward(self, x):
320
321
def disable_layerwise_upcasting(self):
322
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
329
has_children = list(module.children())
330
if not has_children:
331
module._forward_pre_hooks = OrderedDict()
0 commit comments