Note: This HuggingFace repository only contains model weights. The full codebase for MonetGPT is available on our GitHub repository.
Overview
MonetGPT is a novel framework that teaches multimodal large language models (MLLMs) to perform professional-quality image retouching through procedural operations. Unlike generative editing approaches that can unpredictably alter image content, MonetGPT learns to plan and execute sequences of traditional retouching operations (brightness, contrast, saturation, etc.) that preserve object identity and provide explainable results.
Visual Puzzles for Operation Awareness
🧩 MLLMs learn retouching operations by solving specially designed visual puzzles that teach operation recognition, parameter understanding, and sequence planning.Unlike black-box generative models, MonetGPT provides clear reasoning for each editing decision and preserves original image content and resolution (e.g., 8K 16-bit).
Download the trained MonetGPT model from Hugging Face:
bash
1# Navigate to llm directory and create models folder2cd llm
3mkdir -p models
4cd models
56# Download the model using HF CLI7huggingface-cli download niladridutt/monetGPT
89# OR Clone the model repository (requires git lfs)10git clone https://huggingface.co/niladridutt/monetGPT
Note: Ensure the model is saved as llm/models/monetGPT to match the expected directory structure or otherwise modify the configs in llm.
� Usage
MonetGPT Pipeline
Inference
First start the LLM, which shall launch a server
bash
1cd llm
2sh test.sh
3cd..
Run image enhancement/retouching with the pre-trained MonetGPT model (make sure the LLM is running):
bash
1# Single image processing23python inference_cli.py single input.jpg --output results/edited.jpg
45# Batch processing6python inference_cli.py batch assets/test --output-dir results/
📚 Training Your Own Model
1. Dataset Preparation
See image_sources in configs/dataset_config.yaml
bash
1# Prepare your training images2mkdir -p data/ppr10k
3# Place your .png/.jpg images in data/images/
1# LLM settings for reasoning generation2model:"gemini-2.0-flash"3api_key:""# Set your API key here4base_url:"https://generativelanguage.googleapis.com/v1beta/openai/"5timeout:56retry_attempts:178# Puzzle paths and settings9puzzles:10puzzle1:11reasoning_path:"./data/puzzles1/reasoning/*.txt"12images_path:"./data/puzzles1/images/*.png"13images_base_path:"./data/puzzles1/images"14output_file:"data/sharegpt_puzzle_1.json"1516puzzle2:17reasoning_path:"./data/puzzles2/reasoning/*.txt"18images_path:"./data/puzzles2/images/*.png"19images_base_path:"./data/puzzles2/images"20output_file:"data/sharegpt_puzzle_2.json"2122puzzle3:23reasoning_path:"./data/puzzles3/reasoning/*.txt"24images_path:"./data/puzzles3/images/*/*.tif"25images_base_path:"./data/puzzles3/images"26output_file:"data/sharegpt_puzzle_3.json"2728# Generation settings29generation:30num_standard_trials:231num_color_trials:132num_puzzle3_trials:10
1# GIMP settings2gimp:3paths:4macos:"/Applications/GIMP.app/Contents/MacOS/gimp-console-2.10"5linux:"flatpak run org.gimp.GIMP//stable --no-interface"6windows: "gimp-console-2.10.exe" (Not tested, may require some modifications)
78batch_interpreter:"python-fu-eval"9python_warnings:"ignore"10pipeline_file:"./gimp_pipeline.py"1112# Image processing settings13image_processing:14max_low_res_size:700# Low resolution for LLM training only15default_dpi:140# Original resolution preserved during inference1617# Processing parameters18processing:19batch_size:1020max_workers:421timeout_seconds:120
Benchmark Performance
MonetGPT achieves state-of-the-art results on image retouching tasks while providing full explainability and maintaining original image resolution.
🔧 Troubleshooting
Common Issues
GIMP Not Found: Ensure GIMP 2.10 is installed and the path in configs/pipeline_config.yaml matches your installation.
NumPy Import Error: Install NumPy in GIMP's Python environment (see GIMP installation section).
Model Download Issues: Verify Git LFS is installed for large model files: git lfs install
📄 Citation
If you find MonetGPT useful in your research, please consider citing our paper:
bibtex
1@article{dutt2025monetgpt,
2 title={MonetGPT: Solving Puzzles Enhances MLLMs' Image Retouching Skills},
3 author={Dutt, Niladri Shekhar and Ceylan, Duygu and Mitra, Niloy J},
4 journal={ACM Transactions on Graphics (TOG)},
5 volume={44},
6 number={4},
7 pages={1--12},
8 year={2025},
9 publisher={ACM New York, NY, USA}
10}
This project uses image dehazer as one of the image operations. This code is adapted from Single-Image-Dehazing-Python, which is licensed under the BSD 2-Clause License. A copy of this license can be found in the licenses/BSD-2-Clause.txt file.