mut-ex / gligen-gui

An intuitive GUI for GLIGEN that uses ComfyUI in the backend
Other
2.02k stars 191 forks source link

Error: Could not import "'gligen_gui". #13

Closed ComBenn closed 9 months ago

ComBenn commented 9 months ago

If I run the command:

(venv) C:\Users\user\AppData\Roaming\StabilityMatrix\Packages\ComfyUI\gligen-gui>flask --app 'gligen_gui:create_app(8188)' run --port 5000

I get the following error message:

Usage: flask run [OPTIONS] Try 'flask run --help' for help.

Error: Could not import "'gligen_gui".

What can I do? All the other steps before this last step were sucessfull.

mut-ex commented 9 months ago

Do you have the gligen_gui folder in "C\Users\user\AppData\Roaming\StabilityMatrix\Packages\ComfyUI\gligen-gui"? Can you run "flask --version" and share what version of flask you are using?

On Sat, Feb 17, 2024 at 5:53 PM ComBenn @.***> wrote:

If I run the command:

(venv) C:\Users\user\AppData\Roaming\StabilityMatrix\Packages\ComfyUI\gligen-gui>flask --app 'gligen_gui:create_app(8188)' run --port 5000

I get the following error message:

Usage: flask run [OPTIONS] Try 'flask run --help' for help.

Error: Could not import "'gligen_gui".

What can I do? All the other steps before this last step were sucessfull.

— Reply to this email directly, view it on GitHub https://github.com/mut-ex/gligen-gui/issues/13, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFCH4PNIUVCGNEXQFNDWUUDYUE7HJAVCNFSM6AAAAABDNVO33KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2DANRWGA3TGNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ComBenn commented 9 months ago

Yes the gligen-gui folder is in this directory:

C:\Users\user\AppData\Roaming\StabilityMatrix\Packages\ComfyUI\gligen-gui

If I run "flask --version" I get the following back:

Python 3.10.0rc2 Flask 3.0.2 Werkzeug 3.0.1

Duecki1 commented 9 months ago

Please have a look at the other issues first, before posting one yourself. If you use Windows CMD you may find your solution there!

ComBenn commented 9 months ago

Ah sorry I looked through the issues in before but oversaw it despite having the same title.

But the proposed solution did not work.

The command

flask --app "gligen_gui:create_app(8188)" run --port 5000

gave back the same error message.

Duecki1 commented 9 months ago

I had the same error as you and it works now with the ". Where do you execute the command? Are you in the gligen-gui folder?

ComBenn commented 9 months ago

I had the same error as you and it works now with the ". Where do you execute the command? Are you in the gligen-gui folder?

Ok, this helped. Thank you!

Apparently the mistake I made was to go in the gligen-gui folder with the command .\venv\scripts\activate

The solution was to open the cmd directly in the gligen-gui folder without activating the environment beforehand. So the GUI works now fine for me and thanks to all of you.