Git Product home page Git Product logo

Comments (5)

1blackbar avatar 1blackbar commented on May 15, 2024

Move dream.py from scripts to main folder , one step higher in folder structure, so its nexxt to main,py
IMO thats should be default structure for windows version
If that wont work move all files from script sfolder to where main.py is
That solved this error for me

from invokeai.

lstein avatar lstein commented on May 15, 2024

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.

from invokeai.

green-s avatar green-s commented on May 15, 2024

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 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.

from invokeai.

DrakeFruit avatar DrakeFruit commented on May 15, 2024

thanks, I did everything you all suggested and was confused why it wasn't working, turns out that simplet2i was actually missing somehow.

from invokeai.

lstein avatar lstein commented on May 15, 2024

from invokeai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.