NDI & OSC extension for real-time Stable Diffusion interactive generation with StreamDiffusion.
- NDI (video) streaming over the network or localhost.
- OSC communication for prompt and FPS.
Supported version Python 3.10
- Install StreamDiffusion with TensorRT.
- Install SteamDiffusion-NDI in StreamDiffusion environment with
pip install -r requirements.txt
- Accelerate model with an example script (temporal solution). Change acceleration to
tensorrt
. - Configure
config.json
- Run in StreamDiffusion environment
python sd_ndi.py
- Add NDI output to send images in Stable Diffusion and NDI input (SD-NDI) to receive processed images
- Send string with OSC at
/prompt
address change the prompt during the inference - You can get inference FPS at
/fps
address on client side
Look in config.json
for an example configuration.
"sd_model": "path to diffusers model",
"t_index_list": [Number of inference steps],
"engine": "path to the folder with the accelerated model",
"min_batch_size": depends on your configuration,
"max_batch_size": depends on your configuration,
"ndi_name": "NDI client name to recieve from",
"osc_out_adress": client address for receiving FPS value,
"osc_out_port": client port for receiving FPS value,
"osc_in_adress": server address for receiving commands.,
"osc_in_port": server port for receiving commands.