Skip to content

Commit 75e665b

Browse files
Apply suggestions from code review
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
1 parent 73b1d5d commit 75e665b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/diffusers/models/modeling_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,21 +1425,21 @@ class name matches will be compiled.
14251425
`_no_split_modules`.
14261426
14271427
Once discovered, each matching sub-module is compiled by calling
1428-
``submodule.compile(*args, **kwargs)``. Any positional or keyword
1429-
arguments you supply to :meth:`compile_repeated_blocks` are forwarded
1428+
`submodule.compile(*args, **kwargs)`. Any positional or keyword
1429+
arguments you supply to `compile_repeated_blocks` are forwarded
14301430
verbatim to `torch.compile`.
14311431
"""
14321432
repeated_blocks = getattr(self, "_repeated_blocks", None)
14331433

14341434
if not repeated_blocks:
1435-
logger.warning("_repeated_blocks attribute is empty. Using _no_split_modules to find compile regions.")
1435+
logger.warning("`_repeated_blocks` attribute is empty. Using `_no_split_modules` to find compile regions.")
14361436

14371437
repeated_blocks = getattr(self, "_no_split_modules", None)
14381438

14391439
if not repeated_blocks:
14401440
raise ValueError(
1441-
"Both _repeated_blocks and _no_split_modules attribute are empty. "
1442-
"Set _repeated_blocks for the model to benefit from faster compilation. "
1441+
"Both `_repeated_blocks` and `_no_split_modules` attribute are empty. "
1442+
"Set `_repeated_blocks` for the model to benefit from faster compilation. "
14431443
)
14441444

14451445
has_compiled_region = False

0 commit comments

Comments
 (0)