Closed if-ai closed 1 year ago
I have an idea why it's happening
the webui and its extensions are stored in different folders, so they have different sys.path
the webui stays in GColab directly, whereas the extension is stored on GDrive
The hard part may be to get the drive name (e.g 'MyDrive') correctly, but I'll try to come up with a solution
Yes, that looks like it is the issue. Thank you.
On Thu, 22 Dec 2022, 14:56 kabachuha, @.***> wrote:
I have an idea why it's happening
the webui and its extensions are stored in different folders, so they have different sys.path
the webui stays in GColab directly, whereas the extension is stored on GDrive
The hard part may be to get the drive name (e.g 'MyDrive') correctly, but I'll try to come up with a solution
— Reply to this email directly, view it on GitHub https://github.com/deforum-art/deforum-for-automatic1111-webui/issues/163#issuecomment-1362935953, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUFQXR2NSYBNOT5IIHRBTWORTYPANCNFSM6AAAAAATGTMQ5Q . You are receiving this because you authored the thread.Message ID: @.*** com>
Try it now
It must be another thing cos' I have the same error and I already updated and check I have the new file as you can see
@jvoxel add
print(sys.path)
print(os.getcwd())
on top of the file just after import sys, os and message that it will output
okay here is the new msg
['/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui', '/content/gdrive/MyDrive/sd/stablediffusion/src/k-diffusion', '/usr/local/lib/python3.8/dist-packages/git/ext/gitdb', '/content/gdrive/MyDrive/sd/stable-diffusion-webui', '/content/gdrive/MyDrive/sd/stable-diffusion-webui', '/env/python', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages', '/usr/local/lib/python3.8/dist-packages/IPython/extensions', '/content/gdrive/MyDrive/sd/stablediffusion', '/content/gdrive/MyDrive/sd/stablediffusion/src/taming-transformers', '/content/gdrive/MyDrive/sd/stablediffusion/src/codeformer', '/content/gdrive/MyDrive/sd/stablediffusion/src/blip', '/usr/local/lib/python3.8/dist-packages/gitdb/ext/smmap', '/tmp/tmp8365kq47']
/content/gdrive/MyDrive/sd/stablediffusion
Error loading script: deforum.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 195, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
exec(compiled, module.__dict__)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum.py", line 20, in <module>
import deforum_helpers.args as deforum_args
ModuleNotFoundError: No module named 'deforum_helpers'
Hmm
/content/gdrive/MyDrive/sd/stablediffusion
the environment is named stablediffusion
here for some reason instead of stable-diffusion-webui
but the path above are still pointing to '/content/gdrive/MyDrive/sd/stable-diffusion-webui'
And if you comment out the check for colab (also removing the spaces in front of .append line), so the path will be appended anyway?
I have to go to bed, sorry but I will try that tomorrow thank you.
I deleted the whole SD folder from my drive and started again had the same problem then commented out the append Colab lines had the same problem then moved the extensions folder into the stablediffusion folder now is showing on gradio I am going to try render something thanks
Same for me
I desisted of using the colab because now I have tensor size errors and a message of two cuda etc.. I don't know what is going on. I think is lastTBen's must have misconfigured something, it was working well a week ago
This causes an error on local as well. Its bunk and we need to fix this. I literally cloned the repo and it killed deforum for me. :SAD:
Installing from the extension tab fixed it....
Simply cloning it created the error. So my suggestion to you, is that you install Deforum for webui in webui extension tab.
change these lines to fix it
import deforum_helpers.args as deforum_args import deforum_helpers.settings as deforum_settings
to
import scripts.deforum_helpers.args as deforum_args import scripts.deforum_helpers.settings as deforum_settings
see if that fixes colab issues. Cant test it on my end. But it worked to fix that error on local install
I will try tomorrow thx mate
I had the same problem, so I used this and it worked perfectly (also fixes the Dreambooth error): !pip install git+https://github.com/huggingface/transformers and !pip install git+https://github.com/huggingface/diffusers
import scripts.deforum_helpers.args as deforum_args import scripts.deforum_helpers.settings as deforum_settings
This worked for me - thanks @Funofabot
working like a charm!!! thanks a lot @kabachuha
Hi! Good thing this issue remains open. Even after the detach fix with the following change:
import scripts.deforum_helpers.args as deforum_args import scripts.deforum_helpers.settings as deforum_settings
It still showes that error on Colab. The pip install of transformers and diffusers didn't work as well (tbh I can't see how these are related to the sys.path issue)
@kabachuha you are correct that it's weird to have two folders created, I can see that in my drive:
Some scripts are there instead of in /stable-diffusion-webui:
Anyways, to make Deforum tab appear in Colab, I had to add these to the script before the import:
sys.path.append("/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts") sys.path.append("/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers")
Main deforum stuff
import scripts.deforum_helpers.args as deforum_args ...
Now the Deforum tab shows in Colab and it renders without issues. Thanks!
Seems like all got it working. If needed please open a new issue. Closing.
Hi I am having this error when running on Colab