Stable Diffusion - Webcam Mirror - API Library

               
by

Published May 22, 2023 at 18:09
Open In Editor


TO USE THIS PATCH you will need to install Stable Diffusion WebUI AND Controlnets for WebUI, Locally on your machine download SD: https://github.com/AUTOMATIC1111/stable-diffusion-webui
Install Control-Net: https://github.com/Mikubill/sd-webui-controlnet
Tutorial

AND run it with these Command-Line Arguments:
--api --xformers --cors-allow-origins https://dev.cables.gl,https://sandbox.cables.gl,https://cables.gl

You can also download the prepared windows .bat or Mac .sh files into your ...\stable-diffusion-webui folder and run those to start SD with the right command-line arguments already enabled.

If you have correctly installed ControlNet you can use the Preprocessors and ControlNet of your choice on your Webcam Input.

There are many more parameters of SD you can change on the StableDiffusion_Node and within it, I just was too lazy to put them all in the sidebar.

KNOWN BUGS:
SD will crash on load if you try to generate an image before SD is FULLY loaded! No idea yet how to check if SD is loaded fully without causing the loading process to crash... Any ideas are very welcome.... Pinging does not work. I don't know why...

SD will through errors when generating if you don't have any Control-Nets installed. Should probably make a check for available controlnets and put a switch in the json creation..., but I'm too lazy.. also, who doesn't use controlnets these days.... tststs...

//////////////////////////////////////////////

This is a continuation of the awesome cables patch by @neight:
https://cables.gl/p/_IejRr

Kirell helped A LOT with the necessary Command-Line Arguments.

tob_har helped a ton with the API-Calls.

Licence: Public Domain Dedication

Commercial use ok, freely remix, reuse this work without restriction, please credit the author.
 



More patches made by cables users





what is cables?


Cables is a tool for creating beautiful interactive content. With an easy to navigate interface and real time visuals, it allows for rapid prototyping and fast adjustments.

cables is free to use!

Register