Skip to content

Commit ab78570

Browse files
authored
Add missing auth tokens for two SD tests (#296)
1 parent c7a3b2e commit ab78570

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/push_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ jobs:
4747
4848
- name: Run all (incl. slow) tests on GPU
4949
env:
50-
HF_API_TOKEN: ${{ secrets.HF_API_TOKEN }}
50+
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
5151
run: |
5252
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s tests/

tests/test_pipelines.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ def test_ldm_text2img_fast(self):
275275
@unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU")
276276
def test_stable_diffusion(self):
277277
# make sure here that pndm scheduler skips prk
278-
sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1").to(torch_device)
278+
sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1", use_auth_token=True)
279+
sd_pipe = sd_pipe.to(torch_device)
279280

280281
prompt = "A painting of a squirrel eating a burger"
281282
generator = torch.Generator(device=torch_device).manual_seed(0)
@@ -295,7 +296,8 @@ def test_stable_diffusion(self):
295296
@slow
296297
@unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU")
297298
def test_stable_diffusion_fast_ddim(self):
298-
sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1").to(torch_device)
299+
sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1", use_auth_token=True)
300+
sd_pipe = sd_pipe.to(torch_device)
299301

300302
scheduler = DDIMScheduler(
301303
beta_start=0.00085,

0 commit comments

Comments
 (0)