diff --git a/changelog.md b/changelog.md index 4f8ad8c..7ca2f62 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,10 @@ +## [1.2.2] - 2024-08-18 +1. fix: compatible latest SD-Forge with ForgeCanvas and Gradio4 +2. fix: compatible with latest ComfyUI (August ver.). +3. fix: cannot get background layer without alpha +4. fix: remove the `?` and `#` in connect url to prevent HTTP 405 error +5. fix: some UI bug in initial connect + ## [1.2.1] - 2024-08-15 1. feature: add .ccx download button in comfy node and webui's setting popup. 2. feature: show the page name in PS plugin's panel and in comfy node and webui's setting popup. diff --git a/javascript/plugins/sd-ppp_PS.ccx b/javascript/plugins/sd-ppp_PS.ccx index b9861cb..acb6603 100644 Binary files a/javascript/plugins/sd-ppp_PS.ccx and b/javascript/plugins/sd-ppp_PS.ccx differ diff --git a/photoshop/dist/index.js b/photoshop/dist/index.js index 84bcc76..6992504 100644 --- a/photoshop/dist/index.js +++ b/photoshop/dist/index.js @@ -163,14 +163,17 @@ class Main extends react__WEBPACK_IMPORTED_MODULE_0__.Component { }); _system_ComfyConnection__WEBPACK_IMPORTED_MODULE_1__["default"].onConnectStateChange(() => { const instance = _system_ComfyConnection__WEBPACK_IMPORTED_MODULE_1__["default"].instance; - console.log('isConnected:', instance?.isConnected); - this.setState({ + const setter = { isConnected: instance?.isConnected, isReconnecting: instance?.isReconnecting, lastConnectErrorMessage: instance?.lastErrorMessage, autoRunning: '', pageInstances: [] - }); + }; + if (instance && instance.isConnected) { + setter.backendURL = instance.backendURL; + } + this.setState(setter); }); _system_ComfyConnection__WEBPACK_IMPORTED_MODULE_1__["default"].onPageInstancesChange(data => { if (data.pages) { @@ -211,7 +214,6 @@ class Main extends react__WEBPACK_IMPORTED_MODULE_0__.Component { id: "url-bar", label: "backendURL", onInput: ev => { - console.log('onInput', ev.currentTarget.value); this.state.backendURL = ev.currentTarget.value; } }, inputDisable, { @@ -347,7 +349,7 @@ class ComfyConnection { lastErrorMessage = ''; constructor(backendURL) { ComfyConnection.instance = this; - this.backendURL = backendURL.replace(/\/*$/, ''); + this.backendURL = backendURL.split('?')[0].split('#')[0].replace(/\/*$/, ''); this.connect(); } connect() { @@ -578,7 +580,13 @@ async function getMaskData(document, layer, bounds) { sourceBounds: bounds, layerID: layer.id }; - let mask = await photoshop__WEBPACK_IMPORTED_MODULE_0__.imaging.getLayerMask(options); + let mask = null; + try { + mask = await photoshop__WEBPACK_IMPORTED_MODULE_0__.imaging.getLayerMask(options); + } catch (e) { + console.warn(e); + return null; + } let psMaskData = mask.imageData; if (!psMaskData) return null; const maskDataFromAPI = await psMaskData.getData(); diff --git a/photoshop/dist/manifest.json b/photoshop/dist/manifest.json index 03ad3fc..24c505c 100644 --- a/photoshop/dist/manifest.json +++ b/photoshop/dist/manifest.json @@ -1,7 +1,7 @@ { "id": "sd-ppp", "name": "SD-PPP", - "version": "1.2.1", + "version": "1.2.2", "main": "index.html", "manifestVersion": 5, "host": { diff --git a/photoshop/package.json b/photoshop/package.json index 35f3548..4cad8d7 100644 --- a/photoshop/package.json +++ b/photoshop/package.json @@ -1,6 +1,6 @@ { "name": "sdppp", - "version": "1.2.1", + "version": "1.2.2", "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 03ad3fc..24c505c 100644 --- a/photoshop/plugin/manifest.json +++ b/photoshop/plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "sd-ppp", "name": "SD-PPP", - "version": "1.2.1", + "version": "1.2.2", "main": "index.html", "manifestVersion": 5, "host": { diff --git a/pyproject.toml b/pyproject.toml index 18bbe3f..690700b 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.2.1" +description = "getting/sending picture from/to Photoshop with a simple connection. Make Photoshop become the workspace of your ComfyUI." +version = "1.2.2" license = { file = "LICENSE" } [project.urls]