From 16168ab6b31f9225993e060cf73d2aae4a0b5730 Mon Sep 17 00:00:00 2001 From: Gaurav Shukla Date: Tue, 21 Feb 2023 19:39:05 +0530 Subject: [PATCH] [SD] Update need_vae_encode correctly Signed-Off-by: Gaurav Shukla --- apps/stable_diffusion/scripts/txt2img.py | 2 +- apps/stable_diffusion/src/models/model_wrappers.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/stable_diffusion/scripts/txt2img.py b/apps/stable_diffusion/scripts/txt2img.py index 03a4464e..c46d4fea 100644 --- a/apps/stable_diffusion/scripts/txt2img.py +++ b/apps/stable_diffusion/scripts/txt2img.py @@ -105,7 +105,7 @@ def txt2img_inf( args.iree_vulkan_target_triple = "" args.use_tuned = True args.import_mlir = False - args.img_path = "" + args.img_path = None set_init_device_flags() model_id = ( args.hf_model_id diff --git a/apps/stable_diffusion/src/models/model_wrappers.py b/apps/stable_diffusion/src/models/model_wrappers.py index c7eb5af4..d9ef2bec 100644 --- a/apps/stable_diffusion/src/models/model_wrappers.py +++ b/apps/stable_diffusion/src/models/model_wrappers.py @@ -334,6 +334,8 @@ class SharkifyStableDiffusionModel: if args.hf_model_id == "": sys.exit("Base model configuration for the custom model is missing. Use `--clear_all` and re-run.") print("Loaded vmfbs from cache and successfully fetched base model configuration.") + if not need_vae_encode: + return vmfbs[:3] return vmfbs # Step 2: