Stable Cascade 1 Click Installer & Advanced Gradio APP For Windows, RunPod, Linux, Massed Compute & Kaggle
🕑 Added 2024-05-15 22:00:00 +0000 UTCJoin discord and tell me your discord username to get a special rank : SECourses Discord
16 May 2024 Update:
Full Windows Tutorial : https://youtu.be/q0cYhalUUsc
Full Cloud (Massed Compute, RunPod & free Kaggle account) Tutorial : https://youtu.be/PKDeMdEObNo
And please also upvote this below reddit thread if you like:
7 May 2024 Update:
Huge improvements has arrived : stable_cascade_v13.zip
275 Amazing pre-set styles added
You can loop all of the styles and find best ones with your prompt
RunPod and Massed Compute installers updated to the latest
Now prompt box will support multi-line prompts. So each line of your prompt input will be treated as a unique prompt
Metadata save system and load system improved and works perfect
5 May 2024 Update:
Huge improvements has arrived
Updated to V9 please do a fresh install (will not download models again)
The zip file includes latest Kaggle notebook, Windows installers, RunPod and Massed Compute installers and instructions
https://www.kaggle.com/ - register a free account with phone verification
If you don't know how to use Kaggle notebooks here a short video : https://youtu.be/iBT6rhH0Fjs
I suggest you to use Massed Compute as a paid cloud service rather than RunPod
Metadata automatic save added
Metadata display and load tab added, now you can replicate your generations - only from V9 and further
FP4 and FP8 precision added, now works as low as with 5 GB VRAM
Some bugs fixed
Open folders button added, only works in Desktop operating systems such as Windows or Desktop Ubuntu
Now supports both FP16 (RTX 2000 and below) and BF16 GPUs (RTX 3000 and above)
Randomize seed now working properly
How much GPU VRAM each start option uses added to the starter .bat file

14 February 2024 Update V2:
Moved to more up-to-date Diffusers repo - this will get merged with main Diffusers
Now number of prior inference steps working you can increase decrease
It appears that for target image resolution 128 pixels increment and decrement working
Sliders are set accordingly to 128 pixel increase or decrease
FP16 start feature added but due to a bug still not working
I have reported that bug here : https://github.com/huggingface/diffusers/issues/6970
14 February 2024 Update:
VRAM leak error fixed
Kaggle notebook ready but due to a Diffusers Library bug not working
Reported this bug and waiting to be fixed
Made a big Reddit thread if you upvote I appreciate very much : https://www.reddit.com/r/StableDiffusion/comments/1aqbydi/stable_cascade_prompt_following_is_amazing_this/
Features
Stability AI today (12 Feb 2024) released new model like Stable Diffusion V3 called as Stable Cascade
You can read all model details here : https://stability.ai/news/introducing-stable-cascade
I have developed an advanced standalone Gradio APP with 1 click install and run
Supports low VRAM option (will ask you when you run run_StableCascade .bat file) too so works great with even 8 GB GPUs - tested on RTX 4070 mobile and ultra fast speeds over 2 it / second
Preparing free Kaggle account notebook as well
Download attached zip file (stable_cascade_v12.zip), extract and folder and use windows_install .bat to install on Windows
For RunPod and Linux follow runpod_instructions_READ
On your local Linux don't forget to change folder paths
Then use run_StableCascade .bat to start the Gradio app
Select the Low VRAM option or not depending on your GPU
All generated images will be saved in outputs folder
Enjoy
Requirements:
Make sure that you have git and Python 3.10.x installed. Best is Python 3.10.11. Also you need to have installed git
Below tutorial shows step by step install Python, Git, FFmpeg and C++ tools :
Hugging Face Default Cache folder setup : https://youtu.be/rjXsJ24kQQg

