File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
invokeai/backend/model_manager/load/model_cache/torch_module_autocast/custom_modules Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -54,20 +54,17 @@ def forward(self, input: torch.Tensor) -> torch.Tensor:
5454 return self ._autocast_forward_with_patches (input )
5555 elif self ._device_autocasting_enabled :
5656 return self ._autocast_forward (input )
57- elif (
58- input .is_floating_point ()
59- and (
60- (
61- self .weight .is_floating_point ()
62- and not isinstance (self .weight , GGMLTensor )
63- and self .weight .dtype != input .dtype
64- )
65- or (
66- self .bias is not None
67- and self .bias .is_floating_point ()
68- and not isinstance (self .bias , GGMLTensor )
69- and self .bias .dtype != input .dtype
70- )
57+ elif input .is_floating_point () and (
58+ (
59+ self .weight .is_floating_point ()
60+ and not isinstance (self .weight , GGMLTensor )
61+ and self .weight .dtype != input .dtype
62+ )
63+ or (
64+ self .bias is not None
65+ and self .bias .is_floating_point ()
66+ and not isinstance (self .bias , GGMLTensor )
67+ and self .bias .dtype != input .dtype
7168 )
7269 ):
7370 weight = self ._cast_tensor_for_input (self .weight , input )
You can’t perform that action at this time.
0 commit comments