diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..c2c8e67 --- /dev/null +++ b/changelog.md @@ -0,0 +1,6 @@ +## [1.2.0] - 2024-07-30 +1. support multi document. +2. support generate button in PS. +3. support auto generate checkbox in PS for live-painting. +4. bugfixes +5. UI optimize \ No newline at end of file diff --git a/javascript/plugins/sd-ppp_PS.ccx b/javascript/plugins/sd-ppp_PS.ccx index 441d179..17f0892 100644 Binary files a/javascript/plugins/sd-ppp_PS.ccx and b/javascript/plugins/sd-ppp_PS.ccx differ diff --git a/javascript/sdppp-sd.js b/javascript/sdppp-sd.js index a0a5031..271b293 100644 --- a/javascript/sdppp-sd.js +++ b/javascript/sdppp-sd.js @@ -380,6 +380,7 @@ const insertedSendWidgetsByElem = new WeakMap(); const insertedGetWidgets = new Set(); const insertedSendWidgets = new Set(); + let downloadButtonProcessed = false; onUiUpdate(() => { gradioApp().querySelectorAll(".gradio-image").forEach((el) => { @@ -396,5 +397,12 @@ insertedSendWidgetsByElem.set(el, widget); insertedSendWidgets.add(new WeakRef(widget)) }) + const downloadButton = gradioApp().querySelector('#setting_sd-ppp_download') + if (!downloadButton || downloadButtonProcessed) return; + downloadButton.innerHTML = "Download SD-PPP PS .ccx plugin" + downloadButton.addEventListener('click', () => { + location.href = "/file=extensions/sd-ppp/javascript/plugins/sd-ppp_PS.ccx" + }) + downloadButtonProcessed = true }) })(); diff --git a/photoshop/dist/manifest.json b/photoshop/dist/manifest.json index dd9e4ab..46cd9db 100644 --- a/photoshop/dist/manifest.json +++ b/photoshop/dist/manifest.json @@ -1,7 +1,7 @@ { "id": "sd-ppp", "name": "SD-PPP", - "version": "1.1.0", + "version": "1.2.0", "main": "index.html", "manifestVersion": 5, "host": { diff --git a/photoshop/package.json b/photoshop/package.json index 50634aa..76d5079 100644 --- a/photoshop/package.json +++ b/photoshop/package.json @@ -1,6 +1,6 @@ { "name": "sdppp", - "version": "1.1.0", + "version": "1.2.0", "scripts": { "watch": "nodemon -w src -e js,jsx,json,css,html -w webpack.config.js -x npm run build", "build": "webpack --mode development", diff --git a/photoshop/plugin/manifest.json b/photoshop/plugin/manifest.json index dd9e4ab..46cd9db 100644 --- a/photoshop/plugin/manifest.json +++ b/photoshop/plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "sd-ppp", "name": "SD-PPP", - "version": "1.1.0", + "version": "1.2.0", "main": "index.html", "manifestVersion": 5, "host": { diff --git a/photoshop/src/index.jsx b/photoshop/src/index.jsx index 6442cef..3744e67 100644 --- a/photoshop/src/index.jsx +++ b/photoshop/src/index.jsx @@ -9,7 +9,7 @@ import { entrypoints } from "uxp"; const demosController = new PanelController(() =>
, {id: "sdppp-connect", menuItems: [ // { id: "reload1", label: "Reload Plugin", enabled: true, checked: false, oninvoke: () => location.reload() }, // { id: "dialog1", label: "About this Plugin", enabled: true, checked: false, oninvoke: () => aboutController.run() }, -] }); +] }); entrypoints.setup({ plugin: { create(plugin) { diff --git a/pyproject.toml b/pyproject.toml index d4e1d34..ca2e1aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "sd-ppp" description = "!!Another custom node about Photoshop!! PPP means interoP with your PhotoshoP. You can get or send layers from/to your Photoshop. This custom node is easier to use." -version = "1.1.0" +version = "1.2.0" license = "LICENSE" [project.urls] diff --git a/readme.md b/readme.md index 62569b8..0c3e22e 100644 --- a/readme.md +++ b/readme.md @@ -53,8 +53,9 @@ this extension/custom_node is mainly focus on getting/sending picture from/to Ph 2. install Photoshop plugin 1. by CCX: - 1. download `http:///file=extensions/sd-ppp/javascript/plugins/sd-ppp_PS.ccx`. - > for example: `http://127.0.0.1:7860/file=extensions/sd-ppp/javascript/plugins/sd-ppp_PS.ccx` + 1. download .ccx in SDWebUI's setting tab. + + 3. double click the `.ccx` file. OR rename it to `.zip` and extract it into photoshop's plugin directory [like this](https://github.com/zombieyang/sd-ppp/assets/5595819/a86862bb-1e4e-45cb-a869-5c08edad47a8). 2. by UXP develop Tool (you can debug the code this way): @@ -78,15 +79,39 @@ this extension/custom_node is mainly focus on getting/sending picture from/to Ph +## Other showcase +0. live-painting + + +1. inpaint + + +2. controlnet + + +3. IC-light + + ----------------------------- +### Tutorial +1. Official + + |BiliBili|Youtube| + | -- | -- | + |coming soon|coming soon| + +2. Community + + | Author | Link | + | -- | -- | + | [BlueBomm](https://space.bilibili.com/17280004) | =>[BiliBili](https://www.bilibili.com/video/BV15bbpeWEf8/) | ### Ask for help [Discord](https://discord.gg/5wmUQ3aZ) -### Concept -In contrast to the plugin that I contributed before [AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin](https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin), which "runs" the SD/Comfy in Photoshop. This tool provides another option that makes Photoshop a helper of SD/ComfyUI. Because I think SD/Comfy will keep growing fast in the future, it is hard to inject the entire SD/Comfy Ecology into Photoshop with a single plugin. - -Still, shout out to AbdullahAlfaraj's plugin and I inherited some of the code using Photoshop's API in it. +### Thanks +@AbdullahAlfaraj +@tianlang0704 ----------------------------- diff --git a/scripts/sd_init.py b/scripts/sd_init.py index 0201157..1115825 100644 --- a/scripts/sd_init.py +++ b/scripts/sd_init.py @@ -1,5 +1,5 @@ # sd script init -from modules import script_callbacks +from modules import script_callbacks, shared from modules.ui_components import ToolButton from sdppp_python.sdppp import SDPPP from sdppp_python.apis import consumeImageCache @@ -102,3 +102,10 @@ def on_app_started(blocks: gr.Blocks, app): script_callbacks.on_app_started(on_app_started) + + +shared.options_templates.update( + shared.options_section(('sd-ppp', "SD-PPP", "ui"), { + "sd-ppp_download": shared.OptionInfo([], "Download PS plugin", gr.Button) + }) +)