From 72421da1a3a246a849be59d78c71873f67fc01c4 Mon Sep 17 00:00:00 2001 From: Yukio Siraichi Date: Fri, 1 Dec 2023 00:51:18 -0300 Subject: [PATCH] Install `diffusers` before checking for token. --- torchbenchmark/models/stable_diffusion_text_encoder/install.py | 2 +- torchbenchmark/models/stable_diffusion_unet/install.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/torchbenchmark/models/stable_diffusion_text_encoder/install.py b/torchbenchmark/models/stable_diffusion_text_encoder/install.py index a9f4576593..1208f13104 100644 --- a/torchbenchmark/models/stable_diffusion_text_encoder/install.py +++ b/torchbenchmark/models/stable_diffusion_text_encoder/install.py @@ -10,8 +10,8 @@ def load_model_checkpoint(): StableDiffusionPipeline.from_pretrained(MODEL_NAME, torch_dtype=torch.float16, safety_checker=None) if __name__ == "__main__": + install_diffusers() if not 'HUGGING_FACE_HUB_TOKEN' in os.environ: warnings.warn("Make sure to set `HUGGINGFACE_HUB_TOKEN` so you can download weights") else: - install_diffusers() load_model_checkpoint() diff --git a/torchbenchmark/models/stable_diffusion_unet/install.py b/torchbenchmark/models/stable_diffusion_unet/install.py index a9f4576593..1208f13104 100644 --- a/torchbenchmark/models/stable_diffusion_unet/install.py +++ b/torchbenchmark/models/stable_diffusion_unet/install.py @@ -10,8 +10,8 @@ def load_model_checkpoint(): StableDiffusionPipeline.from_pretrained(MODEL_NAME, torch_dtype=torch.float16, safety_checker=None) if __name__ == "__main__": + install_diffusers() if not 'HUGGING_FACE_HUB_TOKEN' in os.environ: warnings.warn("Make sure to set `HUGGINGFACE_HUB_TOKEN` so you can download weights") else: - install_diffusers() load_model_checkpoint()