Thursday, March 16, 2023

Colab : ImportError cannot import name 'rank_zero_only' from 'pytorch_lightning.utilities.distributed' (Stable Diffusion WebUI related) AI生成圖片Colab偵錯

When I am trying to use Colab for stable diffusion ,
I met error below today :

ImportError cannot import name 'rank_zero_only' from 'pytorch_lightning.utilities.distributed'


After searching , I got the answer finally from here.

Changed From : from pytorch_lightning.utilities.distributed import rank_zero_only 


To : from pytorch_lightning.utilities.rank_zero import rank_zero_only 


Before Run , remember to downgrade !pip install pydantic==1.10.11





So I updated the line 20 in file ddpm.py as indicated in debug log, and the issue is resolved. 




No comments:

Post a Comment

Next year SF migration plan : moving out customer account to AWS , and call SF data with service account

 👀 The most challenging part is about those function with user verification. My service cloud with MIAW chat , nearly redo due to the user ...