This commit is contained in:
Seunghoon Lee
2024-01-30 21:06:51 +09:00
parent 49b13b9526
commit 6a6d282a5d
8 changed files with 78 additions and 73 deletions
+4 -2
View File
@@ -100,9 +100,9 @@ def preprocess_pipeline(p, refiner_enabled: bool):
if "ONNX" not in shared.opts.diffusers_pipeline:
shared.log.warning(f"Unsupported pipeline for 'olive-ai' compile backend: {shared.opts.diffusers_pipeline}. You should select one of the ONNX pipelines.")
return
return shared.sd_model
if shared.opts.cuda_compile and shared.opts.cuda_compile_backend == "olive-ai":
if shared.opts.cuda_compile_backend == "olive-ai" and len(shared.opts.cuda_compile) != 1:
compile_height = p.height
compile_width = p.width
if (shared.compiled_model_state is None or
@@ -131,6 +131,8 @@ def preprocess_pipeline(p, refiner_enabled: bool):
sd_models.reload_model_weights(op='model')
shared.sd_model = shared.sd_model.preprocess(p)
return shared.sd_model
def initialize():
global initialized # pylint: disable=global-statement