diff --git a/README.md b/README.md index 5b366034..b5ecc35c 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ You need to accept the model license before downloading or using the Stable Diff # make sure you're logged in with `huggingface-cli login` from diffusers import StableDiffusionPipeline -pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True) +pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") pipe = pipe.to("cuda") prompt = "a photo of an astronaut riding a horse on mars" @@ -114,7 +114,6 @@ pipe = StableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, - use_auth_token=True ) pipe = pipe.to("cuda") @@ -140,7 +139,6 @@ pipe = StableDiffusionPipeline.from_pretrained( revision="fp16", torch_dtype=torch.float16, scheduler=lms, - use_auth_token=True ) pipe = pipe.to("cuda") @@ -169,10 +167,9 @@ pipe = StableDiffusionImg2ImgPipeline.from_pretrained( model_id_or_path, revision="fp16", torch_dtype=torch.float16, - use_auth_token=True ) # or download via git clone https://huggingface.co/CompVis/stable-diffusion-v1-4 -# and pass `model_id_or_path="./stable-diffusion-v1-4"` without having to use `use_auth_token=True`. +# and pass `model_id_or_path="./stable-diffusion-v1-4"`. pipe = pipe.to(device) # let's download an initial image @@ -219,10 +216,9 @@ pipe = StableDiffusionInpaintPipeline.from_pretrained( model_id_or_path, revision="fp16", torch_dtype=torch.float16, - use_auth_token=True ) # or download via git clone https://huggingface.co/CompVis/stable-diffusion-v1-4 -# and pass `model_id_or_path="./stable-diffusion-v1-4"` without having to use `use_auth_token=True`. +# and pass `model_id_or_path="./stable-diffusion-v1-4"`. pipe = pipe.to(device) prompt = "a cat sitting on a bench" diff --git a/docs/source/api/pipelines/overview.mdx b/docs/source/api/pipelines/overview.mdx index a9b1bb28..68b783be 100644 --- a/docs/source/api/pipelines/overview.mdx +++ b/docs/source/api/pipelines/overview.mdx @@ -101,7 +101,7 @@ logic including pre-processing, an unrolled diffusion loop, and post-processing from torch import autocast from diffusers import StableDiffusionPipeline, LMSDiscreteScheduler -pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True) +pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") pipe = pipe.to("cuda") prompt = "a photo of an astronaut riding a horse on mars" @@ -126,7 +126,7 @@ from diffusers import StableDiffusionImg2ImgPipeline # load the pipeline device = "cuda" pipe = StableDiffusionImg2ImgPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=True + "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16 ).to(device) # let's download an initial image @@ -177,7 +177,7 @@ mask_image = download_image(mask_url).resize((512, 512)) device = "cuda" pipe = StableDiffusionInpaintPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=True + "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16 ).to(device) prompt = "a cat sitting on a bench" diff --git a/docs/source/optimization/fp16.mdx b/docs/source/optimization/fp16.mdx index ca6e8879..f19326ec 100644 --- a/docs/source/optimization/fp16.mdx +++ b/docs/source/optimization/fp16.mdx @@ -56,7 +56,7 @@ If you use a CUDA GPU, you can take advantage of `torch.autocast` to perform inf from torch import autocast from diffusers import StableDiffusionPipeline -pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True) +pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") pipe = pipe.to("cuda") prompt = "a photo of an astronaut riding a horse on mars" @@ -75,7 +75,6 @@ pipe = StableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, - use_auth_token=True ) ``` @@ -97,7 +96,6 @@ pipe = StableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, - use_auth_token=True ) pipe = pipe.to("cuda") @@ -152,8 +150,6 @@ def generate_inputs(): pipe = StableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", - # scheduler=scheduler, - use_auth_token=True, revision="fp16", torch_dtype=torch.float16, ).to("cuda") @@ -218,8 +214,6 @@ class UNet2DConditionOutput: pipe = StableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", - # scheduler=scheduler, - use_auth_token=True, revision="fp16", torch_dtype=torch.float16, ).to("cuda") diff --git a/docs/source/optimization/mps.mdx b/docs/source/optimization/mps.mdx index 56cdbbde..ad347b84 100644 --- a/docs/source/optimization/mps.mdx +++ b/docs/source/optimization/mps.mdx @@ -31,7 +31,7 @@ We recommend to "prime" the pipeline using an additional one-time pass through i # make sure you're logged in with `huggingface-cli login` from diffusers import StableDiffusionPipeline -pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True) +pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") pipe = pipe.to("mps") prompt = "a photo of an astronaut riding a horse on mars" diff --git a/docs/source/optimization/onnx.mdx b/docs/source/optimization/onnx.mdx index 95fd59c8..9bbc4f20 100644 --- a/docs/source/optimization/onnx.mdx +++ b/docs/source/optimization/onnx.mdx @@ -31,7 +31,6 @@ pipe = StableDiffusionOnnxPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", revision="onnx", provider="CUDAExecutionProvider", - use_auth_token=True, ) prompt = "a photo of an astronaut riding a horse on mars" diff --git a/docs/source/using-diffusers/img2img.mdx b/docs/source/using-diffusers/img2img.mdx index e3b06871..6becc2d5 100644 --- a/docs/source/using-diffusers/img2img.mdx +++ b/docs/source/using-diffusers/img2img.mdx @@ -25,7 +25,7 @@ from diffusers import StableDiffusionImg2ImgPipeline # load the pipeline device = "cuda" pipe = StableDiffusionImg2ImgPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=True + "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16 ).to(device) # let's download an initial image diff --git a/docs/source/using-diffusers/inpaint.mdx b/docs/source/using-diffusers/inpaint.mdx index 215b2c80..d6269f4b 100644 --- a/docs/source/using-diffusers/inpaint.mdx +++ b/docs/source/using-diffusers/inpaint.mdx @@ -37,7 +37,7 @@ mask_image = download_image(mask_url).resize((512, 512)) device = "cuda" pipe = StableDiffusionInpaintPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=True + "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16 ).to(device) prompt = "a cat sitting on a bench" diff --git a/examples/unconditional_image_generation/train_unconditional.py b/examples/unconditional_image_generation/train_unconditional.py index 6955c9f6..d3b4e177 100644 --- a/examples/unconditional_image_generation/train_unconditional.py +++ b/examples/unconditional_image_generation/train_unconditional.py @@ -83,7 +83,6 @@ def main(args): args.dataset_name, args.dataset_config_name, cache_dir=args.cache_dir, - use_auth_token=True if args.use_auth_token else None, split="train", ) else: @@ -222,7 +221,6 @@ if __name__ == "__main__": parser.add_argument("--ema_power", type=float, default=3 / 4) parser.add_argument("--ema_max_decay", type=float, default=0.9999) parser.add_argument("--push_to_hub", action="store_true") - parser.add_argument("--use_auth_token", action="store_true") parser.add_argument("--hub_token", type=str, default=None) parser.add_argument("--hub_model_id", type=str, default=None) parser.add_argument("--hub_private_repo", action="store_true") diff --git a/scripts/convert_stable_diffusion_checkpoint_to_onnx.py b/scripts/convert_stable_diffusion_checkpoint_to_onnx.py index beeacfe3..07dc21aa 100644 --- a/scripts/convert_stable_diffusion_checkpoint_to_onnx.py +++ b/scripts/convert_stable_diffusion_checkpoint_to_onnx.py @@ -70,7 +70,7 @@ def onnx_export( @torch.no_grad() def convert_models(model_path: str, output_path: str, opset: int): - pipeline = StableDiffusionPipeline.from_pretrained(model_path, use_auth_token=True) + pipeline = StableDiffusionPipeline.from_pretrained(model_path) output_path = Path(output_path) # TEXT ENCODER diff --git a/setup.py b/setup.py index 007b4a2a..bce9f5e4 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ _deps = [ "flake8>=3.8.3", "flax>=0.4.1", "hf-doc-builder>=0.3.0", - "huggingface-hub>=0.9.1", + "huggingface-hub>=0.10.0", "importlib_metadata", "isort>=5.5.4", "jax>=0.2.8,!=0.3.2,<=0.3.6", diff --git a/src/diffusers/configuration_utils.py b/src/diffusers/configuration_utils.py index 59c93157..6f866c6b 100644 --- a/src/diffusers/configuration_utils.py +++ b/src/diffusers/configuration_utils.py @@ -145,7 +145,8 @@ class ConfigMixin: - Passing `use_auth_token=True`` is required when you want to use a private model. + It is required to be logged in (`huggingface-cli login`) when you want to use private or [gated + models](https://huggingface.co/docs/hub/models-gated#gated-models). @@ -238,7 +239,7 @@ class ConfigMixin: f"{pretrained_model_name_or_path} is not a local folder and is not a valid model identifier" " listed on 'https://huggingface.co/models'\nIf this is a private repository, make sure to pass a" " token having permission to this repo with `use_auth_token` or log in with `huggingface-cli" - " login` and pass `use_auth_token=True`." + " login`." ) except RevisionNotFoundError: raise EnvironmentError( diff --git a/src/diffusers/dependency_versions_table.py b/src/diffusers/dependency_versions_table.py index 367b5c57..8b10d70a 100644 --- a/src/diffusers/dependency_versions_table.py +++ b/src/diffusers/dependency_versions_table.py @@ -10,7 +10,7 @@ deps = { "flake8": "flake8>=3.8.3", "flax": "flax>=0.4.1", "hf-doc-builder": "hf-doc-builder>=0.3.0", - "huggingface-hub": "huggingface-hub>=0.9.1", + "huggingface-hub": "huggingface-hub>=0.10.0", "importlib_metadata": "importlib_metadata", "isort": "isort>=5.5.4", "jax": "jax>=0.2.8,!=0.3.2,<=0.3.6", diff --git a/src/diffusers/dynamic_modules_utils.py b/src/diffusers/dynamic_modules_utils.py index 0ebf916e..c150ed7d 100644 --- a/src/diffusers/dynamic_modules_utils.py +++ b/src/diffusers/dynamic_modules_utils.py @@ -198,7 +198,7 @@ def get_cached_module_file( - Passing `use_auth_token=True` is required when you want to use a private model. + Passing `` is required when you want to use a private model. @@ -306,7 +306,7 @@ def get_class_from_dynamic_module( - Passing `use_auth_token=True` is required when you want to use a private model. + Passing `` is required when you want to use a private model. diff --git a/src/diffusers/modeling_flax_utils.py b/src/diffusers/modeling_flax_utils.py index 9e40edf2..28cd29d2 100644 --- a/src/diffusers/modeling_flax_utils.py +++ b/src/diffusers/modeling_flax_utils.py @@ -357,7 +357,7 @@ class FlaxModelMixin: f"{pretrained_model_name_or_path} is not a local folder and is not a valid model identifier " "listed on 'https://huggingface.co/models'\nIf this is a private repository, make sure to pass a " "token having permission to this repo with `use_auth_token` or log in with `huggingface-cli " - "login` and pass `use_auth_token=True`." + "login`." ) except RevisionNotFoundError: raise EnvironmentError( diff --git a/src/diffusers/modeling_utils.py b/src/diffusers/modeling_utils.py index 4d609043..8bb5e728 100644 --- a/src/diffusers/modeling_utils.py +++ b/src/diffusers/modeling_utils.py @@ -270,7 +270,8 @@ class ModelMixin(torch.nn.Module): - Passing `use_auth_token=True`` is required when you want to use a private model. + It is required to be logged in (`huggingface-cli login`) when you want to use private or [gated + models](https://huggingface.co/docs/hub/models-gated#gated-models). @@ -338,7 +339,7 @@ class ModelMixin(torch.nn.Module): f"{pretrained_model_name_or_path} is not a local folder and is not a valid model identifier " "listed on 'https://huggingface.co/models'\nIf this is a private repository, make sure to pass a " "token having permission to this repo with `use_auth_token` or log in with `huggingface-cli " - "login` and pass `use_auth_token=True`." + "login`." ) except RevisionNotFoundError: raise EnvironmentError( diff --git a/src/diffusers/pipeline_flax_utils.py b/src/diffusers/pipeline_flax_utils.py index 91a0aef1..92b71cae 100644 --- a/src/diffusers/pipeline_flax_utils.py +++ b/src/diffusers/pipeline_flax_utils.py @@ -249,8 +249,8 @@ class FlaxDiffusionPipeline(ConfigMixin): - Passing `use_auth_token=True`` is required when you want to use a private model, *e.g.* - `"CompVis/stable-diffusion-v1-4"` + It is required to be logged in (`huggingface-cli login`) when you want to use private or [gated + models](https://huggingface.co/docs/hub/models-gated#gated-models), *e.g.* `"CompVis/stable-diffusion-v1-4"` @@ -272,15 +272,13 @@ class FlaxDiffusionPipeline(ConfigMixin): >>> # Download pipeline that requires an authorization token >>> # For more information on access tokens, please refer to this section >>> # of the documentation](https://huggingface.co/docs/hub/security-tokens) - >>> pipeline = FlaxDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True) + >>> pipeline = FlaxDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") >>> # Download pipeline, but overwrite scheduler >>> from diffusers import LMSDiscreteScheduler >>> scheduler = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear") - >>> pipeline = FlaxDiffusionPipeline.from_pretrained( - ... "CompVis/stable-diffusion-v1-4", scheduler=scheduler, use_auth_token=True - ... ) + >>> pipeline = FlaxDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", scheduler=scheduler) ``` """ cache_dir = kwargs.pop("cache_dir", DIFFUSERS_CACHE) diff --git a/src/diffusers/pipeline_utils.py b/src/diffusers/pipeline_utils.py index fb8801bc..17560055 100644 --- a/src/diffusers/pipeline_utils.py +++ b/src/diffusers/pipeline_utils.py @@ -240,8 +240,8 @@ class DiffusionPipeline(ConfigMixin): - Passing `use_auth_token=True`` is required when you want to use a private model, *e.g.* - `"CompVis/stable-diffusion-v1-4"` + It is required to be logged in (`huggingface-cli login`) when you want to use private or [gated + models](https://huggingface.co/docs/hub/models-gated#gated-models), *e.g.* `"CompVis/stable-diffusion-v1-4"` @@ -263,15 +263,13 @@ class DiffusionPipeline(ConfigMixin): >>> # Download pipeline that requires an authorization token >>> # For more information on access tokens, please refer to this section >>> # of the documentation](https://huggingface.co/docs/hub/security-tokens) - >>> pipeline = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True) + >>> pipeline = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") >>> # Download pipeline, but overwrite scheduler >>> from diffusers import LMSDiscreteScheduler >>> scheduler = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear") - >>> pipeline = DiffusionPipeline.from_pretrained( - ... "CompVis/stable-diffusion-v1-4", scheduler=scheduler, use_auth_token=True - ... ) + >>> pipeline = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", scheduler=scheduler) ``` """ cache_dir = kwargs.pop("cache_dir", DIFFUSERS_CACHE) diff --git a/src/diffusers/pipelines/README.md b/src/diffusers/pipelines/README.md index 71841e02..b5ea112f 100644 --- a/src/diffusers/pipelines/README.md +++ b/src/diffusers/pipelines/README.md @@ -88,7 +88,7 @@ logic including pre-processing, an unrolled diffusion loop, and post-processing # make sure you're logged in with `huggingface-cli login` from diffusers import StableDiffusionPipeline, LMSDiscreteScheduler -pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True) +pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") pipe = pipe.to("cuda") prompt = "a photo of an astronaut riding a horse on mars" @@ -114,7 +114,6 @@ pipe = StableDiffusionImg2ImgPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, - use_auth_token=True ).to(device) # let's download an initial image @@ -164,7 +163,6 @@ pipe = StableDiffusionInpaintPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, - use_auth_token=True ).to(device) prompt = "a cat sitting on a bench" diff --git a/src/diffusers/pipelines/stable_diffusion/README.md b/src/diffusers/pipelines/stable_diffusion/README.md index 45c4e479..91930d89 100644 --- a/src/diffusers/pipelines/stable_diffusion/README.md +++ b/src/diffusers/pipelines/stable_diffusion/README.md @@ -61,7 +61,7 @@ pipe = StableDiffusionPipeline.from_pretrained("./stable-diffusion-v1-4") # make sure you're logged in with `huggingface-cli login` from diffusers import StableDiffusionPipeline -pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True) +pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") pipe = pipe.to("cuda") prompt = "a photo of an astronaut riding a horse on mars" @@ -81,7 +81,6 @@ scheduler = DDIMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="sca pipe = StableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", scheduler=scheduler, - use_auth_token=True ).to("cuda") prompt = "a photo of an astronaut riding a horse on mars" @@ -105,7 +104,6 @@ lms = LMSDiscreteScheduler( pipe = StableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", scheduler=lms, - use_auth_token=True ).to("cuda") prompt = "a photo of an astronaut riding a horse on mars" diff --git a/tests/test_pipelines.py b/tests/test_pipelines.py index ca82cf5c..83097962 100644 --- a/tests/test_pipelines.py +++ b/tests/test_pipelines.py @@ -1001,7 +1001,7 @@ 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", use_auth_token=True) + sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1") sd_pipe = sd_pipe.to(torch_device) sd_pipe.set_progress_bar_config(disable=None) @@ -1023,7 +1023,7 @@ 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", use_auth_token=True) + sd_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-1") sd_pipe = sd_pipe.to(torch_device) sd_pipe.set_progress_bar_config(disable=None) @@ -1158,9 +1158,9 @@ class PipelineTesterMixin(unittest.TestCase): @unittest.skipIf(torch_device == "cpu", "Stable diffusion is supposed to run on GPU") def test_lms_stable_diffusion_pipeline(self): model_id = "CompVis/stable-diffusion-v1-1" - pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True).to(torch_device) + pipe = StableDiffusionPipeline.from_pretrained(model_id).to(torch_device) pipe.set_progress_bar_config(disable=None) - scheduler = LMSDiscreteScheduler.from_config(model_id, subfolder="scheduler", use_auth_token=True) + scheduler = LMSDiscreteScheduler.from_config(model_id, subfolder="scheduler") pipe.scheduler = scheduler prompt = "a photograph of an astronaut riding a horse" @@ -1179,9 +1179,9 @@ class PipelineTesterMixin(unittest.TestCase): def test_stable_diffusion_memory_chunking(self): torch.cuda.reset_peak_memory_stats() model_id = "CompVis/stable-diffusion-v1-4" - pipe = StableDiffusionPipeline.from_pretrained( - model_id, revision="fp16", torch_dtype=torch.float16, use_auth_token=True - ).to(torch_device) + pipe = StableDiffusionPipeline.from_pretrained(model_id, revision="fp16", torch_dtype=torch.float16).to( + torch_device + ) pipe.set_progress_bar_config(disable=None) prompt = "a photograph of an astronaut riding a horse" @@ -1219,9 +1219,9 @@ class PipelineTesterMixin(unittest.TestCase): def test_stable_diffusion_text2img_pipeline_fp16(self): torch.cuda.reset_peak_memory_stats() model_id = "CompVis/stable-diffusion-v1-4" - pipe = StableDiffusionPipeline.from_pretrained( - model_id, revision="fp16", torch_dtype=torch.float16, use_auth_token=True - ).to(torch_device) + pipe = StableDiffusionPipeline.from_pretrained(model_id, revision="fp16", torch_dtype=torch.float16).to( + torch_device + ) pipe.set_progress_bar_config(disable=None) prompt = "a photograph of an astronaut riding a horse" @@ -1258,7 +1258,6 @@ class PipelineTesterMixin(unittest.TestCase): pipe = StableDiffusionPipeline.from_pretrained( model_id, safety_checker=self.dummy_safety_checker, - use_auth_token=True, ) pipe.to(torch_device) pipe.set_progress_bar_config(disable=None) @@ -1291,7 +1290,6 @@ class PipelineTesterMixin(unittest.TestCase): pipe = StableDiffusionImg2ImgPipeline.from_pretrained( model_id, safety_checker=self.dummy_safety_checker, - use_auth_token=True, ) pipe.to(torch_device) pipe.set_progress_bar_config(disable=None) @@ -1335,7 +1333,6 @@ class PipelineTesterMixin(unittest.TestCase): model_id, scheduler=lms, safety_checker=self.dummy_safety_checker, - use_auth_token=True, ) pipe.to(torch_device) pipe.set_progress_bar_config(disable=None) @@ -1379,7 +1376,6 @@ class PipelineTesterMixin(unittest.TestCase): pipe = StableDiffusionInpaintPipeline.from_pretrained( model_id, safety_checker=self.dummy_safety_checker, - use_auth_token=True, ) pipe.to(torch_device) pipe.set_progress_bar_config(disable=None) @@ -1426,7 +1422,6 @@ class PipelineTesterMixin(unittest.TestCase): model_id, scheduler=lms, safety_checker=self.dummy_safety_checker, - use_auth_token=True, ) pipe.to(torch_device) pipe.set_progress_bar_config(disable=None) @@ -1452,7 +1447,7 @@ class PipelineTesterMixin(unittest.TestCase): @slow def test_stable_diffusion_onnx(self): sd_pipe = StableDiffusionOnnxPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", revision="onnx", provider="CPUExecutionProvider", use_auth_token=True + "CompVis/stable-diffusion-v1-4", revision="onnx", provider="CPUExecutionProvider" ) prompt = "A painting of a squirrel eating a burger" @@ -1487,7 +1482,7 @@ class PipelineTesterMixin(unittest.TestCase): test_callback_fn.has_been_called = False pipe = StableDiffusionPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", use_auth_token=True, revision="fp16", torch_dtype=torch.float16 + "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16 ) pipe.to(torch_device) pipe.set_progress_bar_config(disable=None) @@ -1533,7 +1528,7 @@ class PipelineTesterMixin(unittest.TestCase): init_image = init_image.resize((768, 512)) pipe = StableDiffusionImg2ImgPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", use_auth_token=True, revision="fp16", torch_dtype=torch.float16 + "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16 ) pipe.to(torch_device) pipe.set_progress_bar_config(disable=None) @@ -1586,7 +1581,7 @@ class PipelineTesterMixin(unittest.TestCase): ) pipe = StableDiffusionInpaintPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", use_auth_token=True, revision="fp16", torch_dtype=torch.float16 + "CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16 ) pipe.to(torch_device) pipe.set_progress_bar_config(disable=None) @@ -1629,7 +1624,7 @@ class PipelineTesterMixin(unittest.TestCase): test_callback_fn.has_been_called = False pipe = StableDiffusionOnnxPipeline.from_pretrained( - "CompVis/stable-diffusion-v1-4", use_auth_token=True, revision="onnx", provider="CPUExecutionProvider" + "CompVis/stable-diffusion-v1-4", revision="onnx", provider="CPUExecutionProvider" ) pipe.set_progress_bar_config(disable=None)