{"id":33624658,"url":"https://github.com/leafiy/comfyui_psd_smart_object","last_synced_at":"2026-01-21T15:31:54.138Z","repository":{"id":323588289,"uuid":"1093874571","full_name":"leafiy/comfyui_psd_smart_object","owner":"leafiy","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-11T02:18:19.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-11T03:07:08.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leafiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T00:42:45.000Z","updated_at":"2025-11-11T02:18:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leafiy/comfyui_psd_smart_object","commit_stats":null,"previous_names":["leafiy/comfyui_psd_smart_object"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leafiy/comfyui_psd_smart_object","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafiy%2Fcomfyui_psd_smart_object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafiy%2Fcomfyui_psd_smart_object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafiy%2Fcomfyui_psd_smart_object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafiy%2Fcomfyui_psd_smart_object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafiy","download_url":"https://codeload.github.com/leafiy/comfyui_psd_smart_object/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafiy%2Fcomfyui_psd_smart_object/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-02T00:00:33.085Z","updated_at":"2026-01-21T15:31:54.132Z","avatar_url":"https://github.com/leafiy.png","language":"Python","funding_links":[],"categories":["Workflows (3567) sorted by GitHub Stars"],"sub_categories":[],"readme":"# ComfyUI PSD Smart Object Nodes\n\nCustom ComfyUI nodes that understand Photoshop mockup files. Drop a PSD/PSB\ninto `ComfyUI/input`, feed any image (from the usual `Load Image` node or by\nproviding a path on disk), and the node will automatically project that image\nonto every smart-object layer you select. Perspective, rotation, and scale\nfollow the transform data stored inside the PSD smart object, so the result\nmatches what you would get when replacing the layer inside Photoshop.\n\n## Features\n- **PSD Smart Object Inspector** – Lists each smart-object layer (name, id,\n  bounding box, transform box). Use it to confirm the layer names you want to\n  target.\n- **PSD Mockup Embedder** – Uploads PSD/PSB files directly from the node,\n  reuses the PSD’s original clipping stack (shadows, highlights, rounded\n  corners, etc.), projects your image into the smart objects, resizes the result\n  to any width (default 800 px), and emits the composited tensor plus an\n  auto-saved PNG.\n- Works with PSD/PSB files, multiple smart objects, and either ComfyUI `IMAGE`\n  tensors or file paths.\n\n## Installation\n1. Copy this folder into `ComfyUI/custom_nodes/comfyui_psd_smart_object`.\n2. (Optional) install the lightweight dependencies inside your ComfyUI\n   environment:\n   ```bash\n   pip install -r requirements.txt\n   ```\n3. Restart ComfyUI so it can discover the new nodes.\n\n## Usage\n1. Place PSD/PSB mockups under `ComfyUI/input/psd` (or pass an absolute path).\n2. On **PSD Mockup Embedder**, click “choose PSD to upload” (or drag a PSD onto\n   the node). The bundled frontend script uploads the file into `ComfyUI/input`\n   and fills the `psd_file` field automatically.\n3. Load your artwork with any stock `Load Image` (or `Upload Image`) node and\n   connect its `IMAGE` output to the embedder. Leave `smart_object_names`\n   empty to target the first smart object automatically, or pass a\n   comma-separated list to specify others.\n4. Adjust `output_width` if you need a specific export size (set to `0` to keep\n   the PSD’s native resolution), then trigger the workflow. The node outputs:\n   - `mockup_image`: an `IMAGE` tensor that you can preview or post-process.\n   - `debug_info`: JSON describing the layers that were replaced.\n   - `png_path`: the auto-saved PNG under `ComfyUI/output`, so you no longer\n     need an extra `Save Image` node to receive a PNG file.\n\n### Notes \u0026 Limitations\n- The result is flattened, so advanced Photoshop blend modes (e.g., highlight\n  or shadow layers that sit on top of the smart object) are baked into the\n  background. Complex lighting stacks may still need Photoshop for final\n  touch-ups.\n- Smart objects without transform metadata fall back to their axis-aligned\n  bounding boxes.\n- Perspective warping depends on OpenCV. If ComfyUI logs an import error,\n  install `opencv-python-headless` in the same environment.\n\n## Requirements\nSee `requirements.txt`. ComfyUI already brings Torch and Pillow, so the\nadditional runtime dependencies are:\n- `psd-tools` – parses PSD/PSB files and exposes smart-object metadata\n- `opencv-python-headless` – handles the perspective warp\n- `numpy` – tensor and array glue code\n\n## Development\nThe nodes live in `psd_mockup_node.py`. Run\n`PYTHONPYCACHEPREFIX=/tmp/pycache python -m py_compile psd_mockup_node.py`\nbefore shipping changes to make sure there are no syntax issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafiy%2Fcomfyui_psd_smart_object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafiy%2Fcomfyui_psd_smart_object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafiy%2Fcomfyui_psd_smart_object/lists"}