Skip to content

Commit

Permalink
TST Use different diffusion model for testing (#2345)
Browse files Browse the repository at this point in the history
So far, tests are using hf-internal-testing/tiny-stable-diffusion-torch
for testing diffusion models. However, this model has some issues:

- still uses pickle (.bin) instead of safetensors
- there is a FutureWarning because of the config

Now, using hf-internal-testing/tiny-sd-pipe instead which doesn't have
those issues.
  • Loading branch information
BenjaminBossan authored Jan 28, 2025
1 parent 6e1a248 commit 7af5ade
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_scaling_set_to_zero(self, tokenizer):
assert torch.allclose(logits_base_model, logits_lora_model)

def test_diffusers_pipeline(self):
model_id = "hf-internal-testing/tiny-stable-diffusion-torch"
model_id = "hf-internal-testing/tiny-sd-pipe"
pipeline = StableDiffusionPipeline.from_pretrained(model_id)

text_encoder_kwargs = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_stablediffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from .testing_utils import temp_seed


PEFT_DIFFUSERS_SD_MODELS_TO_TEST = ["hf-internal-testing/tiny-stable-diffusion-torch"]
PEFT_DIFFUSERS_SD_MODELS_TO_TEST = ["hf-internal-testing/tiny-sd-pipe"]
CONFIG_TESTING_KWARGS = (
{
"text_encoder": {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tuners_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def test_maybe_include_all_linear_layers_internals(self, initial_target_modules,
assert new_config.target_modules == expected_target_modules

def test_maybe_include_all_linear_layers_diffusion(self):
model_id = "hf-internal-testing/tiny-stable-diffusion-torch"
model_id = "hf-internal-testing/tiny-sd-pipe"
model = StableDiffusionPipeline.from_pretrained(model_id)
config = LoraConfig(base_model_name_or_path=model_id, target_modules="all-linear")

Expand Down

0 comments on commit 7af5ade

Please sign in to comment.