A real-time StreamDiffusion pipeline node for ComfyUI with integrated ControlNet, IPAdapter, and LoRA support.
- Real-time, multi-control Stable Diffusion workflows
- Integrated ControlNet, IPAdapter, and LoRA support
- TensorRT acceleration for high performance
- Flexible configuration and batching
- Dynamically change parameter values at runtime via the streaming sampler node
comfy node install streamdiffusion
Clone this repository into your ComfyUI custom nodes directory:
git clone https://github.com/RUFFY-369/ComfyUI-StreamDiffusion.git
Install dependencies:
pip install -r requirements.txt
After installation, launch ComfyUI. The StreamDiffusion node and its features will be available in the node menu.
-
Build TensorRT Engines
- Use the workflow:
examples/sd15_tensorrt_engine_build.json - This workflow demonstrates how to build TensorRT engines for your models within ComfyUI.
- Alternatively, you can run the script
scripts/build_tensorrt_engines.pydirectly to build engines without using the ComfyUI workflow.
- Use the workflow:
-
Inference with Streaming Sampler
- Use the workflow:
examples/sd15_all_dynamic_params_wlora.json - This workflow shows how to use the built engines for real-time inference and dynamically change parameters with the streaming sampler node.
- Use the workflow:
To use these workflows:
- Open ComfyUI.
- Load the desired workflow JSON file from the
examples/directory. - Follow the node connections and adjust parameters as needed.
- Python 3.10+
- NVIDIA GPU (for TensorRT acceleration)
- ComfyUI >= 1.0.0
This project is licensed under the terms of the Apache License 2.0, the same as the original StreamDiffusion repository.
If you use this node or its ideas in your research or projects, please cite the original StreamDiffusion paper:
StreamDiffusion: Real-Time Text-to-Image Generation on Video and Web Cameras (arXiv:2312.12491)
@article{zhang2023streamdiffusion,
title={StreamDiffusion: Real-Time Text-to-Image Generation on Video and Web Cameras},
author={Zhang, Yifan and others},
journal={arXiv preprint arXiv:2312.12491},
year={2023}
}