Skip to content

Yuan-ManX/ComfyUI-Step1X-Edit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI-Step1X-Edit

Make Step1X-Edit avialbe in ComfyUI.

Step1X-Edit: A Practical Framework for General Image Editing. A SOTA open-source image editing model, which aims to provide comparable performance against the closed-source models like GPT-4o and Gemini 2 Flash.

Installation

  1. Make sure you have ComfyUI installed

  2. Clone this repository into your ComfyUI's custom_nodes directory:

cd ComfyUI/custom_nodes
git clone https://github.com/Yuan-ManX/ComfyUI-Step1X-Edit.git
  1. Install dependencies:
cd ComfyUI-Step1X-Edit
pip install -r requirements.txt

Model

👋 We release the inference code and model weights of Step1X-Edit. ModelScope & HuggingFace models.

👋 We have made our technical report available as open source. Read

🎉 With community support, we update the inference code and model weights of Step1X-Edit-FP8. meimeilook/Step1X-Edit-FP8 & rkfg/Step1X-Edit-FP8.

2.1 Requirements

The following table shows the requirements for running Step1X-Edit model (batch size = 1, w/o cfg distillation) to edit images:

Model Peak GPU Memory (512 / 786 / 1024) 28 steps w flash-attn(512 / 786 / 1024)
Step1X-Edit 42.5GB / 46.5GB / 49.8GB 5s / 11s / 22s
Step1X-Edit-FP8 31GB / 31.5GB / 34GB 6.8s / 13.5s / 25s
Step1X-Edit + offload 25.9GB / 27.3GB / 29.1GB 49.6s / 54.1s / 63.2s
Step1X-Edit-FP8 + offload 18GB / 18GB / 18GB 35s / 40s / 51s
  • The model is tested on one H800 GPUs.
  • We recommend to use GPUs with 80GB of memory for better generation quality and efficiency.
  • The Step1X-Edit-FP8 model we tested comes from meimeilook/Step1X-Edit-FP8.

2.2 Dependencies and Installation

python >=3.10.0 and install torch >= 2.2 with cuda toolkit and corresponding torchvision. We test our model using torch==2.3.1 and torch==2.5.1 with cuda-12.1.

Install requirements:

pip install -r requirements.txt

Install flash-attn, here we provide a script to help find the pre-built wheel suitable for your system.

python src/scripts/get_flash_attn.py

The script will generate a wheel name like flash_attn-2.7.2.post1+cu12torch2.5cxx11abiFALSE-cp310-cp310-linux_x86_64.whl, which could be found in the release page of flash-attn.

Then you can download the corresponding pre-built wheel and install it following the instructions in flash-attn.

About

Make Step1X-Edit avialbe in ComfyUI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages