Add missing auth tokens for two SD tests (#296)

This commit is contained in:
Anton Lozhkov
2022-08-31 17:57:46 +02:00
committed by GitHub
parent c7a3b2ed31
commit ab7857019a
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -47,6 +47,6 @@ jobs:
- name: Run all (incl. slow) tests on GPU
env:
HF_API_TOKEN: ${{ secrets.HF_API_TOKEN }}
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s tests/
+4 -2
View File
@@ -275,7 +275,8 @@ class PipelineTesterMixin(unittest.TestCase):
@unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU")
def test_stable_diffusion(self):
# make sure here that pndm scheduler skips prk
sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1").to(torch_device)
sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1", use_auth_token=True)
sd_pipe = sd_pipe.to(torch_device)
prompt = "A painting of a squirrel eating a burger"
generator = torch.Generator(device=torch_device).manual_seed(0)
@@ -295,7 +296,8 @@ class PipelineTesterMixin(unittest.TestCase):
@slow
@unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU")
def test_stable_diffusion_fast_ddim(self):
sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1").to(torch_device)
sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1", use_auth_token=True)
sd_pipe = sd_pipe.to(torch_device)
scheduler = DDIMScheduler(
beta_start=0.00085,