ComfyUI_RH_SmartPhotoCrafter
RunningHub ComfyUI nodes for SmartPhotoCrafter automatic photographic image editing.
ComfyUI_RH_SmartPhotoCrafter
RunningHub ComfyUI wrapper for vivoCameraResearch SmartPhotoCrafter.
This plugin keeps the upstream infer.py implementation and wraps it with a
Loader + ImageEdit node pair.
Sources And Links
- Upstream repository: https://github.com/vivoCameraResearch/SmartPhotoCrafter
- SmartPhotoCrafter weights: https://huggingface.co/katelyn2333/SmartPhotoCrafter
- Qwen-Image-Edit-2509 model: https://huggingface.co/Qwen/Qwen-Image-Edit-2509
- Paper: https://arxiv.org/abs/2604.19587
- License: https://creativecommons.org/licenses/by-nc-sa/4.0/
Nodes
RunningHub SmartPhotoCrafter ModelLoader- Loads DiT, VLM, VAE, DiT LoRA, and VLM LoRA.
- Caches the editor object to avoid reloading large models every run.
RunningHub SmartPhotoCrafter ImageEdit- Inputs one
IMAGE. - Runs SmartPhotoCrafter's automatic quality/aesthetic analysis and image editing pipeline.
- Outputs the enhanced
IMAGEand generatedanalysis_text.
- Inputs one
Model Layout
Place weights under ComfyUI models:
ComfyUI/models/
SmartPhotoCrafter/
dit.safetensors
vlm/
config.json
...
dit_lora/
adapter_config.json
...
vlm_lora/
adapter_config.json
...
Qwen-Image-Edit-2509/
vae/
diffusion_pytorch_model.safetensors
diffusers/
Qwen-Image-Edit-2509/
vae/
diffusion_pytorch_model.safetensors
The loader uses these fixed model paths under ComfyUI/models:
dit_path:SmartPhotoCrafter/dit.safetensorsvlm_path:SmartPhotoCrafter/vlmvae_path:diffusers/Qwen-Image-Edit-2509/vae/diffusion_pytorch_model.safetensorsdit_lora_path:SmartPhotoCrafter/dit_loravlm_lora_path:SmartPhotoCrafter/vlm_lora
These paths are intentionally not exposed as node inputs. Put the model files in this layout before running the workflow.
Example preparation commands from the ComfyUI models directory:
cd /workspace/ComfyUI/models
hf download katelyn2333/SmartPhotoCrafter --local-dir SmartPhotoCrafter
hf download Qwen/Qwen-Image-Edit-2509 vae/diffusion_pytorch_model.safetensors --local-dir diffusers/Qwen-Image-Edit-2509
On CUDA, the loader enables DiffSynth disk offload for the Qwen DiT and VAE
models. Keep vram_limit_gb at 0 to auto-use total CUDA VRAM minus 0.5 GB, or
set a positive value only when you need a stricter cap.
Basic Workflow
LoadImage -> RunningHub SmartPhotoCrafter ImageEdit -> SaveImage
RunningHub SmartPhotoCrafter ModelLoader -> RunningHub SmartPhotoCrafter ImageEdit
Set width and height to 0 to preserve aspect ratio and resize to
target_pixels. The final size is rounded to multiples of 16.
An API-format example workflow is provided at:
examples/smartphotocrafter_basic_api.json
Replace replace_with_input_photo.png with an image available to ComfyUI before
submitting the workflow.
Notes
Do not install a different PyTorch build over ComfyUI's existing environment.
The included requirements.txt intentionally omits torch, torchvision, and
CUDA/NVIDIA packages.
The upstream SmartPhotoCrafter project states that its materials are released under the Creative Commons BY-NC-SA 4.0 license. This license includes non-commercial and share-alike restrictions.