Skip to content

Commit

Permalink
Remove autocast: it makes no difference, as ComfyUI converts to bf16 …
Browse files Browse the repository at this point in the history
…on loading stage

Signed-off-by: Sv. Lockal <[email protected]>
  • Loading branch information
AngryLoki committed Aug 5, 2024
1 parent 48a5bbb commit 290df91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions comfy/model_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,7 @@ def model_load(self, lowvram_model_memory=0, force_patch_weights=False):
raise e

if (is_cpu_with_ipex() or is_intel_xpu()) and not args.disable_ipex_optimize:
ipex_dtype = torch.bfloat16 if use_cpu_ipex_bf16() else None
self.real_model = ipex.optimize(self.real_model.eval(), dtype=ipex_dtype, graph_mode=True, concat_linear=True)
self.real_model = ipex.optimize(self.real_model.eval(), graph_mode=True, concat_linear=True)
self.real_model = torch.compile(self.real_model, backend="ipex")

self.weights_loaded = True
Expand Down

0 comments on commit 290df91

Please sign in to comment.