-
Notifications
You must be signed in to change notification settings - Fork 14
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
Error: No name 'rank_zero_only' in module 'pytorch_lightning.utilities.distributed' #4
Comments
Thank you for this that fix it |
I have the same error, how can I fix it ? |
Error occurred when executing LDSRUpscaler: cannot import name '_is_local_file_protocol' from 'lightning_fabric.utilities.cloud_io' (F:\ComfyUI_windows_portable\python_embeded\lib\site-packages\lightning_fabric\utilities\cloud_io.py) File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 154, in recursive_execute |
You can change the line 19 in the file I hope it works for you. |
this should definitely be updated in repo |
work, thx so much |
Looks like rank_zero_only was moved in the version of pytorch I'm running. I was able to patch my copy to the new location and it's working fine for me. phind.com details below:
I'm getting this message during compilation:
Pylint(E0611:no-name-in-module https://pylint.readthedocs.io/en/latest/user_guide/messages/error/no-name-in-module.html) Error: No name 'rank_zero_only' in module 'pytorch_lightning.utilities.distributed'
Related to this line in
d:\hal\stable-diffusion\StabilityMatrix\Packages\ComfyUI\custom_nodes\ComfyUI-Flowty-LDSR\ldsrlib\ldm\models\diffusion\ddpm.py
:The error message you're encountering indicates that the
rank_zero_only
function cannot be found within thepytorch_lightning.utilities.distributed
module. This could be due to changes in the PyTorch Lightning library where the function was moved or renamed.To resolve this issue, you should check the current version of PyTorch Lightning that you're using and look for the updated location or name of the
rank_zero_only
function. Since the documentation link provided is not working and there's no direct information about the change, you can try importingrank_zero_only
frompytorch_lightning.utilities
instead, as shown below:If this does not work, you may need to consult the latest PyTorch Lightning documentation or source code to find the new location of the
rank_zero_only
function. It's also possible that you might need to update your PyTorch Lightning version if the function has been moved in a newer release.The text was updated successfully, but these errors were encountered: