Skip to content
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

Support For TPU/XLA Devices #5635

Closed
radna0 opened this issue Nov 16, 2024 · 4 comments
Closed

Support For TPU/XLA Devices #5635

radna0 opened this issue Nov 16, 2024 · 4 comments
Labels
Feature A new feature to add to ComfyUI.

Comments

@radna0
Copy link

radna0 commented Nov 16, 2024

Feature Idea

Support For TPU/XLA Devices

Existing Solutions

No response

Other

No response

@radna0 radna0 added the Feature A new feature to add to ComfyUI. label Nov 16, 2024
@gabriel-montrose
Copy link

It's good Idea. Now we have to do manual work to install Intel OneAPI, for windows VIsual Studio, set correct version pytorch... Exhausted. I am not sure that now it use shared GPU, where I have Intel UHD and Nvidia

@radna0
Copy link
Author

radna0 commented Nov 17, 2024

I'm experimenting to see if I can add support for TPU/XLA devices within the comfy code myself. If possible, I can try to open a PR to add support for it.

I don't know if there are configurations of TPUs with GPUs? As for shared TPUs, the most common way I see is with SPMD or FSDPv2. I believe you can also do that with XMP? but I haven't had much luck with it using TPUv2-8 or TPUv3-8.

Torch XLA: https://github.com/pytorch/xla
Guide: https://github.com/pytorch/xla/blob/master/API_GUIDE.md
SPMD: https://pytorch.org/xla/master/spmd.html
FSDPv2:pytorch/xla#6379

@radna0
Copy link
Author

radna0 commented Nov 17, 2024

hi @gabriel-montrose, I have just created a PR. #5657

@radna0
Copy link
Author

radna0 commented Dec 11, 2024

If anyone needs TPU/XLA devices support for ComfyUI please refer to my own fork ComfyUI-TPU. I shall maintain it as long as there's interest.

@radna0 radna0 closed this as completed Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature A new feature to add to ComfyUI.
Projects
None yet
Development

No branches or pull requests

2 participants