ComfyUI_PhotoDoodle

ComfyUI_PhotoDoodle
★ 94

图像编辑少样本学习艺术风格迁移ComfyUI节点
基于少样本成对数据学习的艺术图像编辑节点,集成于ComfyUI,能在少量示例下实现风格化处理。
💡 用少量示例对照片进行艺术化风格编辑
🍴 2 Forks💻 Python🔄 2025-03-20
📦 网盘链接待填入
📦 requirements.txt
accelerate>=0.33.0
transformers>=4.44.0
diffusers==0.32.2
peft>=0.15.0
#diffusers[torch]==0.25.0
#ftfy==6.1.1
#
albumentations==1.3.0
#opencv-python==4.8.1.78
#einops==0.7.0
#pytorch-lightning==1.9.0
bitsandbytes>=0.44.0
#prodigyopt==1.0
#lion-pytorch==0.0.6
#came_pytorch==0.1.3
#schedulefree==1.4
#tensorboard
#safetensors==0.4.4
#
for
gradio
#gradio==3.6
#altair==4.2.2
#easygui==0.98.3
#toml==0.10.2
#voluptuous==0.13.1
#huggingface-hub==0.24.5
#
for
Image
utils
#imagesize==1.4.1
#numpy<=2.0
#rich==13.7.0
#
for
T5XXL
tokenizer
(SD3/FLUX)
#sentencepiece==0.2.0
#mmgp
📄 README

PhotoDoodle

PhotoDoodle it a method about ‘Learning Artistic Image Editing from Few-Shot Pairwise Data’,you can use it in comfyUI

Update

  • add fp8 nf4 transformer and T5 quantinaze chocie,add seed,增加量化菜单,和T5量化选项,用于repo模式,增加seed。
  • 1.Installation


    In the ./ComfyUI /custom_node directory, run the following:

    git clone https://github.com/smthemex/ComfyUI_PhotoDoodle

    2.requirements


    pip install -r requirements.txt
  • If OOM try pip install mmgp ,如果OOM ,试一下用mmgp
  • 3.checkpoints

  • 3.1 mode use ‘flux dev single checkpoints(fp8 or fp16)’ or ‘repo’ or ‘unet+ae+comfyui T5XXX’ ,三种选择,使用flux dev的fp8或fp16单体模型 或者使用repo,或者使用flux unet+ae+comfy的T5双clip
  • ├── ComfyUI/models/diffusion_models/
    |     ├── flux1-kj-dev-fp8.safetensors  # if use fp8 unet  11G  unet+vae+clip方法不推荐,因为更容易爆显存
    |     ├── flux1-dev-fp8.safetensors  # if use fp8 single 16G  comfy官方单体fp8模型或者flux官方单体模型,正常12G能跑,不用开mmgp
  • 3.2 more lora download from here
  • ├── ComfyUI/models/loras/
    |     ├── pretrain.safetensors  # 必须要
    |     ├── skscloudsketch.safetensors  # 选你喜欢的lora

    4 Example

  • if use single files,vae must choice “none” #flux1-dev-fp8.safetensors 16G 单体16G模型,内置clip和vae那种,vae必须选择”none”,不开启mmgp,次要推荐使用
  • if use repo ‘black-forest-labs/FLUX.1-dev’ or C:/youpath/black-forest-labs/FLUX.1-dev 如果使用repo可以用自动下载或本地,不开启mmgp,第一推荐使用
  • if use unet #11G 单体unet模型,没有内置clip和vae的,所以必须要连双clip和选vae,可以不开启mmgp,12G可能会OOM
  • 5. Acknowledgments

  • Thanks to Yuxuan Zhang and Hailong Guo for providing the code base.
  • Thanks to Diffusers for the open-source project.
  • 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}, 
    }