fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

ModuleNotFoundError: No module named 'py3d_tools'

Open riottrade opened this issue 2 years ago • 44 comments

Hi,

Running Deforum extension in your notebook. Image generation and everything works fine but when trying to generate animation I get this error : ModuleNotFoundError: No module named 'py3d_tools' Not sure how to fix this.

And also Open Image Directory don't work in whole notebook - text2image and image2image

Screenshot 2022-11-05 at 16 40 17

riottrade avatar Nov 05 '22 15:11 riottrade

Create a new cell and run this code :

import sys
%cd /content
!git clone https://github.com/MSFTserver/pytorch3d-lite.git
sys.path.append('./pytorch3d-lite')

see if it works so I'll add it to the notebook

TheLastBen avatar Nov 05 '22 16:11 TheLastBen

Didn't fix it. Same error. I updated Deforum and the rest of notebook runs smooth. Took me a while I restarted run time. I put the cell here :

Screenshot 2022-11-05 at 17 38 20 Screenshot 2022-11-05 at 17 37 30

riottrade avatar Nov 05 '22 16:11 riottrade

I added the Deforum extensions through webui and updated it.

riottrade avatar Nov 05 '22 17:11 riottrade

I'll try to find a solution

TheLastBen avatar Nov 06 '22 04:11 TheLastBen

Thx a lot. Adding this module to Requirments List didn’t help. Need to kick of those animations :)

riottrade avatar Nov 06 '22 15:11 riottrade

how did you install the extension ? by copying the script or through A1111 webui installer

TheLastBen avatar Nov 06 '22 15:11 TheLastBen

Throgh the webui installer.

riottrade avatar Nov 06 '22 19:11 riottrade

fixed https://github.com/TheLastBen/fast-stable-diffusion/commit/6caa960f9c59e2a6e61a98e73cee26974b062e0f

TheLastBen avatar Nov 06 '22 22:11 TheLastBen

Will try it tomorrow. So now I just need to update the repo?

riottrade avatar Nov 06 '22 23:11 riottrade

no need to update the repo

TheLastBen avatar Nov 06 '22 23:11 TheLastBen

Afraid I still get the same result. module missing. I updated Deforum script. The cell you asked me to add is still there though..shall I try removing it? this one : import sys %cd /content !git clone https://github.com/MSFTserver/pytorch3d-lite.git sys.path.append('./pytorch3d-lite')

riottrade avatar Nov 07 '22 14:11 riottrade

did you update the colab to latest version ?

TheLastBen avatar Nov 07 '22 14:11 TheLastBen

to make that precise...your notebook or Deforum script dowloaded through webui ?

riottrade avatar Nov 07 '22 14:11 riottrade

I updated the repo but I need to copy the collab again to my drive I think. Will do that. Is there a way to save my styles saved on notebook?

Screenshot 2022-11-07 at 15 32 48

riottrade avatar Nov 07 '22 14:11 riottrade

If you don't want to refresh the collab, just copy the code from the "requirements" cell from the new notebook to your notebook

TheLastBen avatar Nov 07 '22 14:11 TheLastBen

Thank you Sir! It worked this time. Got first trial animation out just know. Respect!

riottrade avatar Nov 07 '22 20:11 riottrade

Great !

TheLastBen avatar Nov 07 '22 21:11 TheLastBen

I am having the same error: ModuleNotFoundError: No module named 'py3d_tools'

What do I need to update exactly?

DJTcode avatar Nov 16 '22 20:11 DJTcode

use the latest colab : https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

TheLastBen avatar Nov 16 '22 21:11 TheLastBen

I still get the error.

DJTcode avatar Nov 17 '22 00:11 DJTcode

I'll check if something changed

TheLastBen avatar Nov 17 '22 04:11 TheLastBen

When installing the requirements, in my google drive the deforum path is:

/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/

but the requirements in the notebook check for this path:

/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum/

Could this be anything to do with my issue? I've already redownloaded the sd repository.

DJTcode avatar Nov 17 '22 22:11 DJTcode

that must be it, the folder has changed, I'll fix it

TheLastBen avatar Nov 17 '22 22:11 TheLastBen

I did a superficial fix, can you show the folder structure of the directory "deforum_helpers"

TheLastBen avatar Nov 17 '22 22:11 TheLastBen

Screenshot 2022-11-17 at 22 39 19

DJTcode avatar Nov 17 '22 22:11 DJTcode

Ok, the fix https://github.com/TheLastBen/fast-stable-diffusion/commit/bc3dddebfaef8cc970ac2fdea1030e211958471c should work

TheLastBen avatar Nov 18 '22 00:11 TheLastBen

I have the same obstacle; I even deleted the SD folder and started from scratch.

ModuleNotFoundError: No module named 'py3d_tools' Time taken: 0.21sTorch active/reserved: 2069/2082 MiB, Sys VRAM: 3102/40537 MiB (7.65%)

yarabsahel avatar Nov 19 '22 12:11 yarabsahel

You are just amazing. I getting this erorr over and over so then I found this topic. I'll try it today and try to contribute here!

cerarslan avatar Nov 20 '22 08:11 cerarslan

There is an if statement in the requirements:

if os.path.exists('/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum/src/infer.py'):

Change the path to:

if os.path.exists('/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/src/infer.py'):

DJTcode avatar Nov 20 '22 13:11 DJTcode

I guess I forgot to change that part

TheLastBen avatar Nov 20 '22 13:11 TheLastBen