SD_API 1.22
SD_API 1.22 !
New Features:
-One click launch automatic1111 from Touchdesigner
-Switch SD Models via SD_API
-Completely updated Dreamstudio API, including support for SDXL
-Multi-Controlnet - redesigned controlnet setup that adds an external controlnet operator per layer (released in 1.2)
-QOL improvements / organization across the operator
[removed the 'Outputlastframe' error message.]
Also - Updated version of match_color_histogram.
-Separate match color sliders per channel / mode
-Smooth histogram value to reduce noise
Comments (44)
Hi, i am trying to get this working on a Mac, but having the issues as the others. I can get SD working in the browser but there is no communicaiton seeming to happen. I did notice inside your file there is an error saying 'Warning; File not found' and it's looking for a file inside the output_folder called settings_data.dat which doesn't seem to exist. (this is in project1/SD_API/filein1)
Hi. Could you run it on Mac?
Hello !! I have a problem, as I am doing elektronnaut stable diffusion tutorial with SD_API. For no reason, in my TD , the SD_API is not able to run stable_difussion. everything is well installed, and in the OS X terminal I run correctly webui.sh and it opens stable diffusion, but the SD_API simply doesn't open it.. I think the problem is that SD_API tries to launch a .bat file, but on Mac OS it doesn´t work if you have any clue on this, please help! I am pretty sure that it is on the parsec_launch_webui component
Hey, I have the same problem. Any solutions yet?
I get this error in the console when trying to use the APIL File "/Applications/TouchDesigner.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Applications/TouchDesigner.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cv2/__init__.py", line 181 bootstrap() File "/Applications/TouchDesigner.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cv2/__init__.py", line 76, in bootstrap raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.') ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation. python >>> I checked my installation of python OpenCV and am on version 4.9 (which I believe to be latest) What steps can I take to trouble shoot this?
At first I downloaded your file and launching didn't automatically download automatic1111. So, I independently downloaded it and it works. It shows Automatic1111 connected but nothing is generating when I hit pulse. Another thing that I've noted it that launch.py doesn't launch program with argumenta while the webui.user.bat does it. Apart from that it works as normal on browser, I've added --api too.
This operator is a bit outdated for sure. I hope to have a few free days this month to dive in a freshen it up. I've been following automatic1111 development a bit less since comfyui has gotten more powerful / modular.
Hey dude -- awesome work. The launch webui pulse works fine for me at first -- but it automatically opens the webui in a Chrome tab and then the API in TD tells me its disconnected from Automatic1111. Any ideas?
Hi there, I m getting a few errors on the SD_API with the progress1 node, and progress node, " AttributeError: module 'tdu' has no attribute 'TableMenu' (project1/SD_API/progress1) warning: (parameter menusource: API Get) Traceback (most recent call last):............
The TableMenu was added in Touchdesigner version 2022. So I'm guessing that is the issue. Using any TD version 2022 should fix if you can switch over. I'm using that method to allow options for many of the menus to update based on the server options.
Hi! First and foremost, thanks a million for your efforts on this - subscribed to the Patreon straight away. I've come quite far with installing this on MacOS, and the SD_API says it's connected to Automatic1111, but it doesn't generate an image, just a red pixel in the bottom right corner. I'm assuming a user error here, could you point me in the right direction?
Did you resolve this?
hello! new to the patreon, love your workk, im having trouble having the API status in the sd api saying connected, any idea why?
it says Automatic1111 disconnected
Hello! how are you? I have a question, I am watching the elektronaut tutorial using the SD_API, but when I get to the point of pressing Launch webUI this message opens and it doesn't let me continue, Couldn't launch python exit code: 9009 stderr: Python not found; run without arguments to install from the Microsoft Store or disable this shortcut in Settings > Manage app launch aliases. Launch unsuccessful. Exiting. Press a key to continue . . . If you could help me I would appreciate it a lot! :)
If the launch doesn't work from Touchdesigner, you can always launch the webui like normal but will have to add the --api flag to the commandline_args in the .bat file
How can we add other models to the selection list on Settings - Model? Great API !!
You should be able to add them to your automatic1111 models folder as you would normally with the webui. and in the A1111 parameter page, there is a Check + Update Models toggle. If that doesn't work, restarting the server will definitely work.
I'm using TouchDesigner 2023.11340 on a Macbook Pro, and I have launched Automatic1111 from my Terminal with --api. In the panel for SD_API in Touchdesigner, the Connection field shows 'on'. But when I click on 'Pulse' to generate frame, nothing happens. Where should I be looking at to fix it? Thanks!
hey! im also having the same problem, were you able to find a way to solve this?
hi, in my case when i click pulse cooking is never ending I'm having no error, nor any generated image. what I might doing wrong?
Not quite sure. If you are able to send me a screenshot on discord, that might give me a bettter idea of what is happening.
Hi. I've downloaded the stable-diffusion from Automatic1111 and successfully ran it in the local browser. But I don't see a folder named 'stable-diffusion-webui'. is that the same folder after I unzipped and updated the stable-diffusion? What is the default installing path for 'stable-diffusion-webui'? When I changed the 'SD Webui folder' path to the installing path and clicked the pulse, the command window said 'couldn't launch python'. is there something wrong with it? Doubts from a beginner.
Hi. I have a few issues running SD_API Firstly the folder I've downloaded is "stable-diffusion-webui-master" is this the same or not? It doesn't contain any folder named "venv" in it! So I face these errors after hitting Pulse in TD: fatal: not a git repository (or any of the parent directories): .git Commit hash: . . . Error code: 1 I don't know how to fix that.
hey ! sorry for missing this. the folder is typically 'stable-diffusion-webui' You should be able to download and install automatic1111 from the Touchdesigner operator itself - in the 'a1111' parameter page, there is a 'More Automatic1111 Options' Pulse that will open a menu that will download the correct stuff and set the 'SD Webui Folder' parameter. If you have automatic1111 already downloaded and it runs on its own, then you should just use that one instead of installing a new one (although this is often a good way to fix random bugs with a1111, but more of a last resort). The folder path that you want to put in the 'SD Webui Folder' should be something like this - F:\testwebui\stable-diffusion-webui
Hi, I tried to open SD_API_1.22 file in my TD and it does open but there were so many errors occured. I hope I can show you my TD.. When I click the error X button on the Base op, the script error inside the network. Error: (Parameter Menusource: Model) Traceback (most recent call last): File "/SD_API", line "tdu.TableMenu(op('./engineMenu'))", AttributeError: module 'tdu' has no attribute 'TableMenu' (/SD_API) There are several more errors with error codes that have been replaced with different ones. (op('./engineMenu'))" If you need to see my TD screen shots, I would love to show you on discord. Thank you so much!
This is due to using a pre-2022 version of Touchdesigner. My operator relies on the tdu.TableMenu (added in TD 2022) to dynamically update the SD model lists and a few other things, so using an older version of Touchdesigner will cause these to break.
Hi, I updated my touchdesigner to the newest version, but everytime I drag the SD_API tox file into td it just says TouchDesigner has encountered an error and must close then td crashes. Do you have any ideas why and how to fix it? Thanks. I tried on two different computers, both are not able to run.
Ah if you updated to the 2023 version, that will probably break SD1.22 That is an experimental build of the new upcoming version of TD. I would recommend going back to 2022.33910, as that is the latest production build and will work with SD1.22. The Update button that appears at the top right of Touchdesigner is a bit misleading sometimes, and I wish they made it a bit clearer about whether or not it was an experimental build. I've gotten several messages from people about this, and as far as I know it is fixed by going back to the production build.
Any ideas why it only generates me a gray screen from inside TD? from the webui it works great, but generating a frame in TD keeps giving just blank frame. I see it generating inside the terminal
Try changing the 'playback mode' or turning on 'Display last' Both are near the top of settings page 1.
Hi, I´m on a macbook and the launch webui button in TD doesn't open my terminal. What do i wrong?
Hey! The launch webui will not work for mac currently. You will need to launch from the stable-diffusion-webui folder with a .sh file I believe this should work if you save as Launch_api.sh set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS= --api --xformers git pull ./webui.sh --api
https://www.youtube.com/watch?v=CpnaogqbT70 Found this old overview and uploaded to youtube. Slightly outdated but only touches on the basic settings / may still be helpful for many
Apologies Vesvolod, I didn't mean to delete your error message comment. Glad things are working for you !
with --api after webui.sh is working. Thank you.
Awesome. glad it is working for you !
Does it work on MacBook? My automatic1111 webui and Python work correctly using terminal, but when I clicked the generate button on TD it does not work. Thank you.
having the same issue on mac
When i launch the webUI through the API, the terminal gives me the message "Couldn't launch python".. You know how to fix that issue? Im using the automatic1111 webui and Python 3.10.6. I cant connect the API with the webui :(
Im not sure exactly why that would be. Are you launching from the SD_API operator in touchdesigner? As far as I know, you need to have python and git both added to PATH on PC, but I believe thats the only requirement.
What version of TD are you using? it crashed when I dragged your file to TD
I haven't heard of that happening before. I am using the second most recent production build of TD 32260
❤️
