Repository: AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin Branch: master Commit: 6f6d4907adf0 Files: 149 Total size: 1.9 MB Directory structure: gitextract_gqg6c0_w/ ├── .gitignore ├── .prettierignore ├── .prettierrc ├── LICENSE.md ├── README.md ├── build-script/ │ ├── pack-ccx.mjs │ └── webpack.config.js ├── deprecated-do-not-use-start_server.bat ├── deprecated-do-not-use-start_server.sh ├── deprecated-do-not-use-start_server_MacOS.sh ├── deprecated-do-not-use-update_plugin.bat ├── deprecated-do-not-use-update_plugin.sh ├── dialog_box.js ├── docs/ │ └── Home.md ├── enum.js ├── helper.js ├── i18n/ │ └── zh_CN/ │ ├── ps-plugin.json │ └── sd-official.json ├── index.html ├── index.js ├── install.py ├── manifest.json ├── package.json ├── presets/ │ ├── ctrlnet_inpaint.json │ ├── ctrlnet_inpaint_tile.json │ ├── ctrlnet_outpaint.json │ ├── default.json │ ├── img2img.json │ ├── inpaint.json │ └── outpaint.json ├── psapi.js ├── requirements.txt ├── scripts/ │ ├── main.py │ └── test.py ├── sdapi_py_re.js ├── selection.js ├── server/ │ └── python_server/ │ ├── global_state.py │ ├── img2imgapi.py │ ├── init_images/ │ │ └── .gitignore │ ├── metadata_to_json.py │ ├── output/ │ │ └── .gitignore │ ├── prompt_shortcut - Copy.json │ ├── prompt_shortcut.py │ ├── search.py │ ├── serverHelper.py │ └── serverMain.py ├── thumbnail.js ├── typescripts/ │ ├── @types/ │ │ ├── changedpi.d.ts │ │ ├── custom.d.ts │ │ ├── sdapi_py_re.d.ts │ │ └── uxp.d.ts │ ├── after_detailer/ │ │ ├── after_detailer.tsx │ │ ├── config.ts │ │ └── style/ │ │ └── after_detailer.css │ ├── comfyui/ │ │ ├── comfyapi.ts │ │ ├── comfyui.tsx │ │ ├── img2img_api.json │ │ ├── img2img_workflow.json │ │ ├── inpaint_api.json │ │ ├── inpaint_workflow.json │ │ ├── main_ui.tsx │ │ ├── native_workflows/ │ │ │ ├── IPAdapter_simple_api.json │ │ │ ├── IPAdapter_weighted_api.json │ │ │ ├── animatediff_lcm_api.json │ │ │ ├── animatediff_simple_api.json │ │ │ ├── real_time_lcm_img2img_api.json │ │ │ ├── real_time_lcm_sketching_api.json │ │ │ ├── real_time_lcm_txt2img_api.json │ │ │ ├── sdxl_turbo_txt2img_api.json │ │ │ └── zoom_out_api.json │ │ ├── txt2img_api.json │ │ ├── txt2img_workflow.json │ │ └── util.ts │ ├── controlnet/ │ │ ├── ControlNetTab.tsx │ │ ├── ControlNetUnit.tsx │ │ ├── entry.ts │ │ ├── main.tsx │ │ ├── store.ts │ │ └── util.tsx │ ├── entry.ts │ ├── extra_page/ │ │ └── extra_page.tsx │ ├── globalstore.ts │ ├── history/ │ │ └── history.tsx │ ├── image_search/ │ │ └── image_search.tsx │ ├── lexical/ │ │ └── lexical.tsx │ ├── locale/ │ │ ├── locale-for-old-html.ts │ │ └── locale.ts │ ├── main/ │ │ └── astore.ts │ ├── multiTextarea.tsx │ ├── one_button_prompt/ │ │ └── one_button_prompt.tsx │ ├── preset/ │ │ ├── preset.tsx │ │ └── shared_ui_preset.ts │ ├── sam/ │ │ └── sam.tsx │ ├── sd_tab/ │ │ ├── sd_tab.tsx │ │ └── util.ts │ ├── session/ │ │ ├── generate.tsx │ │ ├── modes.ts │ │ ├── progress.ts │ │ ├── session.ts │ │ ├── session_store.ts │ │ └── style/ │ │ └── generate.css │ ├── settings/ │ │ ├── settings.tsx │ │ └── vae.tsx │ ├── stores.ts │ ├── tool_bar/ │ │ ├── style/ │ │ │ └── tool_bar.css │ │ └── tool_bar.tsx │ ├── tsconfig.json │ ├── ultimate_sd_upscaler/ │ │ ├── config.ts │ │ ├── scripts.tsx │ │ └── ultimate_sd_upscaler.tsx │ ├── util/ │ │ ├── collapsible.tsx │ │ ├── elements.tsx │ │ ├── errorBoundary.tsx │ │ ├── grid.tsx │ │ ├── logger.ts │ │ ├── oldSystem.tsx │ │ └── ts/ │ │ ├── api.ts │ │ ├── document.ts │ │ ├── enum.ts │ │ ├── general.ts │ │ ├── io.ts │ │ ├── layer.ts │ │ ├── sdapi.ts │ │ ├── selection.ts │ │ └── ui_ts.ts │ └── viewer/ │ ├── preview.tsx │ ├── style/ │ │ └── preview.css │ ├── viewer.tsx │ └── viewer_util.ts └── utility/ ├── api.js ├── dummy.js ├── general.js ├── html_manip.js ├── io.js ├── layer.js ├── notification.js ├── online_data.json ├── presets/ │ └── controlnet_preset.js ├── sampler.js ├── sd_scripts/ │ └── horde.js ├── sdapi/ │ ├── config.js │ ├── horde_native.js │ ├── options.js │ ├── prompt_shortcut.js │ └── python_replacement.js ├── session.js ├── tab/ │ ├── image_search_tab.js │ └── settings.js └── tips.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ **/__pycache__ env /server_env /tmp /outputs /log /.idea /.vscode /.git /.github test.bat server/python_server/output/* server/python_server/init_images/* node_modules/ server/python_server/prompt_shortcut.json experimental/ start_server.sh start_server.bat *.ccx *.zip expanded_mask.png original_mask.png /config /jimp/* !/jimp/browser/ /jimp/browser/examples /jimp/browser/*.md /jimp/browser/*.editorconfig /jimp/browser/lib/jimp.js # comments when packaging (include in the package,uxp packager will use .gitignore to ignore files): */dist/*LICENSE.txt */dist/*.bundle.js typescripts/dist ================================================ FILE: .prettierignore ================================================ server/python_server/output/* *.md manifest.json jimp/** server_env/** .github\workflows\wiki-sync-action.yml **/dist .github\workflows\wiki-sync-action.yml tsconfig.json ================================================ FILE: .prettierrc ================================================ { "trailingComma": "es5", "tabWidth": 4, "semi": false, "singleQuote": true } ================================================ FILE: LICENSE.md ================================================ MIT License Copyright (c) 2022 Abdullah Alfaraj Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Auto-Photoshop-StableDiffusion-Plugin [](https://www.patreon.com/AbdullahAlfaraj) [![discord badge]][discord link] [discord badge]: https://flat.badgen.net/discord/members/3mVEtrddXJ [discord link]: https://discord.gg/3mVEtrddXJ 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 - [Auto-Photoshop-StableDiffusion-Plugin](#auto-photoshop-stablediffusion-plugin) - [Table of Contents](#table-of-contents) - [Demo:](#demo) - [Support Us On Patreon](#support-us-on-patreon) - [How to Install](#how-to-install) - [Method 1: One Click Installer](#method-1-one-click-installer) - [Method 2: The Unzip Method](#method-2-the-unzip-method) - [Method 3: The UXP Method (for Developers/Programmers Only)](#method-3-the-uxp-method-instruction-for-developers) - [FAQ and Known Issues](#faq-and-known-issues) - [What Photoshop version do I need to run the plugin?](#what-photoshop-version-do-i-need-to-run-the-plugin) - [Path Doesn't Exist](#path-doesnt-exist) - [Plugin Load Failed](#plugin-load-failed) - [No application are connected to the service](#no-application-are-connected-to-the-service) - [Load command failed in App with ID PS and Version X.X.X](#load-command-failed-in-app-with-id-ps-and-version-xxx) - [Exception in ASGI application / Expecting value: line 1 column 1](#exception-in-asgi-application--expecting-value-line-1-column-1) - [No Generations and Plugin Server doesn't send messages. (Remote setup)](#no-generations-and-plugin-server-doesnt-send-messages-remote-setup) - [No GPU Options](#no-gpu-options) - [Stable Horde](#stable-horde) - [Colab](#colab) # Support Us On Patreon: By supporting us on [Patreon](https://www.patreon.com/AbdullahAlfaraj), 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:
![]() |
|||
| Ronny Khalil | zachary | Razvan Matei | MasterAI |
| 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 |
| que0005 | Xavier Matia Bernasconi | Mats Oldin | Rodrigo Terra | Nicolas Meunier | Ihor Pankin |
| Amith Thomas | xiao yuan | Ezra Blake | Kevin Schofield | Mvs Srs | Felipe Cortes | Smith | Sanchez |
| Ziui Witter |
| Sebastian Karbowniczek | Petter Lundh | AWWalker | cdmusic | Jason Bessonette | 22two |
For artists we recommend you use [the one click installer](#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
```
2) open cmd window in the "Auto-Photoshop-StableDiffusion-Plugin" directory and then install the dependencies by typing:
```
npm install
```
3) build the plugin by transpiling typescript to javascript:
```
npm run watch
```
4) run "start_server.bat" inside "Auto-Photoshop-StableDiffusion-Plugin" directory
5) go to where you have [automatic1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) 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.
6) run photoshop. go to edit -> prefrences -> plugins
1) make sure you check "Enable Developer Mode" checkbox
7) install "Adobe UXP Developer Tool" from here [Installation (adobe.com)](https://developer.adobe.com/photoshop/uxp/devtool/installation/)
this tool will add the plugin into photoshop
8) 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"
9) 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](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)](https://developer.adobe.com/photoshop/uxp/devtool/installation/)
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:
[](https://youtu.be/VL_gbQai79E "Stable diffusion AI Photoshop Plugin Free and Open Source")
# 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](https://github.com/db0/AI-Horde)
## Colab:
we link to this [Colab](https://colab.research.google.com/drive/1nbcx_WOneRmYv9idBO33pN5CbxXrqZHu?usp=sharing#scrollTo=Y4ebYsPqTrGb) 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.
================================================
FILE: build-script/pack-ccx.mjs
================================================
import chalk from 'chalk'
import { program } from 'commander'
import { createWriteStream, readFileSync, statSync, writeFileSync } from 'fs'
import { globSync } from 'glob'
import { dirname, join, relative } from 'path'
import { fileURLToPath } from 'url'
import yazl from 'yazl'
const __dirname = dirname(fileURLToPath(import.meta.url))
const basePath = join(__dirname, '..')
program.requiredOption('--version