-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diffusers: Simplified the README files. Updated CI tests. #1718
Open
imangohari1
wants to merge
8
commits into
huggingface:main
Choose a base branch
from
imangohari1:ig/stable-diff-readme-simple
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+94
−864
Open
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
18cd82e
fea(): Simplified the stable diff readme files
imangohari1 1a7d999
fea(): simplified the training README. rebased to main
imangohari1 83f4b49
fixed the conflicts
imangohari1 02dce99
Trim diffusers readme samples (move legacy models to aux doc)
dsocek 5e55455
fea(): Updated diffuser tests for legacy models.
imangohari1 2c4e06e
minor fixes
imangohari1 01ee47b
update(diffusers): removed the legacy models from training readme
imangohari1 1ca19e1
Remove legacy examples from inference doc, fix links in main readme
dsocek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,14 @@ def check_8xhpu(test_case): | |
return pytest.mark.skipif(skip, reason="test requires 8xHPU multi-card system")(test_case) | ||
|
||
|
||
def legacy(test_case): | ||
""" | ||
Decorator skipping a test if it's old | ||
""" | ||
skip = os.environ.get("RUN_DIFFUSERS_LEGACY", "0") != "1" | ||
return pytest.mark.skipif(skip, reason="This test is for old/legacy mmodel. Skipped starting 1.16.0")(test_case) | ||
|
||
|
||
class GaudiPipelineUtilsTester(TestCase): | ||
""" | ||
Tests the features added on top of diffusers/pipeline_utils.py. | ||
|
@@ -622,6 +630,7 @@ def test_stable_diffusion_hpu_graphs(self): | |
self.assertEqual(images[-1].shape, (64, 64, 3)) | ||
|
||
@slow | ||
@legacy | ||
def test_no_throughput_regression_bf16(self): | ||
prompts = [ | ||
"An image of a squirrel in Picasso style", | ||
|
@@ -672,6 +681,7 @@ def test_no_throughput_regression_bf16(self): | |
|
||
@custom_bf16_ops | ||
@slow | ||
@legacy | ||
def test_no_throughput_regression_autocast(self): | ||
prompts = [ | ||
"An image of a squirrel in Picasso style", | ||
|
@@ -705,6 +715,7 @@ def test_no_throughput_regression_autocast(self): | |
|
||
@custom_bf16_ops | ||
@slow | ||
@legacy | ||
def test_no_generation_regression_ldm3d(self): | ||
prompts = [ | ||
"An image of a squirrel in Picasso style", | ||
|
@@ -795,6 +806,7 @@ def test_no_generation_regression_upscale(self): | |
|
||
@slow | ||
@check_8xhpu | ||
@legacy | ||
def test_sd_textual_inversion(self): | ||
path_to_script = ( | ||
Path(os.path.dirname(__file__)).parent | ||
|
@@ -2324,6 +2336,7 @@ def test_depth2img_pipeline_hpu_graphs(self): | |
assert images[0].shape == (32, 32, 3) | ||
|
||
@slow | ||
@legacy | ||
def test_depth2img_pipeline(self): | ||
gaudi_config = GaudiConfig(use_torch_autocast=True) | ||
model_name = "stabilityai/stable-diffusion-2-depth" | ||
|
@@ -2464,6 +2477,7 @@ def test_script_train_controlnet(self): | |
|
||
@slow | ||
@check_8xhpu | ||
@legacy | ||
def test_train_controlnet(self): | ||
with tempfile.TemporaryDirectory() as tmpdir: | ||
path_to_script = ( | ||
|
@@ -4879,6 +4893,7 @@ def test_inference_batch_single_identical(self): | |
super().test_inference_batch_single_identical(expected_max_diff=3e-3) | ||
|
||
@slow | ||
@legacy | ||
def test_stable_diffusion_inpaint_no_throughput_regression(self): | ||
"""Test that stable diffusion inpainting no throughput regression autocast""" | ||
|
||
|
@@ -5668,6 +5683,7 @@ def test_ddpmpipline_hpu_graphs(self): | |
self.assertEqual(np.array(images[-1]).shape, (256, 256, 3)) | ||
|
||
@slow | ||
@legacy | ||
def test_no_throughput_regression_bf16(self): | ||
batch_size = 16 # use batch size 16 as the baseline | ||
model_name = "google/ddpm-ema-celebahq-256" | ||
|
@@ -6009,6 +6025,7 @@ def test_flux_prompt_embeds(self): | |
@slow | ||
@check_gated_model_access("black-forest-labs/FLUX.1-dev") | ||
@pytest.mark.skipif(not IS_GAUDI2, reason="does not fit into Gaudi1 memory") | ||
@legacy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove legacy for this test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: 2c4e06e |
||
def test_flux_img2img_inference(self): | ||
repo_id = "black-forest-labs/FLUX.1-dev" | ||
image_path = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decorator used to skip tests for legacy models
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed: 2c4e06e