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. 




Migrating from Renpy to Godot

 Due to the limitation of renpy in rendering dynamic screen ,  due the the black border it gives in different UI scale resolution , finally ...