Revive SD downloads from shark_tank. (#1465)

This commit is contained in:
Ean Garvey
2023-05-25 12:03:21 -05:00
committed by GitHub
parent 6d64b8e273
commit 54e57f7771
4 changed files with 16 additions and 5 deletions

View File

@@ -86,8 +86,10 @@ class StableDiffusionPipeline:
self.text_encoder = self.sd_model.clip()
else:
try:
breakpoint()
self.text_encoder = get_clip()
except:
except Exception as e:
print(e)
print("download pipeline failed, falling back to import_mlir")
self.text_encoder = self.sd_model.clip()
@@ -104,7 +106,8 @@ class StableDiffusionPipeline:
else:
try:
self.unet = get_unet()
except:
except Exception as e:
print(e)
print("download pipeline failed, falling back to import_mlir")
self.unet = self.sd_model.unet()
@@ -121,7 +124,8 @@ class StableDiffusionPipeline:
else:
try:
self.vae = get_vae()
except:
except Exception as e:
print(e)
print("download pipeline failed, falling back to import_mlir")
self.vae = self.sd_model.vae()

View File

@@ -83,7 +83,6 @@ def get_shark_model(tank_url, model_name, extra_args=[]):
# Set local shark_tank cache directory.
shark_args.local_tank_cache = args.local_tank_cache
from shark.shark_downloader import download_model
if "cuda" in args.device: