Coder Social home page Coder Social logo

abdullahalfaraj / auto-photoshop-stablediffusion-plugin Goto Github PK

View Code? Open in Web Editor NEW
6.3K 71.0 470.0 20 MB

A user-friendly plug-in that makes it easy to generate stable diffusion images inside Photoshop using either Automatic or ComfyUI as a backend.

License: MIT License

JavaScript 31.79% HTML 4.98% Python 3.80% Batchfile 0.09% Shell 0.14% TypeScript 59.10% CSS 0.11%
ai art automatic1111 photoshop plugin stable-diffusion ai-art comfy comfyui comfyui-manager

auto-photoshop-stablediffusion-plugin's Introduction

Auto-Photoshop-StableDiffusion-Plugin

Become a Patron! discord badge

With Auto-Photoshop-StableDiffusion-Plugin, you can directly use the capabilities of Automatic1111 Stable Diffusion in Photoshop without switching between programs. This allows you to easily use Stable Diffusion AI in a familiar environment. You can edit your Stable Diffusion image with all your favorite tools and save it right in Photoshop.

Table of Contents

Support Us On Patreon:

By supporting us on Patreon, you’ll help us continue to develop and improve the Auto-Photoshop-StableDiffusion-Plugin, making it even easier for you to use Stable Diffusion AI in a familiar environment. As a supporter, you’ll have the opportunity to provide feedback and suggestions for future development. Plus, you’ll get early access to new features and tutorials, as well as exclusive art tutorials and tips from a professional artist. We’re passionate about making AI approachable to artists and with your help, we can continue to do just that.

Auto-Photoshop-SD Backers and Sponsors:

💎 Diamond

Ronny Khalil zachary Razvan Matei MasterAI
Ronny Khalil zachary Razvan Matei MasterAI

🥇 Gold

Alex Olivier Lefebvre Arthur Liu Florin-Alexandru Ilinescu Zenko Juan Pablo Mendiola Robin Edwards Frederic Dreuilhe
Alex Olivier Lefebvre Arthur Liu Florin-Alexandru Ilinescu Zenko Juan Pablo Mendiola Robin Edwards Frederic Dreuilhe
Danny Sahagun darius coal Kerwin The Dread Vixen Alinsa Bruce Hunter Chris Canterbury Lawrence L Tran Jake Skokan
Danny Sahagun darius coal Kerwin The Dread Vixen Alinsa Bruce Hunter Chris Canterbury Lawrence L Tran Jake Skokan
que0005 Xavier Matia Bernasconi Mats Oldin Rodrigo Terra Nicolas Meunier Ihor Pankin
que0005 Xavier Matia Bernasconi Mats Oldin Rodrigo Terra Nicolas Meunier Ihor Pankin

🥈 Silver

Amith Thomas xiao yuan Ezra Blake Kevin Schofield Mvs Srs Felipe Cortes Smith Sanchez
Amith Thomas xiao yuan Ezra Blake Kevin Schofield Mvs Srs Felipe Cortes Smith Sanchez
Ziui Witter
Ziui Witter

🥉 Copper

Sebastian Karbowniczek Petter Lundh AWWalker cdmusic Jason Bessonette 22two
Sebastian Karbowniczek Petter Lundh AWWalker cdmusic Jason Bessonette 22two

How To Install:

Use method 1 or 2 if you are an Artist use method 3 if you are a Developer/Programmer

Method 1: One Click Installer

  1. Download the .ccx file
  2. run the ccx file . that's all. you will be able to use all of stable diffusion modes (txt2img, img2img, inpainting and outpainting), check the tutorials section to master the tool.

install_plugin_1

  1. (Don't skip) Install the Auto-Photoshop-SD Extension from Automatic1111 extension tab. The extension will allow you to use mask expansion and mask blur, which are necessary for achieving good results when outpainting and inpainting.
  • a) Copy Auto-Photoshop plugin url copy_githup_url_2

  • b) Paste the url in auto1111's extension tab and click install

install_extension_3

  • c) Make sure the Auto-Photoshop plugin is listed, then click "Apply and Restart UI"

apply_and_restart_4

Method 2: The Unzip Method

  1. Download the .zip file
  2. Unzip it in a folder with the same name
  3. move the unzipped folder to the Photoshop Plugin folder
  4. (Don't skip) Install the Auto-Photoshop-SD Extension from Automatic1111 extension tab. The extension will allow you to use mask expansion and mask blur, which are necessary for achieving good results when outpainting and inpainting.
  • a) Copy Auto-Photoshop plugin url image

Method 3: The UXP method (Instruction for Developers):

For artists we recommend you use the one click installer. If you are a developer Watch the any of these videos or follow the instruction bellow.

For artists we recommend you use the one click installer

First time running the plugin (local Automatic1111):

  1. download the plugin:
git clone https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin.git
  1. open cmd window in the "Auto-Photoshop-StableDiffusion-Plugin" directory and then install the dependencies by typing:
npm install
  1. build the plugin by transpiling typescript to javascript:
npm run watch
  1. run "start_server.bat" inside "Auto-Photoshop-StableDiffusion-Plugin" directory
  2. go to where you have automatic1111 installed. Edit the "webui-user.bat" in automatic1111 change this line
set COMMANDLINE_ARGS= 

to

set COMMANDLINE_ARGS= --api

that will allow the plugin to communicate with the automatic1111 project. After saving close the "webui-user.bat" file and run it normally.

  1. run photoshop. go to edit -> prefrences -> plugins
    1. make sure you check "Enable Developer Mode" checkbox
  2. install "Adobe UXP Developer Tool" from here Installation (adobe.com) this tool will add the plugin into photoshop
  3. run Adobe UXP Developer Tool and click on "Add Plugin" button in the top right. Navigate to where you have "Auto-Photoshop-StableDiffusion-Plugin" folder and open "manifest.json"
  4. select the plugin and click on Actions -> Load Selected that's it.

First time running the plugin (remote Automatic1111):

The remote webui must also have --api set in COMMANDLINE_ARGS. You can check if api access is enabled by appending "/docs#" to the end of the url. If the documentation includes /sdapi/v1/samplers then api access is enabled.

  1. download the plugin:
git clone https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin.git
  1. edit start_server.bat (or start_server.sh if on linux) to point to the remote installation of Automatic1111
  2. run "start_server.bat" inside "Auto-Photoshop-StableDiffusion-Plugin" directory
  3. run photoshop. go to edit -> prefrences -> plugins
    1. make sure you check "Enable Developer Mode" checkbox
  4. install "Adobe UXP Developer Tool" from here Installation (adobe.com) this tool will add the plugin into photoshop
  5. run Adobe UXP Developer Tool and click on "Add Plugin" button in the top right. Navigate to where you have "Auto-Photoshop-StableDiffusion-Plugin" folder and open "manifest.json"
  6. select the plugin and click on Actions -> Load Selected that's it.

Demo:

Click Here to Watch Demo

FAQ and Known Issues

What Photoshop version do I need to run the plugin?

The minimum Photoshop version that the plugin supports is Photoshop v24

Plugin Load Failed

There are a few issues that can result in this error, please follow the instructions for the corresponding error message in the UDT logs

No application are connected to the service

This error occurs when Photoshop is not started before the plugin is attempted to be loaded. Simply start photoshop then restart UXP and load the plugin

Exception in ASGI application / Expecting value: line 1 column 1

This error occurs due to mismatched expectations between the plugin and the Automatic1111 backend. It can be solved by both updating the version of the Automatic111 backend to the latest verion, and making sure "Save text information about generation parameters as chunks to png files" setting is enabled within the UI.

No Generations and Plugin Server doesn't send messages. (Remote setup)

This error occurs when the remote server does not have the api enabled. You can verify this by attempting to go to the URL you access the webui at and appending "/docs#" to the end of the url. If you have permissions, make relaunch the remote instance with the "--api" flag.

No GPU Options:

we provide two options to use the auto-photoshp plugin without GPU.

Stable Horde

This is an awesome free crowdsourced distributed cluster of Stable Diffusion workers. If you like this service, consider joining the horde yourself! the horde is enabled completely by the generosity of volunteers so make sure you don't overwhelm the service and help join the cause if you can. read more on their GitHub page

