Home > Article > Technology peripherals > The open source Stable Diffusion plug-in for PS is here: one-click AI brain supplement, ready to install and use
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.
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
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
Questions about img2img, inpaint or outpaint
If you want to test whether the feature is broken and the cause of the problem, you can do the following:
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
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=
到
set COMMANDLINE_ARGS= --api
这将允许插件与 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!