RunningHub SmartPhotoCrafter ModelLoader
The model loader with no model inputs — and why that's the point
- editor
This is the node that hauls the SmartPhotoCrafter stack into VRAM: a 20B Qwen-Image-Edit fine-tune (the DiT), a Qwen2.5-VL vision-language model, a VAE, and two optional LoRA adapters. And the first thing you'll notice is that it has zero model-path inputs. There's no "dit file" dropdown, no "select vlm folder" box. The paths are hardcoded to fixed locations under ComfyUI/models, and that's deliberate - RunningHub ships this as a self-contained photo-enhancement pipeline, so the loader simply refuses to let you point it somewhere wrong.
It's a two-node pack: this loader hands a cached editor object to the RunningHub SmartPhotoCrafter ImageEdit node, which does the actual editing. You don't interact with the editor object itself - it's a custom RH_SMARTPHOTOCRAFTER_EDITOR type that only that one node accepts. Think of the loader as the ignition, not the engine.
What it actually loads
Under the hood it builds a DiffSynth pipeline from fixed paths under ComfyUI/models:
SmartPhotoCrafter/dit.safetensors- the fine-tuned Qwen-Image-Edit-2509 diffusion transformerSmartPhotoCrafter/vlm- the Qwen2.5-VL text encoder that does the photo critiquediffusers/Qwen-Image-Edit-2509/vae/diffusion_pytorch_model.safetensors- the VAESmartPhotoCrafter/dit_loraandSmartPhotoCrafter/vlm_lora- optional LoRA adapters, loaded only if the folders exist
That DiT is a 20B model. At bf16 that's tens of gigabytes, which is why the loader leans on DiffSynth disk offload on CUDA: weights stay on disk and stream through as the pipeline needs them, so a card that could never hold the whole thing can still run it - slowly, but it runs. On load it also checks for float8_e4m3fn support and uses float8 for the onload/preparing pass, with your chosen dtype as the computation dtype.
The inputs that matter
Honestly, almost none of them. The defaults are the right call for almost everyone:
- dtype -
bfloat16is the recommendation and the default on CUDA;float16can be slightly faster on some cards,float32is for debugging or CPU-only masochists. - device -
autopicks CUDA when it's there, CPU otherwise. A note of realism: on CPU this is a 20B model with a VLM critique in front of it. Pack a lunch. - vram_limit_gb - leave at
0to auto-use total VRAM minus 0.5GB, or set a positive cap if you're sharing the card with something else. - use_dit_lora / use_vlm_lora - the two LoRA toggles. If you didn't download the LoRA folders, leaving them on is harmless: the loader only applies them "when available", and silently skips missing ones.
The one output, editor, wires straight into the ImageEdit node's editor input.
Install, and the model downloads
Through ComfyUI Manager, search "SmartPhotoCrafter" (or the pack title ComfyUI_RH_SmartPhotoCrafter), or:
cd ComfyUI/custom_nodes
git clone https://github.com/RH-RunningHub/ComfyUI_RH_SmartPhotoCrafter
then restart ComfyUI. The requirements pull in diffsynth, transformers, peft, accelerate, sentencepiece and friends - and deliberately not torch. The README is explicit: don't install a different PyTorch build over ComfyUI's environment.
The models don't install themselves. From your ComfyUI models directory:
cd 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
This is the whole job of this node - so this download is the whole job of the install. The SmartPhotoCrafter weights are multi-gigabyte and the VAE is another chunk; budget your disk.
Common issues
The loader caches the editor in memory, so the first run loads everything and takes a while, and later runs reuse it. That cache is keyed on your dtype/device/vram settings - change one and it tears the whole thing down and reloads. A ComfyUI restart clears it too, so expect a slow first generation after every restart. And the classic beginner trap: if a model file is missing or in the wrong folder, the loader throws a FileNotFoundError at load time, not a friendly in-graph warning. The paths are fixed, so the fix is always "put the file exactly where the README says."
One caveat worth knowing before you invest the disk space: the upstream SmartPhotoCrafter weights ship under CC BY-NC-SA 4.0 - non-commercial and share-alike, despite the underlying Qwen being Apache 2.0. Fine for tinkering, but read that license before you build a product on it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| use_dit_lora | BOOLEAN | true | Load the SmartPhotoCrafter DiT LoRA adapter from models/SmartPhotoCrafter/dit_lora when available. |
| use_vlm_lora | BOOLEAN | true | Load the SmartPhotoCrafter VLM LoRA adapter from models/SmartPhotoCrafter/vlm_lora when available. |
| dtype | COMBO | bfloat16 | Model computation dtype. bfloat16 is recommended on CUDA for this Qwen-based pipeline. |
| device | COMBO | auto | Device used for model execution. auto selects CUDA when available, otherwise CPU. |
| vram_limit_gb | FLOAT | 0.00–128 | DiffSynth VRAM management limit in GB. Set 0 to use total CUDA VRAM minus 0.5 GB automatically. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| editor | RH_SMARTPHOTOCRAFTER_EDITOR | — |