TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.41k stars 1.28k forks source link

ModuleNotFoundError: No module named 'py3d_tools' #399

Open riottrade opened 1 year ago

riottrade commented 1 year ago

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
TheLastBen commented 1 year ago

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

riottrade commented 1 year ago

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 commented 1 year ago

I added the Deforum extensions through webui and updated it.

TheLastBen commented 1 year ago

I'll try to find a solution

riottrade commented 1 year ago

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

TheLastBen commented 1 year ago

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

riottrade commented 1 year ago

Throgh the webui installer.

TheLastBen commented 1 year ago

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

riottrade commented 1 year ago

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

TheLastBen commented 1 year ago

no need to update the repo

riottrade commented 1 year ago

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')

TheLastBen commented 1 year ago

did you update the colab to latest version ?

riottrade commented 1 year ago

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

riottrade commented 1 year ago

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
TheLastBen commented 1 year ago

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

riottrade commented 1 year ago

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

TheLastBen commented 1 year ago

Great !

DJTcode commented 1 year ago

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

What do I need to update exactly?

TheLastBen commented 1 year ago

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

DJTcode commented 1 year ago

I still get the error.

TheLastBen commented 1 year ago

I'll check if something changed

DJTcode commented 1 year ago

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.

TheLastBen commented 1 year ago

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

TheLastBen commented 1 year ago

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

DJTcode commented 1 year ago
Screenshot 2022-11-17 at 22 39 19
TheLastBen commented 1 year ago

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

yarabsahel commented 1 year ago

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%)

cerarslan commented 1 year ago

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!

DJTcode commented 1 year ago

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'):

TheLastBen commented 1 year ago

I guess I forgot to change that part

riottrade commented 1 year ago

I guess I forgot to change that part

Should we redownload the notebook?

TheLastBen commented 1 year ago

Yes

yarabsahel commented 1 year ago

Yes

Thanks, it works now:) I wish you the best.

yarabsahel commented 1 year ago

I got this new error msg: RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 24 but got size 23 for tensor number 1 in the list.

Time taken: 0.29sTorch active/reserved: 2384/2588 MiB, Sys VRAM: 4296/40537 MiB (10.6%)

Update: The error comeback again after a fresh install of the script ModuleNotFoundError: No module named 'py3d_tools'

Time taken: 0.17sTorch active/reserved: 2236/2252 MiB, Sys VRAM: 3272/40537 MiB (8.07%)

TheLastBen commented 1 year ago

after every fresh install, you will need to run the requirements cell

yarabsahel commented 1 year ago

after every fresh install, you will need to run the requirements cell

Thank you

TheLastBen commented 1 year ago

RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 24 but got size 23 for tensor number 1 in the list.

I don't think this error is related the the installation, more likely with the settings

yarabsahel commented 1 year ago

RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 24 but got size 23 for tensor number 1 in the list.

I don't think this error is related the the installation, more likely with the settings

Thanks, it works now, much appreciated:)

riottrade commented 1 year ago

Is there a way to save styles you saved in notebook? Fresh install erases them...or just copy somewhere and paste to freshly installed one?

TheLastBen commented 1 year ago

copy somewhere and paste to freshly installed one?

that's the best solution

riottrade commented 1 year ago

Thanks a lot! Wanted to ask about Stable Diffusion V2. Does it have to be added to notebook from your side to download automaticaly during the load up?

TheLastBen commented 1 year ago

I'm working on reshaping the colab to support the V2, should be ready in a few hours

riottrade commented 1 year ago

Legend! Thanks for your hard work. Will check here and twitter dor updates. It seems to be quite an update!

cerarslan commented 1 year ago

I'm working on reshaping the colab to support the V2, should be ready in a few hours

Omg! As I said before u are just amazing! Thx for everything.

cerarslan commented 1 year ago

I get same error again 😪. Anyone can explain step by step? :(

riottrade commented 1 year ago

I believe you need to re-download since Ben updated collab for Stable V2...and possibly update Deforum extension. My guess.

cerarslan commented 1 year ago

I believe you need to re-download since Ben updated collab for Stable V2...and possibly update Deforum extension. My guess.

Not working :/