Colab:

we link to this Colab directly inside plugin find it in the settings tab. you only need to run it. no need to change any of the settings. copy the gradio.live url the colab will generate and paste it into sd url field in the settings tab.

auto-photoshop-stablediffusion-plugin's People

Contributors

abdullahalfaraj avatar adunato avatar alinsavix avatar amir167 avatar anson2048 avatar bing-su avatar conlanpatrek avatar deedy5 avatar eltociear avatar evvfebruary avatar infinitay avatar kyxsune avatar megachomba avatar mkhichain avatar puplakto avatar sphuff avatar xiaoxiaojiangyun avatar zombieyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto-photoshop-stablediffusion-plugin's Issues

hi res not working

The hi res option does not work in txt2img.
Using photoshop 2023.
webui latest version

Feature request - Metadata saved inside smart object layer. Model, Seed, steps, cfg and sampler.

As every new generated image/layer is created as a smart object inside photoshop it is possible to save metadata for it individually.
Double clicking a smart object opens it as a PSB file in Photoshop, this makes it possible to put metadata in it that you can access by pressing Command+Option+Shift+I (Mac) or Ctrl+Alt+Shift+I (Windows) or in the menu File--> File Info. When you close the layer it will ask you to save it and it will be embedded inside the master photoshop file.

One could probably make function/macro that could extract this info from a layer and populate the plug-in with it's settings.
It would also be very good if the plug-in could have a selectable History tab/list for previously generated metadata in case you want to replicate what you have done.
What it could save would at bare minimum be: Model, Seed, steps, cfg and sampler. Perhaps even Mask blur and size?

Clicking refresh does not doing anything

The plugin is looking great! I am excited to start using it. I already have SD 1.5 so I followed the youtube tutorial and everything installed fine. The cats load and I added the URL of SD but when I click refresh 'A' remains red. P is green. Not sure what the issue is. I even removed / from the URL.

Plugin Load Failed.

"Plugin Load Failed.
No applications are connected to the service. Make sure the target application is running and connected to the service."

Adobe_UXP_Developer_Tool_2022-12-21_13-17-13

Any idea?

Error while generating the picture

Got the plugin installed, but when trying to generate image getting below error. I've API enabled, can access the docs page in the url.
The server is on a nw machine, and I've set the SD url to the proper link.

INFO: Will watch for changes in these directories: ['E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server\python_server']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [10248] using WatchFiles
INFO: Started server process [13932]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: 127.0.0.1:62709 - "POST /sdapi/v1/interrupt HTTP/1.1" 404 Not Found
txt2ImgHandle:

