Skip to content

Commit

Permalink
fix bug of always recompile in enterprise (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
marigoold authored May 8, 2024
1 parent 8ceeae4 commit 219aab0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onediff_sd_webui_extensions/scripts/onediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

"""oneflow_compiled UNetModel"""
compiled_unet = None
is_compiled_unet_quantized = False
is_unet_quantized = False
compiled_ckpt_name = None

def generate_graph_path(ckpt_name: str, model_name: str) -> str:
Expand Down Expand Up @@ -178,7 +178,7 @@ def run(self, p, quantization=False):

ckpt_changed = current_checkpoint != compiled_ckpt_name
model_changed = self.check_model_change(shared.sd_model)
quantization_changed = quantization != is_compiled_unet_quantized
quantization_changed = quantization != is_unet_quantized
need_recompile = (
(quantization and ckpt_changed) # always recompile when switching ckpt with 'int8 speed model' enabled
or model_changed # always recompile when switching model to another structure
Expand Down

0 comments on commit 219aab0

Please sign in to comment.