vivoCameraResearch/SmartPhotoCrafter

official github code for "SmartPhotoCrafter: Unified Reasoning, Generation and Optimization for Automatic Photographic Image Editing"

154

stars

27

commits

Python

primary language

Aug 31, 2026

updated

vivocameraresearch.github.io/smartphotocrafterweb/
automatic
automatic-editing
automatic-image-optimization
deblur
dehaze
diffusionnft
grpo-training
image-editing
image-restoration
image-retouching
low-level-vision
photography-editing
photography-generation
qwen2-5-vl-7b
qwen-image-edit-2509
reasoning-to-generation
retouching
rl-algorithms
unified-model
unified-modeling

README

SmartPhotoCrafter: Unified Reasoning, Generation and Optimization for Automatic Photographic Image Editing

arxiv  Project  HuggingFace  ModelScope  License 

SmartPhotoCrafter is an end-to-end framework for automatic photographic image editing that reformulates traditional editing as a closed-loop reasoning-to-generation process. Unlike prior methods that rely on explicit user instructions, our approach autonomously identifies aesthetic deficiencies, reasons about improvement strategies, and performs targeted edits without human prompts.

✨ Highlights

  • Fully Automatic Editing – No user instructions or parameters required; the model completes the closed loop of quality assessment → reasoning → editing autonomously.
  • Dual Capability – Supports both image restoration (denoising, deblurring, low-light enhancement) and image retouching (color, tone, contrast enhancement).
  • Aesthetic Reasoning – Explicitly generates image quality analysis and editing suggestions, improving interpretability.
  • High-Fidelity Generation – Preserves original content structure while delivering photo-realistic outputs with high tonal/color semantic sensitivity.
  • Reinforcement Learning Optimization – Jointly optimizes reasoning and generation modules, aligning editing trajectories with human aesthetic preferences.

🖼️ Demo

teaser

🖼️ Demo Video

SmartPhotoCrafter

📣 News

  • 2026/04/07: We open-source the inference scripts.
  • 2026/04/22: Our Paper on ArXiv is available.
  • 2026/05/26: The weights are released!

✅ To-Do List for SmartPhotoCrafter Release

✅ Release the inference code of SmartPhotoCrafter
✅ Release the SmartPhotoCrafter weights
[ ] Release the RL-stage training code

Requirements and Installation

Prepare Environment

Create a conda environment & install requirements

conda create -n smartphotocrafter python=3.10
conda activate smartphotocrafter
pip install -r requirements.txt

📦 Pretrained Model Weights

ModelsDownloadFeatures
SmartPhotoCrafter🤗 HuggingfaceFine-tuned Model
Qwen-Image-Edit-2509🤗 Huggingface 🤖 ModelScopeBase Model

😉 Demo Inference

Please download the pretrained weights and put them under models/. Automatic image editing only requires inputting one image, and SmartPhotoCrafter will output an enhanced version under example/output/.

Inference example

CUDA_VISIBLE_DEVICES=0 python infer.py \
--dit_path "models/SmartPhotoCrafter/dit.safetensors" \
--vlm_path "models/SmartPhotoCrafter/vlm/" \
--vae_path "models/Qwen-Image-Edit-2509/vae/diffusion_pytorch_model.safetensors" \
--dit_lora_path "models/SmartPhotoCrafter/dit_lora" \
--vlm_lora_path "models/SmartPhotoCrafter/vlm_lora" \
--image_path "example/input/test.png" \
--output_folder "example/output/" \
--seed 42

🚀 Training

Coming Soon ...

⭐ Acknowledgement

Our code is modified based on Edit-R1. We adopt Qwen-Image-Edit-2509 as the base model.

📜 License

All the materials, including code, checkpoints, and demos, are made available under the Creative Commons BY-NC-SA 4.0 license. You are free to copy, redistribute, remix, transform, and build upon the project for non-commercial purposes, as long as you give appropriate credit and distribute your contributions under the same license.

🎓 Citation

@article{zeng2026smartphotocrafter,
  title={SmartPhotoCrafter: Unified Reasoning, Generation and Optimization for Automatic Photographic Image Editing},
  author={Zeng, Ying and Luo, Miaosen and Li, Guangyuan and Yang, Yang and Fan, Ruiyang and Shi, Linxiao and Yang, Qirui and Zhang, Jian and Liu, Chengcheng and Zheng, Siming and others},
  journal={arXiv preprint arXiv:2604.19587},
  year={2026}
}

Contributors

zengy268

17 commits

PengtaoJiang

8 commits

LuoMSen

1 commits

xyf5432

1 commits