Comments
reaper557
Once more the Maestro saves me with another installer! I was not sure if I would ever try Cascade, but I just finished your tutorial video and now I have no excuse. :D
David Allen Neron
I shortened the prompt and it seemed to help but I'm still getting this error: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument other in method wrapper_CUDA__equal)
David Allen Neron
I managed to get one image to generate but now I'm getting this: Token indices sequence length is longer than the specified maximum sequence length for this model (127 > 77). Running this sequence through the model will result in indexing errors The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['leaf or a water droplet, that morphs into a light bulb or flame (( fire )), representing ideas and innovation springing from natural sources. the overall design should convey a harmonious blend of nature, luxury, and forward - thinking.'] 100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:12<00:00, 2.40it/s] Token indices sequence length is longer than the specified maximum sequence length for this model (127 > 77). Running this sequence through the model will result in indexing errors Traceback (most recent call last): File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\gradio\route_utils.py", line 231, in call_process_api output = await app.get_blocks().process_api( File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\gradio\blocks.py", line 1594, in process_api result = await self.call_function( File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\gradio\blocks.py", line 1176, in call_function prediction = await anyio.to_thread.run_sync( File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 2144, in run_sync_in_worker_thread return await future File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 851, in run result = context.run(func, *args) File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\gradio\utils.py", line 689, in wrapper response = f(*args, **kwargs) File "D:\AI Art Generator - STABLE CASCADE\StableCascade\app.py", line 340, in generate decoder_output = decoder_pipeline( File "D:\AI Art Generator - STABLE CASCADE\StableCascade\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "D:\AI Art Generator - STABLE CASCADE\StableCascade\pipelines\pipeline_stable_cascade.py", line 398, in __call__ _, prompt_embeds_pooled, _, negative_prompt_embeds_pooled = self.encode_prompt( File "D:\AI Art Generator - STABLE CASCADE\StableCascade\pipelines\pipeline_stable_cascade.py", line 150, in encode_prompt if untruncated_ids.shape[-1] >= text_input_ids.shape[-1] and not torch.equal( RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument other in method wrapper_CUDA__equal) *** I'm not sure what's happening. Any help would be super appreciated.
Furkan Gözükara
ye you are right. i am gonna fix it hopefully. please remind me if i forget
David Allen Neron
I'm not sure what happened, but I clicked "run_StableCascade.bat" like I usually do (it's been working for a couple weeks now no problem) but today, it looked like it was downloading some new safetensors and some other stuff and now it won't work at all. "raise AttributeError(f"module {self.__name__} has no attribute {name}") AttributeError: module diffusers has no attribute StableCascadeUNet" is the last thing that pops up.
Furkan Gözükara
yes you have to use 128x128 pixels to make it work. i mean increase width or height 128 pixel or reduce 128 pixel
Rick B
Running this notebook on Kaggle, generally works fine. What's cmd line option for low VRAM, please? I tried --lowvram after the --fp16, didn't seem to make any difference, still got numerous out of memory errors. MAY be due to the WxH ratios, as I was experimenting with different sizes. Nothing over about 1Mpix would work, so any WxH < 1Mpix seemed to work.
Furkan Gözükara
ye this is not appropriate way. we need to be able to load .safetensors. I have reported this issue here you can reply : https://github.com/huggingface/diffusers/pull/6487
Hassan Alhassan
G:\Cache\hub\models--stabilityai--stable-cascade-prior\snapshots\621fc2ddab5500e57079e716c15358a25b649090 i then replace the items of each folder overwrite the files (*not the folders*) of the diffuser model trained in onetrainer. then start the cascade app and use it. please let me know if my explanation is not clear ill create a screen recording if required. The directory is the cache directory of HF.
Furkan Gözükara
the diffusers not supporting model loading yet. i am waiting it. ok changed number of images scale to 200. just do a git pull
Hassan Alhassan
can we have a field where we can select a model from the local drive? i tried to edit the code to include the field but wasn't able to. one more thing the scale for the number of images has a very high value i think decreasing it to 100 or 200 will be better, because in the current state, the slider is not usable you need to fill it manually.
Furkan Gözükara
I am following diffusers library. i think they havent added that yet.
Ivan Stoyneshki
Do you plan adding IMG2IMG they have implemented it in comfy few days ago. But your app still produces better results.
Furkan Gözükara
I am waiting Diffusers pipeline to implement .safetensors loading, fix errors and merge into main diffusers
Mike Caesar
Any updates on training Cascade?
Furkan Gözükara
yes it is a great one. i introduced it to the community on reddit first. on my todo list hopefully.
Pallavi Chauhan
Hi there is new version of A1111 called forge UI, I found this is faster than A1111. I found this comment in one of my communities. "There is a new stable diffusion interface called Forge that seems to be faster then Automatic1111 in special on those who dont have so powerfull pc. I used to struggle to run sdxl on my older pc with 6GB VRAM and crashed a lot, on the forge version seems to run it and even worked with hires fix and is way faster then automatic1111 You can download it from here https://github.com/lllyasviel/stable-diffusion-webui-forge" If it's true please make an installer for this too.
Furkan Gözükara
Can you let me know the error? Because no such error should happen. We should fix it.
Ivan Stoyneshki
I am verry happy with the results that I am getting. But after several (usually 6) generations the UI gives an error message. May I kindly request to add restart button on the UI so the backend script to be restarted without launching BAT again. Thank you.
Furkan Gözükara
hello. yes hopefully i will make tutorial. but first diffusers library has to become better like loading .safetensors files
Florian Maas
thanks a lot for this! What I didnt fully understand yet is if lora training is already available for this.. will you do a tutorial for that soon? thanks again!
Furkan Gözükara
hello. what is your GPU model? which installation have you made? they made some fixes to the diffusers pipe i will try again now to see if working
Omar Kamel
No matter what prompt I'm entering, I get a black image. Help?
Furkan Gözükara
we already have batch generation. ye adding different prompts thing is harder. but you can batch generate with 1 prompt.
daniel mendoza
Add please batch generation. I am thinking of generating regularization images using this model, I need to generate images in batch, with a list of prompts.
Furkan Gözükara
not yet. diffusers not supporting safetensors yet i tried. i am going to ask this as well right now : https://github.com/huggingface/diffusers/pull/6487
John Dopamine
Is it possible to use this custom model (already) posted to Civitai? I figure there may be issues w/ formats, but wanted to check: https://civitai.com/models/306144
Furkan Gözükara
i think delete old folder and install again. it will not redownload cached files and it will install the latest version with a clean venv. alternatively you can do git pull, and activate venv and reinstall requiremets .txt file
Umut Hasanoglu
How can I update to the latest version. I installed v3
Furkan Gözükara
I prepared kaggle version but due to this bug not working : https://github.com/huggingface/diffusers/issues/6970 you can use that notebook on a paid colab that supports BF16. notebook is included in zip file
Tom Preece
Is there a CoLab version?
Furkan Gözükara
awesome. yes i use python 3.10.11 most widely supported version
daniel mendoza
It works perfect, you just have to create the environment in conda with python==3.10.11. Thank you very much, I wanted to try stable diffusion cascade.
Furkan Gözükara
I have reported this issue. Currently it doesn't support FP16. once they fixed I will update the starter . bat file. I already added option to start as FP16. you can also leave a comment here : https://github.com/huggingface/diffusers/issues/6970
Ivan Stoyneshki
I have 1080ti and get error for bfloat and something that says my gpu is very old. Is there is a workaround i have a model with 12gb of vram
Furkan Gözükara
Checking right now they could have made update
Furkan Gözükara
Very good question. I am looking for an answer right now which model is loaded exactly
Thomas G
Not working after installation. Please fix. ModuleNotFoundError: No module named 'diffusers'
Andi Merxhani
Can this use the full big models, the 14gb Stage C etc? I have a 4090 so I have the vram for it.
Furkan Gözükara
i am waiting it to be adapted to search that :)
Furkan Gözükara
it installs in the downloaded folder by default with generating a venv. i never had such problem like that. can you make a video and show?
Ian Claxton
The windows script by default installs into %WINDIR%\System32, maybe you should add a line to set current to the current script dir to avoid this?
Erosi
use the file at the bottom of the post for now it will work
ccceecc ccceecc
Waiting for Very Best training Workflow :P
puk
Hy, i cant download the zip file. I become this message: 0 code 902 code_name "AttachmentNotFound" detail "Attachment with id 17685160 was not found." id "aabce063-1163-5e53-94c2-6cf4671d4cc2" status "404" title "Attachment was not found."
Hung Do
in case anyone want to know. Stable Cascade is not censored https://civitai.com/posts/1427167
Furkan Gözükara
thank you so much for your support
Phillip Berry
You are the Man!!!
Furkan Gözükara
it runs without low vram blazing fast. i also have rtx 3090. use high vram
Furkan Gözükara
you are welcome thanks for supporting me
Furkan Gözükara
yes i think a lot better
Furkan Gözükara
you are welcome
Furkan Gözükara
this one downloads into hugging face cache since uses diffusers pipeline
Furkan Gözükara
thanks fixed text link
Furkan Gözükara
yes try low vram. it used like 9gb on my pc but may work good on 8 gb. let me know
leem0nchu
Any options for 8GB VRAM?
Kallamamran
You still have stable_cascade_v1.zip in the text and that link is wrong
George Gostyshev
Where to put models if I already downloaded it?
EnjoyerOfAll
Super cool. Thank you!
Erosi
Does this model understands text better? kinda like DALL-E 3?
Roman Nadtochiy
Thanks man! that was super fast!!!
Neven Krcmarek
I have 3090, will it run without low VRAM option?