Table of Contents
Function introduction
Home Technology peripherals AI The open source Stable Diffusion plug-in for PS is here: one-click AI brain supplement, ready to install and use

The open source Stable Diffusion plug-in for PS is here: one-click AI brain supplement, ready to install and use

Apr 12, 2023 pm 01:37 PM
ai Open source

Stable Diffusion is a hot new technology in the AI ​​field this year. Thanks to the open source spirit of Stability AI, it has spawned many AI painting applications. Compared with the traditional painting method, the method of generating images based on text is simple to operate, and the drawing speed is also fast. Each generation will show a different effect.

With the development of technology, consumer-grade GPUs have been able to generate images in tens of seconds, and people have begun to consider using AI drawing capabilities for productivity. Since Stable Diffusion has long been open source, it makes sense for developers to use it to create drawing tools.

For example, the previous Automatic1111 is a commonly used network UI in the Stable Diffusion user community, but it is still not convenient enough for professional users who often use Photoshop.

The open source Stable Diffusion plug-in for PS is here: one-click AI brain supplement, ready to install and use

Now, with the help of Auto-Photoshop-StableDiffusion-Plugin, users can use the function of Automatic1111 Stable Diffusion directly in the most famous drawing software Photoshop, No need to switch between programs.

This means you can easily use Stable Diffusion AI in the familiar Photoshop environment, right out of the box. After installing this plugin, you can edit Stable Diffusion images using all your favorite tools and conveniently save them in Photoshop.

Project link: https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin

Function introduction

Quick Test

1. Create a new project in PhotoShop.

2. Once the plugin is loaded, do not select or change anything. Just click the "Generate" button.

3. If you see an image of a cat being loaded onto the canvas, then everything is set up correctly.

txt2Img

1. Use the Rectangular Marquee Tool and select the square (1x1 scale)

a. In the selection tool, you can set the ratio to 512x512 or 512x768;

b. Just make sure that the selected ratio is equal to the size of the resulting image.

2. Write prompt and click "Generate".

3. The result will be resized to fit the selected area. But don't worry, the image will be loaded into PhotoShop as a Smart Object. So you can resize it without losing quality.

img2img

1. Select an image that is on its own layer.

a. If you want the generated image to be perfectly placed on the original image, optional "Ctrl-click" on the layer thumbnail.

2. Change the mode to "img2img" in the plugin UI.

3. Click the "Set Initial Image" button. If the image does not change to the selected layer. Clicking multiple times (the author is working on fixing this issue).

4. Click Generate.

inpaint

1. Change the plug-in mode to "inpaint".

2. Create a square selection on the image to be repaired:

a. Use the Rectangular Marquee Tool;

b. Or “ctrl click” the layer thumbnail.

3. Create a new layer and paint white within the selected area. Note that any white areas will be regenerated via Stable Diffusion.

4. Click the "Init Inpaint Mask" button.

a. Make sure you are still on the white layer before clicking;

b. After clicking, the plug-in will generate a suitable black and white mask. Mask and set it to the mask that Stable Diffusion wants to use.

c. It also creates a canvas snapshot under the selected area and uses this snapshot as the initial image.

5. Click the "Generate" button.

outpaint

1. Change plugin mode to Repair. Remember, "outpaint" is just a special case of repair.

2. Create a "rectangular selection" that intersects the image you want to expand.

3. Click "Init Outpaint Mask", this will:

a. Create a snapshot of the canvas under the selection, and It is used as the "initial image" of Stable Diffusion;

b. Create a black and white mask and use it as the "initial mask";

c. It will update the "Initial Image" and "Initial Mask" in the plug-in UI.

Some experiences

  • In order to get the best inpaint and outpaint effects, you must choose " stable-diffusion inpainting model".
  • img2img's "initial image" cannot have transparency.
  • Always check the Initial Image and Initial Mask in the plugin UI and make sure they match the layers on the canvas. If you want to adjust the mismatch, please do the following:
  • Select "group_mask" in the layers panel and click the "set init mask" button.
  • Select "group_init_image" in the layer panel and click the "set init image" button.
  • After selecting a model, you may need to wait for it to load into Stable Diffusion before you can click Generate.
  • Check if the progress bar is stuck at 0% or 1%: you can cancel/interrupt the request at any time if you think it's taking too long and want to regenerate again.
  • Do not open multiple PhotoShop documents, this will break the plug-in. Please work on one project at a time.

Questions about img2img, inpaint or outpaint

  • ##img2img, inpaint and outpaint Use photoshop's "quick export to png" function.
  • Random quick export to png gets corrupted, this is a known photoshop bug.

If you want to test whether the feature is broken and the cause of the problem, you can do the following:

  • Select one layer and right click on it and select quick export to png. If you get a window prompt, the quick export works fine. On the other hand if nothing happens then you need to restart photoshop and try the export function again until it works.
  • You can use this plugin when the export function is enabled, otherwise img2img, inpaint and outpaint will not work properly.
How to install

When running the plug-in for the first time:

1. Download the plug-in:

git clone https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin.git
Copy after login

2. Run "start_server.bat" under "Auto-Photoshop-StableDiffusion-Plugin"

3. In the location where you installed automatic1111, Edit webui-user.bat and change this line:

set COMMANDLINE_ARGS=
Copy after login

set COMMANDLINE_ARGS= --api
Copy after login

这将允许插件与 automatic1111 项目进行通信。保存后关闭「webui-user.bat」文件,正常运行即可。

