This commit is contained in:
leafiy
2025-11-11 09:21:33 +08:00
parent 22aa7c3ec1
commit 7ee8903399
2 changed files with 18 additions and 7 deletions
+3 -3
View File
@@ -14,9 +14,9 @@ matches what you would get when replacing the layer inside Photoshop.
- **PSD Mockup Embedder** – Replaces one or more smart objects with the input
image. The node renders the PSD without the target layers, warps the image
using OpenCV, and outputs a ready-to-use RGBA tensor plus an auto-saved PNG.
- **PSD File Upload** – Provides a dropdown with the same upload button ComfyUI
uses everywhere else (the ⬆ icon). Click it to upload PSD/PSB files straight
into `ComfyUI/input` and feed the resulting path to other nodes.
- **PSD File Upload** – Uses ComfyUI’s `file_upload` widget, so the familiar ⬆
button appears right on the node. Click it to upload/select PSD/PSB files and
feed the resolved path straight into other nodes.
- Works with PSD/PSB files, multiple smart objects, and either ComfyUI `IMAGE`
tensors or file paths.
+15 -4
View File
@@ -256,10 +256,21 @@ def _save_png(image: Image.Image, psd_path: str) -> str:
class PSDFileUploader:
@classmethod
def INPUT_TYPES(cls):
files = _list_input_files(ALLOWED_PSD_EXTENSIONS)
if not files:
files = ["<upload PSD via ⬆ icon>"]
return {"required": {"psd_file": (files,)}}
psd_files = _list_input_files(ALLOWED_PSD_EXTENSIONS)
if not psd_files:
psd_files = ["<upload or pick PSD>"]
return {
"required": {
"psd_file": (
psd_files,
{
"file_upload": True,
"file_upload_types": ["psd", "psb"],
"tooltip": "Click the upload icon to add a PSD/PSB into ComfyUI/input",
},
)
}
}
CATEGORY = "psd/mockup"
RETURN_TYPES = ("STRING",)