Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion diffsynth/utils/xfuser/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .xdit_context_parallel import usp_attn_forward, usp_dit_forward, usp_vace_forward, get_sequence_parallel_world_size, initialize_usp, get_current_chunk, gather_all_chunks
from .xdit_context_parallel import usp_attn_forward, usp_dit_forward, usp_vace_forward, get_sequence_parallel_world_size, get_sequence_parallel_rank, get_sp_group, initialize_usp, get_current_chunk, gather_all_chunks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The import line is extremely long (over 210 characters), which violates PEP 8 recommendations (maximum line length of 79 characters) and makes the code harder to read and maintain. Wrapping the imported names in parentheses allows them to be cleanly formatted across multiple lines.

Suggested change
from .xdit_context_parallel import usp_attn_forward, usp_dit_forward, usp_vace_forward, get_sequence_parallel_world_size, get_sequence_parallel_rank, get_sp_group, initialize_usp, get_current_chunk, gather_all_chunks
from .xdit_context_parallel import (
usp_attn_forward,
usp_dit_forward,
usp_vace_forward,
get_sequence_parallel_world_size,
get_sequence_parallel_rank,
get_sp_group,
initialize_usp,
get_current_chunk,
gather_all_chunks,
)
References
  1. PEP 8 recommends limiting all lines to a maximum of 79 characters and using parentheses for multi-line imports. (link)