vivoCameraResearch/SmartPhotoCrafter

official github code for "SmartPhotoCrafter: Unified Reasoning, Generation and Optimization for Automatic Photographic Image Editing"

154

stars

27

commits

Python

primary language

Aug 31, 2026

updated

vivocameraresearch.github.io/smartphotocrafterweb/
automatic
automatic-editing
automatic-image-optimization
deblur
dehaze
diffusionnft
grpo-training
image-editing
image-restoration
image-retouching
low-level-vision
photography-editing
photography-generation
qwen2-5-vl-7b
qwen-image-edit-2509
reasoning-to-generation
retouching
rl-algorithms
unified-model
unified-modeling

README

SmartPhotoCrafter: Unified Reasoning, Generation and Optimization for Automatic Photographic Image Editing

arxiv  Project  HuggingFace  ModelScope  License 

SmartPhotoCrafter is an end-to-end framework for automatic photographic image editing that reformulates traditional editing as a closed-loop reasoning-to-generation process. Unlike prior methods that rely on explicit user instructions, our approach autonomously identifies aesthetic deficiencies, reasons about improvement strategies, and performs targeted edits without human prompts.

✨ Highlights

  • Fully Automatic Editing – No user instructions or parameters required; the model completes the closed loop of quality assessment → reasoning → editing autonomously.
  • Dual Capability – Supports both image restoration (denoising, deblurring, low-light enhancement) and image retouching (color, tone, contrast enhancement).
  • Aesthetic Reasoning – Explicitly generates image quality analysis and editing suggestions, improving interpretability.
  • High-Fidelity Generation – Preserves original content structure while delivering photo-realistic outputs with high tonal/color semantic sensitivity.
  • Reinforcement Learning Optimization – Jointly optimizes reasoning and generation modules, aligning editing trajectories with human aesthetic preferences.

🖼️ Demo

teaser

🖼️ Demo Video

SmartPhotoCrafter

📣 News

  • 2026/04/07: We open-source the inference scripts.
  • 2026/04/22: Our Paper on ArXiv is available.
  • 2026/05/26: The weights are released!

✅ To-Do List for SmartPhotoCrafter Release

✅ Release the inference code of SmartPhotoCrafter
✅ Release the SmartPhotoCrafter weights
[ ] Release the RL-stage training code

Requirements and Installation

Prepare Environment

Create a conda environment & install requirements

conda create -n smartphotocrafter python=3.10
conda activate smartphotocrafter
pip install -r requirements.txt

📦 Pretrained Model Weights

ModelsDownloadFeatures
SmartPhotoCrafter🤗 HuggingfaceFine-tuned Model
Qwen-Image-Edit-2509🤗 Huggingface 🤖 ModelScopeBase Model

😉 Demo Inference

Please download the pretrained weights and put them under models/. Automatic image editing only requires inputting one image, and SmartPhotoCrafter will output an enhanced version under example/output/.

Inference example

CUDA_VISIBLE_DEVICES=0 python infer.py \
--dit_path "models/SmartPhotoCrafter/dit.safetensors" \
--vlm_path "models/SmartPhotoCrafter/vlm/" \
--vae_path "models/Qwen-Image-Edit-2509/vae/diffusion_pytorch_model.safetensors" \
--dit_lora_path "models/SmartPhotoCrafter/dit_lora" \
--vlm_lora_path "models/SmartPhotoCrafter/vlm_lora" \
--image_path "example/input/test.png" \
--output_folder "example/output/" \
--seed 42

🚀 Training

Coming Soon ...

⭐ Acknowledgement

Our code is modified based on Edit-R1. We adopt Qwen-Image-Edit-2509 as the base model.

📜 License

All the materials, including code, checkpoints, and demos, are made available under the Creative Commons BY-NC-SA 4.0 license. You are free to copy, redistribute, remix, transform, and build upon the project for non-commercial purposes, as long as you give appropriate credit and distribute your contributions under the same license.

🎓 Citation

@article{zeng2026smartphotocrafter,
  title={SmartPhotoCrafter: Unified Reasoning, Generation and Optimization for Automatic Photographic Image Editing},
  author={Zeng, Ying and Luo, Miaosen and Li, Guangyuan and Yang, Yang and Fan, Ruiyang and Shi, Linxiao and Yang, Qirui and Zhang, Jian and Liu, Chengcheng and Zheng, Siming and others},
  journal={arXiv preprint arXiv:2604.19587},
  year={2026}
}

Contributors

zengy268

17 commits

PengtaoJiang

8 commits

LuoMSen

1 commits

xyf5432

1 commits

Languages

Python

100.0%