Ai continuing changing image with a combination of Touchdesigner and Stable Diffusion

Hello everyone, I am making a little project on a continuous image diffusion via a Stable Diffusion model I run locally in my pc.

So, I have an HDR image that I plan to wrap in a sphere that acts as a skydome that changes all the time, showing you ‘new worlds’. But thats another story. For now I try to cut random parts of the HDR image and diffuse them in Stable Diffusion automatically via this API (GitHub - olegchomp/TDDiffusionAPI: TouchDesigner interface for AUTOMATIC1111) which makes an interface of Stable diffusion in Touchdesigner. Then I get the diffused image and I project it in the place on the HDR image with a feedback loop.

The project is not finished yet, there are some errors and the feedback doesn’t work correctly rn. Also I’m a beginner in TD and I’m not sure I’ve done it in the best possible way so feel free to suggest me other ways.

Bellow is my drive with the tox file if anyone wants to take a look and give me suggestions. (dont mind the bypassed operators, I tried to make the project without the API just by saving the cropped image in a file and then importing the diffused from another file, but the automation of the stable diffusion was impossible for me).

https://drive.google.com/drive/u/0/folders/1sqdipSkHTS1yGVqPetD1i5Mmi2sUWbDe

1 Like