-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError #5
Comments
Move dream.py from scripts to main folder , one step higher in folder structure, so its nexxt to main,py |
Hopefully 1blackbar's solution will work. Python running on Windows is a little mysterious to me. @DrakeFruit, if you have the chance, could you also try opening dream.py in Notepad and remove the very first line which starts with #!/usr/bin/env python? This is a Linux thing and may be confusing the Windows interpreter. |
This is happening to me too. Running Running I don't work with Python much but I'm pretty sure that when you run a script, it's only supposed to add the directory of the script to the pythonpath, not the current directory, so I'm surprised the scripts/ setup works at all. From what I gather you're supposed to do something like this with a setup like that: import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..')) Adding that to the top of dream.py does seem to fix it. |
thanks, I did everything you all suggested and was confused why it wasn't working, turns out that simplet2i was actually missing somehow. |
Thanks! I'll try that. What bothers me is that neither the txt2img or
img2img scripts have an incantation like this and they seem to work fine.
Also, I did an install on a virgin Windows 10 machine and did not encounter
this problem. I wish it were reproducible!
Lincoln
On Fri, Aug 19, 2022 at 4:09 PM Sam Green ***@***.***> wrote:
This is happening to me too. Running python ./scripts/txt2img.py --prompt
x works fine in the original repo, but python ./scripts/dream.py throws
this error unless I move it out into the main directory. Removing the
shebangs didn't help.
Running python -m scripts.dream seems to work though.
I don't work with Python much but I'm pretty sure that when you run a
script, it's only supposed to add the directory of the script to the
pythonpath, not the current directory, so I'm surprised the scripts/ setup
works at all. From what I gather you're supposed to do something like this
with a setup like that:
import sysimport ossys.path.append(os.path.join(os.path.dirname(__file__), '..'))
Adding that to the top of dream.py does seem to fix it.
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3EVPMTX7TO4BVXRXU7S3VZ7SYXANCNFSM5674UWAA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
--
Written on my cell phone. Anything that seems odd is the fault of
auto-correct.
|
Fix install issues, README instructions should work out-of-the-box now
Fix install issues, README instructions should work out-of-the-box now
Traceback (most recent call last):
File "scripts/dream.py", line 277, in
main()
File "scripts/dream.py", line 39, in main
from ldm.simplet2i import T2I
ModuleNotFoundError: No module named 'ldm.simplet2i'
I get this error on run and ive followed the proper instructions, im not sure what to do here.
The text was updated successfully, but these errors were encountered: