StreamDiffusionTD v 0.1.1
Added 2024-01-16 03:59:10 +0000 UTCImportant Fix for NDI that prevents memory build up
( at the time of this post, I also uploaded v0.1.1 as the operator in the 0.1.0 TOX post )
Comments
Any production build of 2023. I would recommend using version 0.1.5 or most up to date version. many improvements that should make install a bit smoother were added.
dotsimulate
2024-03-25 17:55:05 +0000 UTCWhich version of TD has this been tested with
Alexia Adana
2024-03-25 15:25:13 +0000 UTCi dont see anything in my settings tab in the streamdiffusion window. why could this be?
adrian arvidsson
2024-03-14 19:25:34 +0000 UTCI am researching simmilar problem whole morning. Reinstalled Visual Studio packages (Windows SDK) as some suggested, tried to activate venv in separate window and install ndi-python in countless ways. Some people say, it's about Windows Defender Firewall, some about CMAKE path problems. No solution yet, maybe these can help your case
2024-01-26 12:17:05 +0000 UTCnon local will wowwww!
יובל כהן
2024-01-26 07:45:29 +0000 UTCvery reliant on gpu speed currently. Possibly I will have an option for non local at some point. hoping to have time to figure that out soon.
dotsimulate
2024-01-25 21:16:08 +0000 UTCare there ways to increase fps or does it only rely on gpu power?
2024-01-25 14:20:08 +0000 UTCoh thanks. Well I should buy a new pc
JANUS
2024-01-24 20:10:02 +0000 UTCHey . If your gpu has only 2 gigs of vram, that won't enough to load the model into memory unfortunately. minimum of 6 is recommended.
dotsimulate
2024-01-24 17:21:44 +0000 UTCand I had ndisdk installed already.
2024-01-24 09:11:21 +0000 UTC
2024-01-24 07:46:29 +0000 UTC
hello I have this problem with my memory and model too. How can I allocate the memory and how can I download the model from hugging face? Should I download just the safetensors file and put in model? Traceback (most recent call last): File "C:\Users\matte\StreamDiffusion\ndi-stream\..\utils\wrapper.py", line 417, in _load_model pipe: StableDiffusionPipeline = StableDiffusionPipeline.from_pretrained( File "C:\Users\matte\StreamDiffusion\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 864, in to module.to(device, dtype) File "C:\Users\matte\StreamDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 1160, in to return self._apply(convert) File "C:\Users\matte\StreamDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "C:\Users\matte\StreamDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "C:\Users\matte\StreamDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) [Previous line repeated 7 more times] File "C:\Users\matte\StreamDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 833, in _apply param_applied = fn(param) File "C:\Users\matte\StreamDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 1158, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 26.00 MiB. GPU 0 has a total capacty of 2.00 GiB of which 0 bytes is free. Of the allocated memory 1.70 GiB is allocated by PyTorch, and 53.94 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF Model load has failed. Doesn't exist.
JANUS
2024-01-24 01:52:10 +0000 UTCsdxlturbo is not supported yet. That is something that the developers of StreamDiffusion have mentioned they plan to do, but I am unsure on the exact timeline.
dotsimulate
2024-01-22 23:11:17 +0000 UTCHi, has anyone used the model stabilityai/sdxl-turbo? I'm getting error messages, and streaming is unsuccessful
Ismael Abrego
2024-01-22 22:08:02 +0000 UTCHey I didn't see your second reply. if you are able to shoojt a message over on discord about conda, I think we can make past install work.
dotsimulate
2024-01-22 17:09:14 +0000 UTCI don't see any errors ! just warnings. if it wasn't working, save/close all TD and cmd windows and reopen the TD project and try again !
dotsimulate
2024-01-22 17:08:24 +0000 UTCHI, I can't log on to discord ... keeps saying my mails are already used. So that is a deadend for me. I keep running in to this error that I don't understand and the stream never starts : ==================================== Initializing NDI Streaming... Sender: 'StreamDiffusion_NDI_out' ==================================== Starting OSC server on 127.0.0.1:4567 `text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["id2label"]` will be overriden. `text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["bos_token_id"]` will be overriden. `text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["eos_token_id"]` will be overriden. C:\Users\******\streamdiff\StreamDiffusion\venv\lib\site-packages\transformers\models\clip\feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead. warnings.warn( The config attributes {'skip_prk_steps': True} were passed to LCMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
2024-01-22 14:32:47 +0000 UTCI believe if you reinstall with python 3.10.9 as your python version on PATH then it should work. You will need to delete the old venv folder before resinstalling.
dotsimulate
2024-01-22 13:56:25 +0000 UTCBoth the Lora and the SD model have to both be 1.5 based and either full local file paths to the file or a huggingfaceid to download them.
dotsimulate
2024-01-22 13:55:15 +0000 UTCI've actually got streamdiffusion running locally with conda before so not too sure why it isn't working in TD through venv?
2024-01-22 13:31:42 +0000 UTCHi there! I've got this error while running setup.py install for ndi-python ... error error: subprocess-exited-with-error × Running setup.py install for ndi-python did not run successfully. │ exit code: 1 ╰─> [12 lines of output] running install C:\Users\User\Documents\StreamDiffusion\venv\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\NDIlib copying NDIlib\__init__.py -> build\lib.win-amd64-cpython-311\NDIlib running build_ext cmake .. -DCMAKE_INSTALL_PREFIX=C:\Users\jleung\AppData\Local\Temp\pip-install-l4jeb7w6\ndi-python_918fa6417cb640af864d665da90d8060\build\install error: command 'cmake' failed: None [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> ndi-python note: This is an issue with the package mentioned above, not pip.
2024-01-22 13:31:06 +0000 UTCGreat TOX!!! Anyway, do you know any Lora which works with this TOX? I download and attach some Lora, but nothing happen. I am not sure Lora file is collapsed or I have a wrong operation.
2024-01-22 05:46:44 +0000 UTCthanks Amir! thats awesome haha. 10 minutes !!
dotsimulate
2024-01-21 21:32:16 +0000 UTCAbsolutely insane TOX. Thank you so much for piecing this together. Was up and running in like 10 minutes producing insane results at 17FPS. Pro tip - I started using Nvidia upscaler TOP downstream of streamdiffusion and the results are really crisp without sacrificing my streamdiffusion FPS. Again, absolutely insane TOX. You're the man!
2024-01-21 18:13:37 +0000 UTCYep. 3.10.9 and check the box to add to PATH
dotsimulate
2024-01-20 22:00:29 +0000 UTCthanks. i should also have python installed right?
2024-01-20 21:11:34 +0000 UTCAlso ndi-sdk - https://ndi.video/download-ndi-sdk/ Installing using python 3.10.9 and cuda 11.8 is recommended currently. Possibly soon will have update with clearer install process.
dotsimulate
2024-01-20 20:46:25 +0000 UTCGit can be found here. Make sure to check add to PATH when installing. https://git-scm.com/downloads Git is used for downloading and updating code repositories.
dotsimulate
2024-01-20 20:44:11 +0000 UTCit requires installing GIT. I'm not that familiar with what it actually is, and its install specifications are a bit confusing.is there anything i should pay attention to or should i go with its default installation settings?
2024-01-20 20:41:53 +0000 UTCI solved in a different way: reinstall everything without antivirus ahahah
Andrea Tamburrini
2024-01-20 12:25:38 +0000 UTCDowngrade to python 3.10.9 and it worked.
2024-01-20 11:11:16 +0000 UTCah. confused myself with your error. If it is saying there are no ndi device / source, perhaps try restarting or dragging in a new operator. And also make sure something is plugged in, although as far as I know , it should work with no input. Basically, the issue is that your ndi from Touchdesigner is not cooking/active for some reason.
dotsimulate
2024-01-19 19:14:54 +0000 UTCIf you are able to shoot a screenshot over to me on discord, that is easiest for me or someone to help with !
dotsimulate
2024-01-19 19:12:56 +0000 UTCI thought I responded to this ! not sure where that message disappeared to. Its mostly about the VAE that is running which is https://huggingface.co/madebyollin/taesd When this encodes and decodes the images a lot of details are lost. There are definitely other factors and it improves with more steps added.
dotsimulate
2024-01-19 19:12:18 +0000 UTCno nothing! Also NDI-sdk is installed
Andrea Tamburrini
2024-01-19 19:11:59 +0000 UTCWhen you run the install NDI/Spout, are there any errors or red text in the cmd window? Also make sure to NDI-sdk installed.
dotsimulate
2024-01-19 19:08:08 +0000 UTCHi guys! Thanks @DotSimulate for your work! I still had an issue: after the settings and then clicking on pulse to start stream my cmd don't find any NDI device. In the Setup tab I did pulse on the Install NDI/Spout req only. How can I fix it?
Andrea Tamburrini
2024-01-19 18:30:28 +0000 UTCAnd on another computer I keep getting errors about python not found although I installed the latest and referenced in Path in TouchDesigner.
2024-01-19 16:32:23 +0000 UTCWhy are most of the generated pictures soft focus? compared to let's say ComfyUI or Automatic1111
2024-01-19 14:09:24 +0000 UTCAdjusting the step sliders can help as well as smoothing out / simplifying the input. The model doesn't have any temporal understanding which makes it tricky and very prone to flicker.
dotsimulate
2024-01-18 23:33:23 +0000 UTCIs there a way to slow it down or reduce the sensitivity so it's more consistent over time?
Tommy Etkin
2024-01-18 22:58:44 +0000 UTCcurrently only working on windows + nvidia graphics. Hopefully would like to have a non local option at some point, but need to figure out best way to do that.
dotsimulate
2024-01-18 18:50:36 +0000 UTCso all of the python stuff for streamdiffusion is external to the python version built into TD. You need to download python 3.10.9 to your PC and add it to PATH. It will not effect the TD python build. also, DM or discord is better for sending screenshots or long error messages if its possible to send over there.
dotsimulate
2024-01-18 18:12:40 +0000 UTC
2024-01-18 17:25:49 +0000 UTC
Hey. I believe that this is an issue with the model path you are providing. There are a few others that have run into this as well and there might be info in troubleshoot-central help forum thing on my discord server. Feel free to post in there or shoot me a message over there if possible. Patreon works as well, but doesn't support screenshots so its a bit hard.
dotsimulate
2024-01-17 23:12:34 +0000 UTCHi, I'm having this issue and I haven't been able to run it. This is the error on the CMD: D:\StreamDiffusion\StreamDiffusion\venv\lib\site-packages\diffusers\configuration_utils.py:135: FutureWarning: Accessing config attribute `requires_safety_checker` directly via 'StableDiffusionPipeline' object attribute is deprecated. Please access 'requires_safety_checker' over 'StableDiffusionPipeline's config object instead, e.g. 'scheduler.config.requires_safety_checker'. deprecate("direct config name access", "1.0.0", deprecation_message, standard_warn=False) Process Process-4: Traceback (most recent call last): File "D:\StreamDiffusion\StreamDiffusion\ndi-stream\..\utils\wrapper.py", line 417, in _load_model etc, etc finishes with NotImplementedError: Cannot copy out of meta tensor; no data! what should I do? thanks!🙏
2024-01-17 21:01:55 +0000 UTCI think you would get a little bit more speed with a 4080. I am not sure how to set which gpu the process runs on, but would assume it is running on your main graphics card. That is something to look into about multiple cards. as far as speed, installing and running with tensorrt acceleration mode will improve fps. there is information about installing it oon the github. It is a bit of a tricky installation but there are a few issues about it as well.
dotsimulate
2024-01-17 19:45:44 +0000 UTCAwesome! I totally missed that toggle! Also, do you have an ideas on improving the FPS? I'm on a 13900k with 128gb ram with a 3080 and 4080 but only getting about 6fps. Perhaps more a StreamDiffusion setting but just checking if you have any ideas.
2024-01-17 17:28:54 +0000 UTCOh, amazing ! I can fix that in next version. For now, in the Setup page, you can manually turn Off the Streamactive toggle at any point if it thinks it is on when it is not.
dotsimulate
2024-01-17 17:26:08 +0000 UTCThis is so freaking awesome! But... I think i found a little bug. I saved and closed my project while StreamDiffusion was still running. When I opened it back up this morning, the operator still thought SD was running and I couldn't start it from the operator.
2024-01-17 16:36:46 +0000 UTCYou should be good to download and set the full path.
dotsimulate
2024-01-17 16:21:59 +0000 UTCSorry for so many questions. I am new to the SD ecosystem. For example, I found this lora and the base model is 1.5: https://civitai.com/models/222107/sculpture I should be able to simply download the safetensor file and set the lora path to the download, right? Do I also need to move the lora to the lora folder of the models in the StreamDiffusion repo?
Faraz Kh
2024-01-17 16:13:38 +0000 UTCI have had good luck with all 1.5 Loras as long as I give the full file path similar to loading a local 1.5 model. I still have all my Loras / SD checkpoints in my ComfyUI/models folder and they seem to load.
dotsimulate
2024-01-17 16:00:16 +0000 UTCThank you for all the quick support! You are amazing. Have you tried with any lora? Can you please post a sample link?
Faraz Kh
2024-01-17 15:56:35 +0000 UTCDue to the way StreamDiffusion offloads the VAE to the CPU, it tends to be quite high on CPU usage. VRAM usage remains to be pretty low, with the distilled diffusion model taking only a few gigs of the gpu. I do believe this is an opportunity for optimization.
dotsimulate
2024-01-17 15:55:55 +0000 UTCHey Faraz. SDXL turbo is not supported yet, but hopefully soon it will be added by devs of StreamDIffusion. currently only 1.5 and 2.1 (sd-turbo) will work. Lora models should load from the Lora parameter page, and you should see a line that clearly says the weights are loaded and the path you specified, as the second to last line in the CMD right before the stream starts.
dotsimulate
2024-01-17 15:54:31 +0000 UTCHave you tried with Lora option? I tried installing a couple that are compatible with SD-1.5 but didn't appear to work. Do you have any working options?
Faraz Kh
2024-01-17 15:01:03 +0000 UTCI tried different models and seems it only works with the sd_turbo based on 1.5. And if you get it from the modelID, otherwise says "no data"
2024-01-17 13:08:48 +0000 UTCIs it possible to support SDXL-turbo in addition to SD-turbo?
Faraz Kh
2024-01-17 12:39:08 +0000 UTCHi. Thank you for this! However, I have some questions: I have an A5000 with 24gb, and a Xeon 8-core 3.5Ghz. I noticed that the VRAM used is only 5gb VRAM, and the CPU is maxing at 80%. I cannot install xfromers nor tensorrt for some reason ( i guess i have to install them in the env?. Seems as if the system is only using the CPU somehow. I can get only 10fps at 512x512. Do you have any tips on how to use the full VRAM? Thanks again
2024-01-17 12:30:20 +0000 UTCWould this also work on Mac M1? I am not able to getting up and running after looking at you tutorial... great project though, would love to try it out
Cor Langerak
2024-01-17 10:57:03 +0000 UTC