payload: {}
INFO: 127.0.0.1:62709 - "POST /txt2img/ HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 419, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\applications.py", line 270, in call
await super().call(scope, receive, send)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\applications.py", line 124, in call
await self.middleware_stack(scope, receive, send)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, _send)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call
raise exc
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in call
raise e
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\routing.py", line 706, in call
await route.handle(scope, receive, send)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\routing.py", line 235, in app
raw_response = await run_endpoint_function(
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\routing.py", line 161, in run_endpoint_function
return await dependant.call(**values)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server\python_server.\serverMain.py", line 159, in txt2ImgHandle
dir_name,image_paths,metadata = await txt2ImgRequest(payload)
File "E:\Stable-Diffusion-Gits\Auto-Photoshop-StableDiffusion-Plugin\server\python_server.\serverMain.py", line 26, in txt2ImgRequest
if(payload['use_prompt_shortcut']): # use edit prompt
KeyError: 'use_prompt_shortcut'

Disable "sessions" checkbox feature or smarter selection *request

1.Would be great to maybe have optional behavior where generated images are not placed into session groups
or
2. If nothing is selected have it select current layer area (ctrl+left click on layer) + after generation is done deselect everything (ctrl+d)

My main issue is you need to make too many actions after generation to clean up layers and groups (deselect then press delete)

How to generate my first Image

After I click to install the box and select it, click to generate no response. No image appears next to it. It shows that a new group has been created
QQ截图20230226213556

An attempt was made to access a socket in a way forbidden by its access permissions

Getting this error when running "start_server.bat"

(sdps) C:\Users\rossf\Documents\Auto1111testing\Auto-Photoshop-StableDiffusion-Plugin\server\python_server>"C:\Users\rossf\Documents\Auto1111testing\Auto-Photoshop-StableDiffusion-Plugin\server_env\Scripts\Python.exe" -m uvicorn serverMain:app --reload
←[32mINFO←[0m: Will watch for changes in these directories: ['C:\Users\rossf\Documents\Auto1111testing\Auto-Photoshop-StableDiffusion-Plugin\server\python_server']
←[31mERROR←[0m: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

ERROR: Exception in ASGI application

After following the quick test instructions I do not see the cat test image.

Looking at cmd I see the following:
INFO: 127.0.0.1:53512 - "POST /txt2img/ HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application

raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Looking at Anaconda (miniconda) where I have ran webui-user.bat I see the following:
raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for PNGInfoResponse
info
none is not an allowed value (type=type_error.none.not_allowed)

set COMMANDLINE_ARGS=--api getting error

I edit the window batch file with the line: set COMMANDLINE_ARGS=--api, so that I could use the plugin but doesn't work. How could I fix it?

Here is the result after I add the command line
Installing requirements for Web UI
Launching Web UI with arguments: --api
usage: launch.py [-h] [--config CONFIG] [--ckpt CKPT] [--ckpt-dir CKPT_DIR] [--gfpgan-dir GFPGAN_DIR]
[--gfpgan-model GFPGAN_MODEL] [--no-half] [--no-progressbar-hiding]
[--max-batch-count MAX_BATCH_COUNT] [--embeddings-dir EMBEDDINGS_DIR] [--allow-code] [--medvram]
[--lowvram] [--always-batch-cond-uncond] [--unload-gfpgan] [--precision {full,autocast}] [--share]
[--codeformer-models-path CODEFORMER_MODELS_PATH] [--gfpgan-models-path GFPGAN_MODELS_PATH]
[--esrgan-models-path ESRGAN_MODELS_PATH] [--bsrgan-models-path BSRGAN_MODELS_PATH]
[--realesrgan-models-path REALESRGAN_MODELS_PATH] [--scunet-models-path SCUNET_MODELS_PATH]
[--swinir-models-path SWINIR_MODELS_PATH] [--ldsr-models-path LDSR_MODELS_PATH] [--xformers]
[--force-enable-xformers] [--deepdanbooru] [--opt-split-attention] [--disable-opt-split-attention]
[--opt-split-attention-v1]
[--use-cpu {SD,GFPGAN,BSRGAN,ESRGAN,SCUNet,CodeFormer} [{SD,GFPGAN,BSRGAN,ESRGAN,SCUNet,CodeFormer} ...]]
[--listen] [--port PORT] [--show-negative-prompt] [--ui-config-file UI_CONFIG_FILE]
[--hide-ui-dir-config] [--ui-settings-file UI_SETTINGS_FILE] [--gradio-debug]
[--gradio-auth GRADIO_AUTH] [--gradio-img2img-tool {color-sketch,editor}] [--opt-channelslast]
[--styles-file STYLES_FILE] [--autolaunch] [--use-textbox-seed] [--disable-console-progressbars]
[--enable-console-prompts] [--disable-safe-unpickle]
launch.py: error: unrecognized arguments: --api
Press any key to continue . . .

Failed to load image

version - v1.0.17 2771514

When attempting to img2img or inpaint getting this errors

payload: {'init_image_name': 'img_31_46791.png'}
exception:fail to read an image file ./init_images/img_31_46791.png, will try again 0 of 3
exception:fail to read an image file ./init_images/img_31_46791.png, will try again 1 of 3
exception:fail to read an image file ./init_images/img_31_46791.png, will try again 2 of 3
←[32mINFO←[0m: 127.0.0.1:52058 - "←[1mPOST /getInitImage/ HTTP/1.1←[0m" ←[32m200 OK←[0m

Known Issue: Uncaught class std bad_function_call

Known Issue:

Switching between tabs will sometime trigger uncaught class std bad_function_call error.
It doesn't seem to affect the plugin. I've traced the bug back to last update v1.0.11 - v1.0.12
it requires more investigation.

image

Start Server on a network?

The machine running photoshop has no development environment (e.g. python). How can I start the plugin server on the same machine as SD/Automatic1111 is running and then connect the plugin on the photoshop machine to that server?

I tried setting the SD parameter pointing to the SD machine, but it still does not generate anything.

SD checkpoints not showing up on plugin and getting 404 error

I am using Mac with Photoshop v24.1.0
I followed the instruction, and setup for a remote connection, but my SD checkpoints are not showing up on the plugin UI.
On pressing the Refresh button, I am getting this log

INFO:     127.0.0.1:54185 - "GET /sdapi/v1/sd-models HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:54186 - "GET /sdapi/v1/samplers HTTP/1.1" 404 Not Found

No crash happening in the code, just this log

RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'

I followed the installation instructions and got everything installed, but when I launch A1111 Web UI and enter a txt2img prompt, I receive RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' in the bottom right corner and it does not return any images.

I am on Windows 10 with an AMD GPU and using PS 2023.

image

Has anybody gotten this plugin to work in the Affinity suite? If not, what are the chances we get a release for the Affinity suite?

Unrelated, but I've been thinking about making the switch to a legal copy of the Affinity suite, since to be honest I don't feel comfortable using a pirated copy of the Adobe suite anymore nowadays, much less using generative software/plugins with it.

It is known that some Adobe plugins may or may not work in the Affinity suite (they'd be installed by extracting the contents of a .ccx file and then copying them). Has anyone tested this plugin with the Affinity suite yet? If not, what are the chances we get a port of this plugin in the Affinity suite?

404 Error

Hi there I am having issues with this plug in while trying to load in and generate images:

There is no sign of my models or samplers in the dash board.

And when I try to generate an image I get a 404 not found error.
Some odd things I am noticing, while I am using the default 7860 port for my local install, it seems to be referencing ports : 50803, 50804, 50805 in the error.
image

I have added the --api in the code of the webui-user.bat file.
image

And when I go to setting to change it to: http://127.0.0.1:7860 I make sure not to add a "/" at the end but still have the same issue.
image

Thank you!

exception:fail to read an image file

Hello,

I'm getting an exception when trying to "Set Init Image" in img2img.
Steps:

  • select img2img
  • select image in layer (ctrl click on layer)
  • Press "Set Init Image"

The issue seems to be in relation to the generation of the png in init_images folder as if I save it manually in such folder (same layer name) it works.

txt2img works fine.

image

Failed to load Plugin

I already tried to change the min version in the manifest.json to my version, but it doesn't work

Validate command failed in App with ID PS and Version 22.3.1
Plugin Load Failed.
Type is not convertible to string

Error: Exception in ASGI application; & json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Hi, after a long journey finally got everything installed with no errors, however when I test using the default "cute cat" I got following "Exception in ASGI application" I checked the other ASGI exception but seems we are facing the different problems:

�[32mINFO�[0m: Waiting for application startup.
�[32mINFO�[0m: Application startup complete.
txt2ImgHandle:

payload: {'prompt': 'cute cat', 'negative_prompt': '', 'steps': '20', 'sampler_index': 'Euler a', 'width': 512, 'height': 512, 'batch_size': '1', 'cfg_scale': 7, 'seed': '-1', 'mask_blur': 0, 'use_prompt_shortcut': True}
raw_keywords: []
strip_keywords: []
original_substrings: []
final text: cute cat
raw_keywords: []
strip_keywords: []
original_substrings: []
final text:
�[32mINFO�[0m: 127.0.0.1:49698 - "�[1mPOST /txt2img/ HTTP/1.1�[0m" �[91m500 Internal Server Error�[0m
�[31mERROR�[0m: Exception in ASGI application
Traceback (most recent call last):
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 419, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\applications.py", line 270, in call
await super().call(scope, receive, send)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\applications.py", line 124, in call
await self.middleware_stack(scope, receive, send)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, send)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call
raise exc
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in call
raise e
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\routing.py", line 706, in call
await route.handle(scope, receive, send)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\routing.py", line 235, in app
raw_response = await run_endpoint_function(
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\fastapi\routing.py", line 161, in run_endpoint_function
return await dependant.call(**values)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server\python_server.\serverMain.py", line 106, in txt2ImgHandle
dir_name,image_paths = await txt2ImgRequest(payload)
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server\python_server.\serverMain.py", line 36, in txt2ImgRequest
r = response.json()
File "D:_RandomDots\Auto-Photoshop-StableDiffusion-Plugin\server_env\lib\site-packages\httpx_models.py", line 751, in json
return jsonlib.loads(self.content.decode(encoding), **kwargs)
File "C:\Users\shiyi\AppData\Local\Programs\Python\Python310\lib\json_init
.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\shiyi\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\shiyi\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
�[32mINFO�[0m: 127.0.0.1:49705 - "�[1mGET /sdapi/v1/progress?skip_current_image=false HTTP/1.1�[0m" �[32m200 OK�[0m

Problems with img2img, inpaint and updating

Hello,
I am having an hard time doing img2img and inpaint. Videos and instructions don't seem to be correct, there is no way on my side to set the mask, the "set mask" button under "viewer" doesn't seem to work while "set init image" doesn't work every time as expected. Also, it's not clear what needs to be the mask and what the image, since the results, when I rarely happen to make it work, are unpredictable.

The plugin installs nicely through the CCX but updating with a pull seems to break it and make it disappear from the list of Photoshop plugins. What is the correct way to update it?

Thank you in advance and keep the good work.

setting init inpaint mask gives white square for the image

I was having issues with it working and found out there was an update. I unzipped the files into the same directory and changed the file again for the correct version of PS (24.1.0). Whenever I hit init inpaint mask, if you look at the thumbnails, it creates the mask in the correct way, but the image it's running from is blank. When I generate it will run but the result is also a white square. There are no errors under the cmd window. It will also generate txt2img fine. I also tried the quick png test and it works. Even the plugin says its loaded correctly. Everything was working until earlier today when it started closing my files when I ran it and then I started getting the white box.

raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The plugin has been loaded successfully and AUTOMATIC1111 works correctly. But getting JSONDecodeError when clicking "generate" inside photoshop

image

`txt2ImgHandle:

payload: {'prompt': 'cute cat, {painterly_style_1}', 'negative_prompt': '{ugly}', 'steps': '20', 'sampler_index': 'Euler a', 'width': 512, 'height': 512, 'enable_hr': False, 'firstphase_width': 512, 'firstphase_height': 512, 'denoising_strength': 0.7000000000000001, 'batch_size': '1', 'cfg_scale': 7, 'seed': '-1', 'mask_blur': 7, 'use_prompt_shortcut': False, 'prompt_shortcut_ui_dict': {}, 'uniqueDocumentId': '0e8459b0-0a66-4bad-b245-e9f7e992beab', 'mode': 'txt2img'}
�[32mINFO�[0m: 127.0.0.1:51171 - "�[1mPOST /txt2img/ HTTP/1.1�[0m" �[91m500 Internal Server Error�[0m
�[31mERROR�[0m: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 419, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\fastapi\applications.py", line 270, in call
await super().call(scope, receive, send)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\starlette\applications.py", line 124, in call
await self.middleware_stack(scope, receive, send)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, send)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call
raise exc
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in call
raise e
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\starlette\routing.py", line 706, in call
await route.handle(scope, receive, send)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\fastapi\routing.py", line 235, in app
raw_response = await run_endpoint_function(
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\fastapi\routing.py", line 161, in run_endpoint_function
return await dependant.call(**values)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server\python_server.\serverMain.py", line 157, in txt2ImgHandle
dir_name,image_paths,metadata = await txt2ImgRequest(payload)
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server\python_server.\serverMain.py", line 38, in txt2ImgRequest
r = response.json()
File "C:\Users\Administrator\Downloads\Auto-Photoshop-StableDiffusion-Plugin-master\Auto-Photoshop-StableDiffusion-Plugin-master\server_env\lib\site-packages\httpx_models.py", line 752, in json
return jsonlib.loads(self.text, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json_init
.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
�[32mINFO�[0m: 127.0.0.1:51174 - "�[1mGET /sdapi/v1/progress?skip_current_image=false HTTP/1.1�[0m" �[32m200 OK�[0m`

Errors installing

Hi - using Studio M1 Mac I can't seem to get passed the install process.

williamhenderson@Williams-Mac-Studio ~ % git clone https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin.git
Cloning into 'Auto-Photoshop-StableDiffusion-Plugin'...
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 75 (delta 31), reused 50 (delta 19), pack-reused 0
Receiving objects: 100% (75/75), 46.51 KiB | 835.00 KiB/s, done.
Resolving deltas: 100% (31/31), done.
williamhenderson@Williams-Mac-Studio ~ % cd ~/Auto-Photoshop-StableDiffusion-Plugin/
williamhenderson@Williams-Mac-Studio Auto-Photoshop-StableDiffusion-Plugin % sh start_server.sh
start_server.sh: line 6: python: command not found
start_server.sh: line 7: ./server_env/bin/activate: No such file or directory
williamhenderson@Williams-Mac-Studio Auto-Photoshop-StableDiffusion-Plugin % sh start_server.bat
start_server.bat: line 1: @Rem: command not found
does server_env exist
start_server.bat: line 4: syntax error near unexpected token (' start_server.bat: line 4: if exist server_env\ ('

Am I doing something wrong here? BTW - starting with the bat file instead of trying to run the sh file doesn't make a difference.

Any advice would be appreciated. Love what you've created here!

Disappearance of the picture

The image is generated, briefly shown on the canvas in Photoshop, but then disappears. In this case, only the selection area remains on the selected layer.

347638

The system cannot find the path specified.

I am trying to run Stable diffusion from a remote gradio/cloudflare sever but when running the start_server.bat command, it gives an error. Here's a screenshot:
image

What am I doing wrong?

UnSupported value for the permission 'localFileSystem'

when i try to load the plugin on dev tool it says "Plugin auto.photoshop.stable.diffusion.plugin : UnSupported value for the permission 'localFileSystem'. Supported values are 'read', 'plugin' & 'fullAccess'."

what should i do?

Plugin does not show "Init Inpaint Mask" button

Running 1.1.0, I follow the instructions for outpaint, but the "Init Inpaint Mask" button does not show up, "Set init image" only shows in the Viewer tab, but I believe this is not the same as the button that is supposed to show in the main tab.

Running photoshop 14.1 and automatic1111 webui pulled today on macos ventura 13.1

export with png info

It would be incredibly helpful to have the prompt, seed, etc stored into the png when exported to remember the parameters used.

Quick Guide on server and plugin setup for remote servers

To set up the plugin and server for connecting to remote instances of Automatic111's api, you have to make a few changes to the codebase. Effectively, all that must be done is changing the url/host that is expected for both the server and plugin to a suitable remote location. Then the install can be done as normal.

Therefore, in the following files simply find and replace all instances of 127.0.0.1:7860 with <desired host url>:7860:

  • server/python_server/serverMain.py
  • server/python_server/img2imgapi.py
  • sdapi.js

it is important that any url accessing port 8000 be left alone these are meant to be part of the clients server and file handling.

I tested this setup with a headless remote server and a windows client using wsl2 for the server.

Settings and inpaint question

hi, I have two questions.

The first question is, the SD url of settings will be restored to "127.0.0.1:7860" every time I reopen it, I want to keep a specific URL, so I don't need to re-enter it every time I reopen it, what should I do?

The second problem is that inpaint mode, every time I finish calculating the picture, after clicking the check or cross button, the white mask layer I drew will be deleted. Can I keep my layers at this stage? I would like to use it to create a mask to remove the background so that I can quickly remove the background from a new layer created with AI.

English is not my native language, so please forgive me if it is not clear. Thank you for making such a great tool.

macOS

Will Photoshop for macOS be supported?

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.