How zombieyang/sd-ppp works
SD-PPP is a Photoshop AI plugin paired with a ComfyUI extension and Python server integration. The main workflow is to select Photoshop content, expose it to a ComfyUI workflow, edit or run that workflow, then return generated content to Photoshop. The graph also preserves documented model/API integrations and the ComfyUI workflow editor. Some UI and integration details are represented at directory level because their source was not sampled; relationships without direct evidence are omitted.
Main entry points: WorkflowCallee.mts Workflow handler · sdppp.py Python server · nodes.py Comfy custom nodes · Socket.mts Socket transport
Components 23
Photoshop plugin
- Photoshop panel
typescripts/modules/photoshop/src/tsx - Workflow editor
typescripts/modules/photoshop/src/tsx/WorkflowEditWrap.tsx
ComfyUI workflow
- ComfyUI interface
typescripts/modules/comfy/src/popup/tsx - Popup controller
typescripts/modules/comfy/src/popup/sdpppPopup.mts - Workflow handler
typescripts/modules/comfy/src/socket/WorkflowCallee.mts - Graph form converter
typescripts/modules/comfy/src/graph-to-form.mts - Comfy custom nodes
sdppp_python/comfy/nodes.py - Legacy nodes
sdppp_python/comfy/nodes_legacy.py
Python integration
- Python server
sdppp_python/sdppp.py - Image endpoints
sdppp_python/apis.py - Photoshop protocol
sdppp_python/protocols/photoshop.py - Client instances
sdppp_python/instances.py - Image cache
sdppp_python/store/store.py
Shared transport and state
- Photoshop caller
typescripts/src/socket/PhotoshopCaller.mts - Photoshop callee
typescripts/src/socket/PhotoshopCalleeInterface.mts - Comfy socket
typescripts/modules/comfy/src/socket/ComfySocket.mts - Socket transport
typescripts/src/common/socket/Socket.mts - Comfy state map
typescripts/modules/comfy/photoshopModels.mts - Workflow state
typescripts/src/store/page.mts - Photoshop state
typescripts/src/store/photoshop.mts
Other components
- Photoshop user
- ComfyUI runtime
- Model/API providers
Connections 21
- Photoshop user → Photoshop panel: uses
- Photoshop user → ComfyUI interface: edits workflows
- Photoshop panel → Workflow editor: edits
- ComfyUI runtime → Popup controller: hosts
- Popup controller → Workflow handler: dispatches
- Workflow handler → Graph form converter: converts widgets
typescripts/modules/comfy/src/socket/WorkflowCallee.mts - Workflow handler → Workflow state: updates state
typescripts/modules/comfy/src/socket/WorkflowCallee.mts - Comfy socket → Workflow handler: mixes in
typescripts/modules/comfy/src/socket/ComfySocket.mts - Comfy socket → Socket transport: extends transport
typescripts/modules/comfy/src/socket/ComfySocket.mts - Comfy state map → Workflow state: creates
typescripts/modules/comfy/photoshopModels.mts - Comfy state map → Photoshop state: creates
typescripts/modules/comfy/photoshopModels.mts - Python server → Image endpoints: registers endpoints
sdppp_python/sdppp.py - Python server → Comfy custom nodes: loads nodes
sdppp_python/sdppp.py - Python server → Client instances: uses
sdppp_python/sdppp.py - Legacy nodes → Comfy custom nodes: reuses
sdppp_python/comfy/nodes_legacy.py - Comfy custom nodes → Photoshop protocol: requests Photoshop actions
sdppp_python/comfy/nodes.py - Image endpoints → Image cache: reads and writes
- Photoshop protocol → Client instances: selects client
sdppp_python/protocols/photoshop.py - Photoshop caller → Socket transport: uses transport
- Photoshop callee → Socket transport: uses transport
- Model/API providers → ComfyUI runtime: provides models