diff --git a/README.md b/README.md index 5c9aee3..c6e001f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/psd_mockup_node.py b/psd_mockup_node.py index 13ce5f8..9348b3c 100644 --- a/psd_mockup_node.py +++ b/psd_mockup_node.py @@ -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 = [""] - return {"required": {"psd_file": (files,)}} + psd_files = _list_input_files(ALLOWED_PSD_EXTENSIONS) + if not psd_files: + psd_files = [""] + 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",)