Skip to content

Conversation

@sayakpaul
Copy link
Member

What does this PR do?

Removes repetitive code for checks and uses a function instead. As a result:

53 additions and 249 deletions.

@sayakpaul sayakpaul requested a review from hlky April 10, 2025 08:54
Copy link
Contributor

@hlky hlky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple comments, LGTM other than that, thanks @sayakpaul

Comment on lines +684 to +688
if "text_encoder" in self.pipeline_class._lora_loadable_modules:
self.assertTrue(
check_if_lora_correctly_set(pipe_from_pretrained.text_encoder),
"Lora not correctly set in text encoder",
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one's a bit different as we're not going to be passing any config. So, we can leave it.

@sayakpaul sayakpaul requested a review from hlky April 10, 2025 10:13
@sayakpaul sayakpaul merged commit ea5a6a8 into main Apr 10, 2025
3 checks passed
@sayakpaul sayakpaul deleted the cleanup-lora-tests-utils branch April 10, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants