This project is an unofficial ComfyUI implementation of InvSR (Arbitrary-steps Image Super-resolution via Diffusion Inversion)
![](https://private-user-images.githubusercontent.com/42040906/406856699-6c057a3c-3355-4060-9161-a88ab6f6d986.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjUxNDMsIm5iZiI6MTczOTM2NDg0MywicGF0aCI6Ii80MjA0MDkwNi80MDY4NTY2OTktNmMwNTdhM2MtMzM1NS00MDYwLTkxNjEtYTg4YWI2ZjZkOTg2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDEyNTQwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY1NWRkZWQ0NWI5MzY2MzU5ODE4NWNkNGQxY2I1NDQxOWZkYzk5ZjQzYTdlYmRjMDY3OGE2ZmU4NTkzYWIyMzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.BbZyheuPC1XfelNruDZHa5aMUebstX9weqO33dj-LN0)
Navigate to the ComfyUI /custom_nodes
directory
git clone https://github.com/yuvraj108c/ComfyUI_InvSR
cd ComfyUI_InvSR
# requires diffusers>=0.28
pip install -r requirements.txt
- Load example workflow
- Diffusers model (stabilityai/sd-turbo) will download automatically to
ComfyUI/models/diffusers
- InvSR model (noise_predictor_sd_turbo_v5.pth) will download automatically to
ComfyUI/models/invsr
- To deal with large images, e.g, 1k---->4k, set
chopping_size
256 - If your GPU memory is limited, please set
chopping_batch_size
to 1
num_steps
: number of inference stepscfg
: classifier-free guidance scalebatch_size
: Controls how many complete images are processed simultaneouslychopping_batch_size
: Controls how many patches from the same image are processed simultaneouslychopping_size
: Controls the size of patches when splitting large imagescolor_fix
: Method to fix color shift in processed images
03 February 2025
- Add cfg parameter
- Make image divisible by 16
- Use
mm
to set torch device
31 January 2025
@article{yue2024InvSR,
title={Arbitrary-steps Image Super-resolution via Diffusion Inversion},
author={Yue, Zongsheng and Kang, Liao and Loy, Chen Change},
journal = {arXiv preprint arXiv:2412.09013},
year={2024},
}
This project is licensed under NTU S-Lab License 1.0