Skip to content

Conversation

m-gallus
Copy link

@m-gallus m-gallus commented Aug 5, 2025

This change updates transformers version in requirements.txt
Newest version contains a check which prevents the error:

AttributeError: module 'torch.distributed' has no attribute 'is_initialized'

when used with PyTorch with ROCm on Windows build.

Newest version contains a version check which prevents error: AttributeError: module 'torch.distributed' has no attribute 'is_initialized'
when used with PyTorch with ROCm on Windows.
@m-gallus m-gallus changed the title Update transformers version in requirements.txt Fix AttributeError: module 'torch.distributed' has no attribute 'is_initialized' on PyTorch with AMD cards on Windows Aug 5, 2025
@m-gallus m-gallus changed the title Fix AttributeError: module 'torch.distributed' has no attribute 'is_initialized' on PyTorch with AMD cards on Windows [AMD][Windows] Fix AttributeError: module 'torch.distributed' has no attribute 'is_initialized' on PyTorch with AMD cards on Windows Aug 12, 2025
@Kosinkadink Kosinkadink added the AMD Issue related to AMD driver support. label Aug 13, 2025
Bump transformers version to 4.55.3 where bugfix for no distributed module on Windows is fixed
@m-gallus m-gallus requested a review from guill as a code owner August 21, 2025 21:26
@m-gallus
Copy link
Author

Could somebody enable the workflows for this PR please?

@m-gallus m-gallus changed the title [AMD][Windows] Fix AttributeError: module 'torch.distributed' has no attribute 'is_initialized' on PyTorch with AMD cards on Windows [Don't merge][AMD][Windows] Fix AttributeError: module 'torch.distributed' has no attribute 'is_initialized' on PyTorch with AMD cards on Windows Aug 25, 2025
@m-gallus m-gallus changed the title [Don't merge][AMD][Windows] Fix AttributeError: module 'torch.distributed' has no attribute 'is_initialized' on PyTorch with AMD cards on Windows [AMD][Windows] Fix AttributeError: module 'torch.distributed' has no attribute 'is_initialized' on PyTorch with AMD cards on Windows Sep 1, 2025
@m-gallus
Copy link
Author

m-gallus commented Sep 1, 2025

The fix is available in the newest release of transformers. I've updated the requirements.txt accordingly.
Awaiting your review @guill @Kosinkadink @christian-byrne.

@m-gallus
Copy link
Author

Hey guys. Could somebody launch the workflows please?

@m-gallus
Copy link
Author

Thank you for running the workflows. It seems like these have passed successfully. Are there any more tests/checks that need to go through to make sure this change can be accepted?

@Kosinkadink
Copy link
Collaborator

I talked with comfy just now, and I don't think we will be merging this PR. If someone were to run requirements.txt today on a clean install, they would get the latest version of transformers which would have this bug fix in there.

Typically, the version would only be bumped if a new model comes out that requires the features of that version. pytorch+ROCm isn't 'officially' supported on windows just yet, so we won't be bumping the version right now. I apologize that no one has looked into giving a proper response to you so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AMD Issue related to AMD driver support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants