This project provides a TouchDesigner workflow for seamless integration with Streamdiffusion using Spout2 texture sharing. StreamdDiffusion enhance the diffusion process by making it almost real time, and this integration allows users to incorporate it directly into their TouchDesigner projects.
Before using this integration, ensure that you have the following software installed:
- TouchDesigner (tested using 2023.11280)
- Spout2 SDK (https://spout.zeal.co/)
- Clone the repository
git clone https://github.com/ammlyy/StreamDiffusion-TD.git
cd StreamDiffusion-TD
git submodule update --init
-
Setup StreamDiffusion environment. Please follow instructions on their github page.
After having installed them, the additional libraries needed:
conda activate YOUR_JUST_CREATED_ENV pip install PyOpenGL PyOpenGL_accelerate pip install pygame
-
Open the .toe project
-
Launch the main.py script
This projects make use of a custom Spout2-Python binding. There were alternatives, such as Python-SpoutGL, but I preferred starting from a simplest solution originally released as PySpout and added missing bindings to have a look of what were going on under the hood.
If you encounter issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Your contributions are welcome!
This project is licensed under the Apache 2.0 License, allowing for open collaboration and sharing.