Skip to content

[docs] minor cleanups in the lora docs. #11770

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

sayakpaul
Copy link
Member

What does this PR do?

  • Fix docstrings examples.
  • Add missing docstrings.
  • Organize the position of the methods and properties.

@sayakpaul sayakpaul requested a review from stevhliu June 23, 2025 02:34
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning up 🧼

adapter_names (`Union[List[str], str]`):
The names of the adapter to delete. Can be a single string or a list of strings
The names (single string or list of strings) of the adapter to delete.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The names (single string or list of strings) of the adapter to delete.
The names of the adapters to delete.

Args:
Deletes the LoRA layers of `adapter_name` for the unet and text-encoder(s).
adapter_names (`Union[List[str], str]`):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
adapter_names (`Union[List[str], str]`):
adapter_names (`List[str]` or `str`):

Comment on lines +948 to +951
"""Enables the possibility to hotswap LoRA adapters.

Calling this method is only required when hotswapping adapters and if the model is compiled or if the ranks of
the loaded adapters differ.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""Enables the possibility to hotswap LoRA adapters.
Calling this method is only required when hotswapping adapters and if the model is compiled or if the ranks of
the loaded adapters differ.
"""
Hotswap adapters without triggering recompilation of a model or if the ranks of the loaded adapters are different.

Comment on lines +957 to +958
How to handle the case when the model is already compiled, which should generally be avoided. The
options are:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
How to handle the case when the model is already compiled, which should generally be avoided. The
options are:
How to handle a model that is already compiled. The check can return the following messages:

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