AbdullahAlfaraj / Auto-Photoshop-StableDiffusion-Plugin

A user-friendly plug-in that makes it easy to generate stable diffusion images inside Photoshop using either Automatic or ComfyUI as a backend.
MIT License
6.82k stars 508 forks source link

"click" dependencies can't be installed #399

Open MegaVaha opened 1 year ago

MegaVaha commented 1 year ago

Good day to you, Abdullah!

Thank you for plugin! I trying to install it to friend with my Automatic1111, but...

My problem begins from step 3: "build the plugin by transpiling typescript to javascript: npm run watch" When in cmd I launched "npm run watch" - it begins to work, but seem to me - it's not completed, because the cursor is blinking till this time and dont react to any of my pressed buttons. Here the copypaste of cmd window:

c:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin>npm run watch

> auto-photoshop-stable-diffusion-plugin@1.3.3 watch
> npx webpack --config ./build-script/webpack.config.js --watch --devtool eval-source-map

asset bundle.js 5.26 MiB [emitted] (name: bundle)
runtime modules 1.29 KiB 7 modules
cacheable modules 1.86 MiB
  modules by path ./typescripts/ 476 KiB 62 modules
  modules by path ./node_modules/ 1.38 MiB 55 modules
  modules by path ./icon/*.svg 14.9 KiB
    ./icon/move_to_canvas.svg 4.43 KiB [built] [code generated]
    ./icon/pen.svg 2.04 KiB [built] [code generated]
    ./icon/preview.svg 6.84 KiB [built] [code generated]
    ./icon/search_button.svg 1.56 KiB [built] [code generated]
external "fs" 42 bytes [built] [code generated]
external "uxp" 42 bytes [built] [code generated]
external "photoshop" 42 bytes [built] [code generated]
webpack 5.82.1 compiled successfully in 8527 ms

after "webpack 5.82.1 compiled successfully in 8527 ms" in the next line there's blinking cursor.

Ok, I decided go ahead even is, as seems to me, something wrong with uncompleted state of "npm run watch".

In your step-by-step tuto here the 4'th step: "4. run "start_server.bat" inside "Auto-Photoshop-StableDiffusion-Plugin" directory"

But I cant found start_server.bat: there is the "deprecated-do-not-use-start_server.bat" Ok, I launched it. It began to collect dependencies and after some work I got the error:

ERROR: Cannot install -r requirements.txt (line 22), -r requirements.txt (line 26) and click==8.1.3 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested click==8.1.3
    uvicorn 0.20.0 depends on click>=7.0
    duckduckgo-search 3.9.3 depends on click>=8.1.7

Then, batch continued itself:

C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin>cd ./server/python_server

C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server\python_server>echo python path: "C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server_env\Scripts\Python.exe"
python path: "C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server_env\Scripts\Python.exe"

C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server\python_server>dir
 Том в устройстве C имеет метку SYS
 Серийный номер тома: C286-D8EF

 Содержимое папки C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server\python_server

15.10.2023  14:30    <DIR>          .
15.10.2023  14:30    <DIR>          ..
15.10.2023  14:30             4 568 global_state.py
15.10.2023  14:30             6 192 img2imgapi.py
15.10.2023  14:30    <DIR>          init_images
15.10.2023  14:30             3 094 metadata_to_json.py
15.10.2023  14:30    <DIR>          output
15.10.2023  14:30             1 981 prompt_shortcut - Copy.json
15.10.2023  14:30             1 963 prompt_shortcut.py
15.10.2023  14:30               650 search.py
15.10.2023  14:30             1 918 serverHelper.py
15.10.2023  14:30            17 409 serverMain.py
               8 файлов         37 775 байт
               4 папок  83 153 559 552 байт свободно

C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server\python_server>echo "C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server_env\Scripts\Python.exe" uvicorn serverMain:app --reload
"C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server_env\Scripts\Python.exe" uvicorn serverMain:app --reload

C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server\python_server>"C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server_env\Scripts\Python.exe" -m uvicorn serverMain:app --reload
C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server_env\Scripts\python.exe: No module named uvicorn

C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server\python_server>pause
Для продолжения нажмите любую клавишу . . .

C:\AI_SD\Auto-Photoshop-StableDiffusion-Plugin\server\python_server>pause
Для продолжения нажмите любую клавишу . . .

And exited.

My questions is:

  1. Am I right to run "deprecated-do-not-use-start_server.bat" instead "start_server.bat"? I dont found "start_server.bat", so randomly found "deprecated-do-not-use-start_server.bat" and decided to run it.
  2. What I need to do with installing conflicted versions of "click"? Because the "uvicorn" havent installed ("python.exe: No module named uvicorn")

Please, help me?

PS: FYI: when installing Automatic1111 I've installed Python 3.10.11 - so its my current version.

AbdullahAlfaraj commented 1 year ago

image There are three commands, "watch", "build", and "publish".

"build": Transforms your TypeScript code into JavaScript. It’s a one-time thing.

"watch": Just like “build”, but it keeps an eye on any code changes and runs non-stop.

"publish": Kinda like “build”, but it gets your code ready for production. you will use them like this: npm run command_name

I would recommend you use either method 1 (.ccx) or method 2 (.zip) The documentation for Method 3 has been outdated: you can read more about it here: https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin/issues/341