This is a custom node aiming to run CogView4 on diffusers while there is no official implementation on ComfyUI. NOTE: You will need a updated version of diffusers and I don't know if updating it my break other stuff, so I advise you to make in a new instance of ComfyUI
Clone this repository to your ComfyUI's custom_nodes
folder:
cd ComfyUI/custom_nodes
git clone https://github.com/your-username/ComfyUI-Cog
Install the required dependencies:
# For standard ComfyUI installation (non-portable):
pip install diffusers transformers accelerate
# To install the latest version of diffusers (recommended):
pip install git+https://github.com/huggingface/diffusers.git
# For ComfyUI Portable:
.\python_embeded\python.exe -m pip install diffusers transformers accelerate
# Or for the latest version of diffusers:
.\python_embeded\python.exe -m pip install git+https://github.com/huggingface/diffusers.git
Restart ComfyUI
After installation, you'll have access to a new node:
This is the main node that generates images using the CogView4 model.
The CogView4 model does not support progress callbacks, so there is no real-time progress bar available during generation. You will see console output when generation starts and finishes, but no step-by-step progress indication.
If you encounter import errors like No module named 'diffusers'
, make sure you have installed all required dependencies.
If you receive errors like CUDA out of memory
, try:
On the first run, the model will be downloaded from Hugging Face (approximately 12GB). This can take some time depending on your internet connection.