Nodes/ComfyUI_RH_SmartPhotoCrafter/RunningHub SmartPhotoCrafter ImageEdit
ComfyUI Node

RunningHub SmartPhotoCrafter ImageEdit

A photo editor that critiques your photo before it touches it

By RH-RunningHub·Created 3 months ago·Updated 3 months ago· 0
RunningHub SmartPhotoCrafter ImageEdit
  • editor
  • image
  • image
  • analysis_text
width0
height0
target_pixels1048576
num_inference_steps20
seed42
tiledfalse
tile_size128
tile_stride64

Here's the unusual thing about this node: you don't write a prompt. Most of the Qwen-Image-Edit ecosystem works by you typing "change her dress to blue" and getting an edit. This node is the opposite - it looks at your photo, decides what's wrong with it, and fixes those things on its own. It's the "one-click make my photo look better" node, built on vivo's SmartPhotoCrafter research and wrapped for ComfyUI by RunningHub.

You hand it a photo, it hands you back an "improved" photo plus a written explanation of what it changed and why. If you've ever wanted a photography critic that also does the retouching, this is it.

How the auto-critique pipeline works

There are two brains working in sequence. First the VLM (Qwen2.5-VL, loaded by the ModelLoader node) gets a large structured prompt that walks it through a five-part analysis: image quality and degradations (blur, noise, artifacts, glare), color and lighting (white balance, contrast, exposure, dynamic range), composition (layout, focus, camera viewpoint), aesthetic impression, and finally concrete improvement suggestions. It scores the photo 0–100.

That written critique then becomes the instruction for the second stage - the SmartPhotoCrafter-fine-tuned Qwen-Image-Edit-2509 DiT - which regenerates the image following its own suggestions. So the "edit" is the model improving itself: critique in, better image out. The critique text is also surfaced as a string output, so you can see exactly what it thought was wrong. In the code that analysis is run with cfg_scale=1.0 and an empty negative prompt - there's no guidance tug-of-war, the pipeline trusts its analysis.

One honest caveat from the wider Qwen-Edit world: it re-emits the whole frame, so unedited regions come back close but not identical. This node is for "make my photo better," not "surgically remove exactly this object." The whole-frame drift is a known Qwen-Edit behavior - if you need pixel-exact edits, masked inpainting is still the tool.

The inputs that matter

The editor input comes from the RunningHub SmartPhotoCrafter ModelLoader, and image is your input photo. After that, three settings actually matter:

  • width / height - set both to 0 and the node preserves your aspect ratio, resizing to target_pixels (default 1048576, i.e. one megapixel). Final dimensions round to multiples of 16. Set explicit values only if you want a specific output size.
  • num_inference_steps - 20 by default. More steps = slower and usually a touch more detail; fewer for quick drafts.
  • tiled - off by default. Flip it on to tile the VAE decode and cut peak memory at the cost of speed; tile_size (128) and tile_stride (64) fine-tune that.

seed (default 42) is there for reproducibility; it's normalized into the 0–2³² range for you. On the output side you get image (wire it into SaveImage or PreviewImage) and analysis_text, the critique string - pipe it into a ShowText node or just read the console, the node prints it either way.

Installing and running it

Install the pack through ComfyUI Manager (search "SmartPhotoCrafter") or cd ComfyUI/custom_nodes && git clone https://github.com/RH-RunningHub/ComfyUI_RH_SmartPhotoCrafter, then restart. This pack is the heavier cousin of a standard Qwen-Edit setup: it wants the full SmartPhotoCrafter weight set (DiT, VLM, VAE, optional LoRAs) in fixed locations under ComfyUI/models, downloaded like this from the models directory:

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

The ModelLoader leans on DiffSynth disk offload on CUDA, so a 20B editor runs on a smaller card than the math says it should - just slowly. The dependencies (diffsynth, transformers, peft, accelerate, sentencepiece) install with the pack, but torch is intentionally left out: don't build a fresh PyTorch over ComfyUI's environment.

Common issues

First generation after a restart will be slow - the loader caches the editor, and a fresh ComfyUI session means a full model load before your first image comes back. If the output is too "rewritten," smaller steps won't help much; this is an automatic enhancer, not a gentle filter. And if you were planning anything commercial: the SmartPhotoCrafter weights are CC BY-NC-SA 4.0 - non-commercial, share-alike. Read it before you ship.

CategoryRunningHub/SmartPhotoCrafter

Inputs (10)

NameTypeDefaultDescription
editorRH_SMARTPHOTOCRAFTER_EDITOREditor object returned by RunningHub SmartPhotoCrafter ModelLoader.
imageIMAGEInput photo to analyze and automatically enhance.
widthINT00–4096Output width. Set 0 with height 0 to preserve aspect ratio and resize by target_pixels.
heightINT00–4096Output height. Set 0 with width 0 to preserve aspect ratio and resize by target_pixels.
target_pixelsINT104857665536–4194304Target total pixels used when width and height are both 0. Larger values use more VRAM and time.
num_inference_stepsINT201–100Diffusion sampling steps. Higher values are slower and may improve detail.
seedINT420–4294967295Random seed for image generation. Values outside 0 to 2^32-1 are normalized before execution.
tiledBOOLEANfalseEnable tiled VAE decoding to reduce peak memory usage at the cost of speed.
tile_sizeINT12864–1024Tile size for tiled VAE decoding. Larger tiles may improve consistency but use more memory.
tile_strideINT6416–512Tile stride for tiled VAE decoding. Smaller stride increases overlap and processing time.

Outputs (2)

NameTypeDescription
imageIMAGE
analysis_textSTRING