refactor onnx and olive

This commit is contained in:
Seunghoon Lee
2023-11-04 23:46:20 +09:00
parent b70258c926
commit 6507491d8f
27 changed files with 1185 additions and 342 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ def process_diffusers(p: processing.StableDiffusionProcessing):
orig_pipeline = shared.sd_model
results = []
if isinstance(shared.sd_model, OlivePipeline):
shared.sd_model = shared.sd_model.optimize(p.width, p.height)
if hasattr(shared.sd_model, 'preprocess'):
shared.sd_model = shared.sd_model.preprocess(p.width, p.height, p.batch_size)
def is_txt2img():
return sd_models.get_diffusers_task(shared.sd_model) == sd_models.DiffusersTaskType.TEXT_2_IMAGE