Unverified Commit ab785701 authored by Anton Lozhkov's avatar Anton Lozhkov Committed by GitHub
Browse files

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

parent c7a3b2ed
...@@ -47,6 +47,6 @@ jobs: ...@@ -47,6 +47,6 @@ jobs:
- name: Run all (incl. slow) tests on GPU - name: Run all (incl. slow) tests on GPU
env: env:
HF_API_TOKEN: ${{ secrets.HF_API_TOKEN }} HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
run: | run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s tests/ python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s tests/
...@@ -275,7 +275,8 @@ class PipelineTesterMixin(unittest.TestCase): ...@@ -275,7 +275,8 @@ class PipelineTesterMixin(unittest.TestCase):
@unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU") @unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU")
def test_stable_diffusion(self): def test_stable_diffusion(self):
# make sure here that pndm scheduler skips prk # 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" prompt = "A painting of a squirrel eating a burger"
generator = torch.Generator(device=torch_device).manual_seed(0) generator = torch.Generator(device=torch_device).manual_seed(0)
...@@ -295,7 +296,8 @@ class PipelineTesterMixin(unittest.TestCase): ...@@ -295,7 +296,8 @@ class PipelineTesterMixin(unittest.TestCase):
@slow @slow
@unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU") @unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU")
def test_stable_diffusion_fast_ddim(self): 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( scheduler = DDIMScheduler(
beta_start=0.00085, beta_start=0.00085,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment