-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[LoRA] allow big CUDA tests to run properly for LoRA (and others) #9845
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
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
8696fbb
allow big lora tests to run on the CI.
sayakpaul 06b3919
print
sayakpaul b062bd9
print.
sayakpaul 360935c
print
sayakpaul 1d1248a
print
sayakpaul f5550e3
print
sayakpaul 4cd5a3c
print
sayakpaul a901420
more
sayakpaul d659f1c
print
sayakpaul 96d27ff
remove print.
sayakpaul 8510f98
remove print
sayakpaul 9fe7b91
directly place on cuda.
sayakpaul 286af0e
remove pipeline.
sayakpaul 741a44f
remove
sayakpaul e818907
fix
sayakpaul 3ed98a1
fix
sayakpaul 9124f28
spaces
sayakpaul a938831
quality
sayakpaul bd94852
updates
sayakpaul 1760419
directly place flux controlnet pipeline on cuda.
sayakpaul 021f0de
torch_device instead of cuda.
sayakpaul ee662cf
style
sayakpaul c46331f
device placement.
sayakpaul ad4d7a7
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 207579b
fixes
sayakpaul 7f27d2d
fixes
sayakpaul 876dfdb
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 1740d83
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 48c3bd3
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 295315c
add big gpu marker for mochi; rename test correctly
a-r-r-o-w 704392a
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 77cfc79
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 75e3850
Merge branch 'main' into allow-flux-lora-tests
sayakpaul e10caf4
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 58b79f2
address feedback
sayakpaul c7a64b8
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 8b952cb
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 79ca87e
resolve conflicts.
sayakpaul 168aff7
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 008f34f
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 44db423
fix
sayakpaul 50e59dc
Merge branch 'main' into allow-flux-lora-tests
sayakpaul f1ab9f3
resolve conflicts.
sayakpaul 03e11f1
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 2d2c972
Merge branch 'main' into allow-flux-lora-tests
sayakpaul 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -17,15 +17,17 @@ | |
import unittest | ||
|
||
import numpy as np | ||
import pytest | ||
import torch | ||
from transformers import AutoTokenizer, T5EncoderModel | ||
|
||
from diffusers import AutoencoderKLMochi, FlowMatchEulerDiscreteScheduler, MochiPipeline, MochiTransformer3DModel | ||
from diffusers.utils.testing_utils import ( | ||
enable_full_determinism, | ||
nightly, | ||
numpy_cosine_similarity_distance, | ||
require_big_gpu_with_torch_cuda, | ||
require_torch_gpu, | ||
slow, | ||
torch_device, | ||
) | ||
|
||
|
@@ -260,8 +262,10 @@ def test_vae_tiling(self, expected_diff_max: float = 0.2): | |
) | ||
|
||
|
||
@slow | ||
@nightly | ||
@require_torch_gpu | ||
@require_big_gpu_with_torch_cuda | ||
@pytest.mark.big_gpu_with_torch_cuda | ||
class MochiPipelineIntegrationTests(unittest.TestCase): | ||
prompt = "A painting of a squirrel eating a burger." | ||
|
||
|
@@ -293,7 +297,7 @@ def test_mochi(self): | |
).frames | ||
|
||
video = videos[0] | ||
expected_video = torch.randn(1, 16, 480, 848, 3).numpy() | ||
expected_video = torch.randn(1, 19, 480, 848, 3).numpy() | ||
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. Thanks for catching! |
||
|
||
max_diff = numpy_cosine_similarity_distance(video, expected_video) | ||
assert max_diff < 1e-3, f"Max diff is too high. got {video}" |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.