--- license: cc-by-nc-4.0 # Assuming a Creative Commons license, adjust if needed. task_categories: - image-to-image tags: - image-editing - artistic-style-transfer - few-shot-learning --- # PhotoDoodle: Learning Artistic Image Editing from Few-Shot Pairwise Data [Paper](https://arxiv.org/abs/2502.14397) | [Hugging Face Model](https://huggingface.co/nicolaus-huang/PhotoDoodle) Authors: [Huang Shijie](https://scholar.google.com/citations?user=HmqYYosAAAAJ), [Yiren Song](https://scholar.google.com.hk/citations?user=L2YS0jgAAAAJ), [Yuxuan Zhang](https://xiaojiu-z.github.io/YuxuanZhang.github.io/), [Hailong Guo](https://github.com/logn-2024), Xueyin Wang, [Mike Zheng Shou](https://sites.google.com/view/showlab), [Liu Jiaming](https://scholar.google.com/citations?user=SmL7oMQAAAAJ&hl=en) [Show Lab](https://sites.google.com/view/showlab), National University of Singapore ## Dataset This dataset provides paired image data for artistic image editing. Each entry contains: * **source:** Path to the original image. * **target:** Path to the artistically edited image. * **caption:** A description of the edits applied. The dataset is available on [Hugging Face Datasets](https://huggingface.co/datasets/nicolaus-huang/PhotoDoodle). See the [dataset README](./data/README.md) for further details (add if a separate README exists). ## Quick Start (Model Usage) ### Configuration 1. **Environment setup:** ```bash git clone git@github.com:showlab/PhotoDoodle.git cd PhotoDoodle conda create -n doodle python=3.11.10 conda activate doodle ``` 2. **Requirements installation:** ```bash pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124 pip install --upgrade -r requirements.txt ``` ### Inference The provided code integrates the `diffusers` pipeline with the PhotoDoodle model. You can run inference using the script: ```bash python inference.py ``` or directly use the pipeline: (Code example from original README remains here) ```python from src.pipeline_pe_clone import FluxPipeline import torch from PIL import Image # ... (rest of the inference code from original README) ``` ### Model Weights [Hugging Face Model](https://huggingface.co/nicolaus-huang/PhotoDoodle) contains the following weights: | Model Name | Description | Resolution | |---------------------------------|------------------------------------------------|------------| | `pretrain.safetensors` | Base PhotoDoodle model | 768, 768 | | `sksmonstercalledlulu.safetensors` | Style model for Cartoon monster | 768, 512 | | `sksmagiceffects.safetensors` | Style model for 3D effects | 768, 512 | | `skspaintingeffects.safetensors` | Style model for Flowing color blocks | 768, 512 | | `sksedgeeffect.safetensors` | Style model for Hand-drawn outline | 768, 512 | **(Note: You need to load and fuse the `pretrained` checkpoint to use the style models.)** ### Results ![R-F](./assets/R-F.jpg) ## Citation ``` @misc{huang2025photodoodlelearningartisticimage, title={PhotoDoodle: Learning Artistic Image Editing from Few-Shot Pairwise Data}, author={Shijie Huang and Yiren Song and Yuxuan Zhang and Hailong Guo and Xueyin Wang and Mike Zheng Shou and Jiaming Liu}, year={2025}, eprint={2502.14397}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2502.14397}, } ```