4、运行 photoshop。选择编辑→首选项→插件,确保选中「启用开发者模式」(Enable Developer Mod)选框。

5、安装官方的「Adobe UXP Developer Tool」,此工具会将插件添加到 photoshop:https://developer.adobe.com/photoshop/uxp/devtool/installation/

6、运行 Adobe UXP Developer Tool 并单击右上角的「添加插件」按钮。导航到「Auto-Photoshop-StableDiffusion-Plugin” 文件夹所在的位置并打开「manifest.json」

7、选择插件并点击 Actions → Load Selected,就完成了。

第二次及后续运行插件的步骤:

1、启动 「webui-user.bat」

2、启动 「start_server.bat」

3、启动 「Photoshop」

4、启动 「Adobe UXP Developer Tool」并加载插件

The above is the detailed content of The open source Stable Diffusion plug-in for PS is here: one-click AI brain supplement, ready to install and use. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1659
14
PHP Tutorial
1258
29
C# Tutorial
1232
24
How much is Bitcoin worth How much is Bitcoin worth Apr 28, 2025 pm 07:42 PM

Bitcoin’s price ranges from $20,000 to $30,000. 1. Bitcoin’s price has fluctuated dramatically since 2009, reaching nearly $20,000 in 2017 and nearly $60,000 in 2021. 2. Prices are affected by factors such as market demand, supply, and macroeconomic environment. 3. Get real-time prices through exchanges, mobile apps and websites. 4. Bitcoin price is highly volatile, driven by market sentiment and external factors. 5. It has a certain relationship with traditional financial markets and is affected by global stock markets, the strength of the US dollar, etc. 6. The long-term trend is bullish, but risks need to be assessed with caution.

Which of the top ten currency trading platforms in the world are among the top ten currency trading platforms in 2025 Which of the top ten currency trading platforms in the world are among the top ten currency trading platforms in 2025 Apr 28, 2025 pm 08:12 PM

The top ten cryptocurrency exchanges in the world in 2025 include Binance, OKX, Gate.io, Coinbase, Kraken, Huobi, Bitfinex, KuCoin, Bittrex and Poloniex, all of which are known for their high trading volume and security.

Which of the top ten currency trading platforms in the world are the latest version of the top ten currency trading platforms Which of the top ten currency trading platforms in the world are the latest version of the top ten currency trading platforms Apr 28, 2025 pm 08:09 PM

The top ten cryptocurrency trading platforms in the world include Binance, OKX, Gate.io, Coinbase, Kraken, Huobi Global, Bitfinex, Bittrex, KuCoin and Poloniex, all of which provide a variety of trading methods and powerful security measures.

Decryption Gate.io Strategy Upgrade: How to Redefine Crypto Asset Management in MeMebox 2.0? Decryption Gate.io Strategy Upgrade: How to Redefine Crypto Asset Management in MeMebox 2.0? Apr 28, 2025 pm 03:33 PM

MeMebox 2.0 redefines crypto asset management through innovative architecture and performance breakthroughs. 1) It solves three major pain points: asset silos, income decay and paradox of security and convenience. 2) Through intelligent asset hubs, dynamic risk management and return enhancement engines, cross-chain transfer speed, average yield rate and security incident response speed are improved. 3) Provide users with asset visualization, policy automation and governance integration, realizing user value reconstruction. 4) Through ecological collaboration and compliance innovation, the overall effectiveness of the platform has been enhanced. 5) In the future, smart contract insurance pools, forecast market integration and AI-driven asset allocation will be launched to continue to lead the development of the industry.

What are the top ten virtual currency trading apps? The latest digital currency exchange rankings What are the top ten virtual currency trading apps? The latest digital currency exchange rankings Apr 28, 2025 pm 08:03 PM

The top ten digital currency exchanges such as Binance, OKX, gate.io have improved their systems, efficient diversified transactions and strict security measures.

What are the top currency trading platforms? The top 10 latest virtual currency exchanges What are the top currency trading platforms? The top 10 latest virtual currency exchanges Apr 28, 2025 pm 08:06 PM

Currently ranked among the top ten virtual currency exchanges: 1. Binance, 2. OKX, 3. Gate.io, 4. Coin library, 5. Siren, 6. Huobi Global Station, 7. Bybit, 8. Kucoin, 9. Bitcoin, 10. bit stamp.

Recommended reliable digital currency trading platforms. Top 10 digital currency exchanges in the world. 2025 Recommended reliable digital currency trading platforms. Top 10 digital currency exchanges in the world. 2025 Apr 28, 2025 pm 04:30 PM

Recommended reliable digital currency trading platforms: 1. OKX, 2. Binance, 3. Coinbase, 4. Kraken, 5. Huobi, 6. KuCoin, 7. Bitfinex, 8. Gemini, 9. Bitstamp, 10. Poloniex, these platforms are known for their security, user experience and diverse functions, suitable for users at different levels of digital currency transactions

How to use the chrono library in C? How to use the chrono library in C? Apr 28, 2025 pm 10:18 PM

Using the chrono library in C can allow you to control time and time intervals more accurately. Let's explore the charm of this library. C's chrono library is part of the standard library, which provides a modern way to deal with time and time intervals. For programmers who have suffered from time.h and ctime, chrono is undoubtedly a boon. It not only improves the readability and maintainability of the code, but also provides higher accuracy and flexibility. Let's start with the basics. The chrono library mainly includes the following key components: std::chrono::system_clock: represents the system clock, used to obtain the current time. std::chron

See all articles