update
This commit is contained in:
@@ -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
@@ -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",)
|
||||
|
||||
Reference in New Issue
Block a user