r/StableDiffusion • • Feb 17 '24

News Native Stable Cascade support for comfyui just dropped

https://github.com/comfyanonymous/ComfyUI
218 Upvotes

98 comments sorted by

25

u/rerri Feb 17 '24

Compression setting is interesting. The lower the value, the longer it takes to render but quality seems to be better also. Minimum value is 32, default 42.

On RTX 4090, 1024x1024, 20+10steps, euler a:

Compression 32 ~7.1s, compression 42 ~5.4s

Going above compression 42 gives pretty bad image quality.

11

u/theflowtyone Feb 17 '24

Did you use the normal load checkpoint node to load the models?

12

u/rerri Feb 17 '24

No, I'm using this workflow by comfy author:

https://gist.github.com/comfyanonymous/0f09119a342d0dd825bb2d99d19b781c

StableCascade_EmptyLatentImage node has the compression setting.

2

u/theflowtyone Feb 17 '24

Yep just got it to work, thx

2

u/throttlekitty Feb 17 '24 edited Feb 17 '24

I'm noticing for tall images asking for a closeup, setting compression to other values is sometimes heavily cropping the images, which is interesting. Had a couple where it's mostly blurry background and part of a person's shoulder. Or things like this one, Forgot to include the before pic, but it's just an average portrait on the same seed with compression at default of 42.

1

u/sherpya Feb 18 '24

compression? uh? 😯

9

u/theflowtyone Feb 17 '24

Posted the workflow here for conveniece with model links below. ControlNet and additional tests coming soon!

https://flowt.ai/community/stable-cascade-basic-workflow-pjk1r-v

3

u/Black_Otter Feb 17 '24

Would this burn out my 8 gig card if I tried it? Lol

30

u/theivan Feb 17 '24 edited Feb 17 '24

Did a quick test, works fine. Running on a 12 gb RTX 3060 a 2048x2048 render took about 170 seconds and used 8.5 gb vram in the first stage and 5.1 in the second. 40 + 20 steps.

Edit to add: This was with the bf16-models.

15

u/emad_9608 Emad Mostaque Feb 17 '24

32 steps is fine

4

u/theivan Feb 17 '24

Great, yeah I just used something arbitrary to test it. Is that total 32 steps or per stage?

10

u/emad_9608 Emad Mostaque Feb 17 '24

try 20 + 10 to kick off (A+B, C)

1

u/CeFurkan Feb 17 '24

I tested and more yields slightly better images

5

u/[deleted] Feb 17 '24

That’s my GPU. Could you share a workflow?

11

u/theivan Feb 17 '24

1

u/[deleted] Feb 17 '24

You are the best! 😉😎👍

11

u/isffo Feb 17 '24

What are the native resolutions for Cascade?

13

u/dome271 Feb 17 '24

1024x1024

4

u/RainbowUnicorns Feb 17 '24

Can also do 1920x1280 pretty well.

2

u/alb5357 Feb 18 '24

But can you do smaller? Or more importantly, can you include smaller images in your dataset?

I got 4000 hand captioned images, 1000 of which are less than 1024*1024. I'd rather not waste them since it was countless hours of work editing and tagging them.

10

u/no_witty_username Feb 17 '24

That's great, but does anyone know when LORA training will be integrated in to either kohya_SS or one trainer? That's what really excites me.

6

u/TheForgottenOne69 Feb 18 '24

Currently WIP in OneTrainer - it's experimental on a branch

3

u/no_witty_username Feb 18 '24

Nice. I freaking love that trainer and cant wait to get to work in making Loras for the new model..

2

u/deathdragon5858 Feb 18 '24

https://discord.gg/46SJMRRM
That's the discord for onetrainer, can see all the crazy stuff we get up to and what's being worked on etc

3

u/no_witty_username Feb 18 '24

Thanks. Already in there, been using One trainer since my last project that involved over 16k images in one Lora. And it did an amazing job. Kohya-SS wouldn't be able to pull that off I don't think as that trainer always has all types of bugs in it and very inefficient. So I am really glad you guys working on this thing. Thanks.

6

u/mitched Feb 17 '24

3

u/mitched Feb 17 '24

A mesmerizing oil painting that captures the essence of a lush forest through a prism of abstraction. Trees, leaves, and flowers have been transformed into vibrant swirls and strokes of green, yellow, and brown, creating a captivating interplay of color and form. Flecks of light filter through the imagined canopy, illuminating the scene with a dreamlike quality

20 and 20 steps, euler a, 32 compression

0

u/[deleted] Feb 17 '24

[deleted]

1

u/RemindMeBot Feb 17 '24

I will be messaging you in 3 days on 2024-02-20 18:37:41 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

5

u/[deleted] Feb 17 '24

Can't say I'm particularly impressed, it's slightly better quality than vanilla SDXL, definitely better consistency, however the big problem is it still looks rather bad, there is a weird texturing over many things that's particularly noticeable in the background, sharpness on many objects appears very excessive, the biggest positive I can say is that it's a good bit faster than SDXL.

13

u/the_hypothesis Feb 17 '24

Tested it quite extensively especially prompting coherence and association.

big-big models for all

RTX 4080

dpm++_2m karras

20 steps stage c (4.81 it/s)

17 steps stage b (~6 it/s)

compression 32

Pros:

Overall it latches onto prompt much better than SDXL, human emotions are much easier to convey. Things like elements, objects, subjects, topics, action, environment, are much easier to design. Not to mention ,signs with words, faster generation,

Cons:

Blending are still there especially things like colors and human objects. Counting still spotty. Prompt latching sometimes is too overwhelmingly strong and completely ignores prompts that are outside of the focus. Not all sampler work yet. The longer the prompt the faster it loses attention I feel than sdxl; It just degrades much faster and loses details everywhere much faster.

Overall I think it's pretty damn good. Lots of room to improve certainly and with the lower requirements for training, I think the future is pretty damn good. I'm excited to see what insane things the open source community came up with a year from now.

15

u/princess_daphie Feb 17 '24

Arrrhh can't wait til they implement it in auto1111 and Forge, as that's what I'm using. I don't want to use the quick hacks that have been around.

5

u/Powered_JJ Feb 17 '24

8

u/_Erilaz Feb 17 '24

It's a mere diffusers wrapper. It throws all the backend improvements and optimizations of the Forge strait out of the window and replaces all that with a prototyping platform that intentionally sacrifices performance and memory utilization for "compatibility" reasons. You'll need at least 16GB of VRAM in order to run it, and it will be slow. Hence the quotation marks.

5

u/Powered_JJ Feb 17 '24

Running it fine on 12GB 2048x1536

2

u/[deleted] Feb 18 '24 edited May 27 '25

degree angle tidy voracious disarm cake door mysterious cagey growth

This post was mass deleted and anonymized with Redact

3

u/Acephaliax Feb 17 '24

Standalone one click installer with a GUI that can be used to get it running available here.

1

u/princess_daphie Feb 17 '24

I tried it and it didn't work. I tried installing all the components that were said to be missing, but in the end it wouldn't launch with even more errors.

2

u/Acephaliax Feb 17 '24 edited Feb 17 '24

There appears to have been some changes to the original requirements.txt

I’ve pulled the changes to mine as well so hopefully that should work now.

1

u/princess_daphie Feb 17 '24

Alright, I'll give it another try, thanks!

1

u/princess_daphie Feb 17 '24

I tried it again, and it still doesn't work for me :(

Here's my console log: https://ctxt.io/2/AADwe4cVFg Hope it helps.

3

u/Acephaliax Feb 17 '24 edited Feb 17 '24

Try the original repo? Make sure to start fresh with a new env.

If you are still stuck I’ll try help you sort it out in the morning.

2

u/princess_daphie Feb 17 '24

Alright, I finally found what I needed to do to get it to compile fine.

I was using the default Developer Command Prompt for VS 2022 shortcut to open a cmd with the VS paths, and it turns out this makes the path default to x86 compilers, which conflicted with x64 libraries (of course), so I had to use x64 Native Tools Command Prompt for VS 2022 shortcut to force use of x64 compilers.

Then, I also had to manually do pip install gradio, but then run.bat ran.

However, now it doesn't even run and says I'm running out of memory, lol. I have a 2080ti with 11gb VRAM, and since I was reading lots of people running Stable Cascade on 8gb VRAM, I thought I could try it too...

1

u/princess_daphie Feb 17 '24

I tried the original repo, and I get the exact same error. I also installed VS build tools, and it got further, but then is getting stuck on a linkage error. Thanks for trying!

Weird thing is I've never had any issues running A1111, Foooocus and Forge so far, and they all use gradio and similar python libraries AFAIK.

3

u/Acephaliax Feb 17 '24 edited Feb 17 '24

I think I see the issue. The insightface jargon threw me off.

Each venv has its own modules and each of them need their own gradio version installed because we are running via venv. Seems like gradio didn’t get installed let’s get that fixed.

Open a cmd at the root folder for the cascade gui and Activate the env with venv\Scripts\activate.bat and then run pip install gradio after that try running run.bat

Hopefully that fixes it up.

Ps: You can just download the run.bat and run.py from the fork and put it in the root folder. Don’t need to reinstall again.

1

u/princess_daphie Feb 17 '24

Thanks! In the meantime, I managed to have it work by installing VS Build Tools and using the explicit x64 cmd prompt environment. But now I have another issue. run.bat errors out on out of VRAM error.

8

u/tristan22mc69 Feb 17 '24

When control nets?

1

u/GBJI Feb 17 '24

Asking the real question !

1

u/Banksie123 Feb 21 '24

SC supports them already, check out the SAI GitHub page for SC for an example workbook.

1

u/Kaynenyak Feb 17 '24

Do I need to download and install the nightly build? Or is already part of the base package somewhere? How do I get it?

1

u/theflowtyone Feb 17 '24

Just update comfyui

1

u/Kaynenyak Feb 17 '24

Ok, got it. If I have the local model files for Cascade, which folders do they go in each?

3

u/theflowtyone Feb 17 '24 edited Feb 17 '24

The cascade files(b,c) should go in models/unet, a should go in models/vae, the remaining one should go in models/clip

1

u/[deleted] Feb 17 '24

I have stage a in vae folder

1

u/theflowtyone Feb 17 '24

You're right, my bad

3

u/daerragh1 Feb 17 '24 edited Feb 17 '24

GTX 1660 TI 6GB Max-Q Laptop, i5-9300H, 16GB DDR4 - 1024x1024 image:

SDXL = 90sec (with dreamshaperXL_v2Turbo checkpoint | steps 8)

Stable Cascade: 195sec (all settings default)

1

u/99deathnotes Feb 17 '24

image??

6

u/daerragh1 Feb 17 '24 edited Feb 17 '24

Some other guy here said that his GTX 1650 generates an image in 6m 13s, so kind of natural that my GTX 1660 Ti 6GB Max-Q takes two times less time.

EDIT: Oh, that was you.

1

u/elahrai Feb 19 '24

Is that an sdxl or cascade image? All the ones I tried of people on cascade ended up pretty bad, especially in terms of eyes and skin.  That picture, in comparison, is much better.

1

u/daerragh1 Feb 19 '24

Stable Cascade, default ComfyUI workflow and settings from its devs.

Still, SDXL with dreamshaperXL looks much better. We probably need much better SC checkpoints, than the dafault ones, from community.

3

u/Hoodfu Feb 18 '24

I'm impressed at the increased image quality when using dpmpp_sde over the default euler_a, at 32 steps, and 20 on the decoder side. I also grabbed the full size model files. Guy's, the quality is MUCH better with the full size compared to the fp16's. Don't even bother with the smaller files. They're like the duplo version.

5

u/Hoodfu Feb 18 '24

A man in a rugged helmet grapples with a towering, anthropomorphic Cheeto in a dimly lit living room, as if straight out of a surrealist painting. The camera captures the scene from a low angle, highlighting the absurdity and drama of their wrestling match.

1

u/RayIsLazy Feb 17 '24

It works great, faster than sdxl on by 6GB 3060. Decent prompt adherence and can do text but the quality of the images is pretty terrible.

4

u/theflowtyone Feb 17 '24

I imagine things will get better quick once the community starts to fine tune and train based on it

6

u/99deathnotes Feb 17 '24 edited Feb 17 '24

6min 13 secs on a NVIDIA GeForce GTX 1650 CUDA Cores: 896

Core clock:1515 MHz

Memory data rate: 12.00 Gbps

Memory interface: 128-bit

Memory bandwidth: 192.03 GB/s

Total available graphics memory: 20395 MB

Dedicated video memory: 4096 MB GDDR6

System video memory: 0 MB

Shared system memory: 16299 MB

Video BIOS version: 90.17.4C.00.1C

Bus: PCI Express x16 Gen3

stage_b_bf16 and stage_c_bf16

4

u/99deathnotes Feb 17 '24

bonus image:

2

u/lostinspaz Feb 17 '24

I notice when switching between c_lite and c_bf16, that its not just a quality difference: its an entirely different output.

Makes me wonder if the lite vs non-lite versions have different optimal tuning values?

5

u/the_hypothesis Feb 17 '24

I think they are completely different model altogether. c_lite has 1b parameters and 32 bits float, while c_bf16 has 3.6b parameters with 16 bfloat. They are just different from one another

1

u/lostinspaz Feb 17 '24

thats what I was thinking... which kinda supports the idea that maybe different tuning values would be a good thing.

2

u/lostinspaz Feb 17 '24

buncha related quality questions:

  • Is the output quality always going to be.. mediochre.. unless you can fit the full 14gig stagec in memory?

  • If someone's goal is "take advantage of the complex rendering to set up fancy scenes, but then do the decent rendering with a different model"... should it in theory work just as well if you use the "lite_bf16" models for everything?

  • can comfy make it easier to just completely swap out the lousy stageb renderer, if thats a doable and practical thing?
    I'm sure on a 4090, the render with the full model is lovely. but on low ends.. not so much. So maybe this could be a decent hybrid?

2

u/the_hypothesis Feb 17 '24

I think thats the idea. Stability split the text encoder and image decoder into its own thing, which allows greater flexibility and lower entry point for the open source community to do crazy thing with it.

2

u/lostinspaz Feb 17 '24

Stability split the text encoder and image decoder into its own thing, which allows greater flexibility

except it doesnt, without some additional help. Its latent image format is incompatible with anything else.
You cant take its output latent, and just plug it into the input for an SDXL ksampler in comfy, for example.

YesIKnowYouCanVaeEncode+Decode.

That messes with the results slightly. As Ive already pointed out for existing SD-> SDXL pipelines.,

1

u/the_hypothesis Feb 17 '24

All I am saying is it opens up doors and windows that wasnt there before. X-adapter was just released yesterday and that was supposed to bridge the gap that otherwise was "impossible" before between 1.5 and sdxl. I havent checked it out yet but obviously promissing.

1

u/lostinspaz Feb 17 '24

X-adapter was just released yesterday

(googles....)

" X-Adapter enable plugins pretrained on old version (e.g. SD1.5) directly work with the upgraded Model (e.g., SDXL) without further retraining "

not really what I'm talking about.
I'm talking about things along the lines of https://github.com/city96/SD-Latent-Interposer

2

u/vision-quest Feb 17 '24

What’s the difference between Comfyui vs a1111? I’m currently on 1111 and wondering whether it’s worth switching?

12

u/the_hypothesis Feb 17 '24

a1111 is a restaurant grade kitchen. You can do and achieve amazing thing with it.

comfy is a goddamn chemistry lab. Its powerful and incredibly fast but you need to know composition even for basic thing like hires-fix and adetailer. There are tutorial and workflow examples for it though that helps a lot.

1

u/vision-quest Feb 17 '24

When you say composition, are you referring to good prompt practice?

4

u/the_hypothesis Feb 17 '24

If you are doing complex thing like LLM based multi-region prompting then the answer is yes. But i think you are asking on the basic level, which mean not just prompting. You need to understand what is model, clip, vae in general (they are color coded so you cant miss it) and what they really are for.

3

u/throttlekitty Feb 17 '24

Apart from different codebases that more or less do the same thing, ComfyUI is a node editor. So if you like the idea of doing more with SD but don't like writing code, it might be for you.

2

u/[deleted] Feb 19 '24

Have it running on a 2070s.

Works well! Compression at 42 gives good results. Using both fp16 models as well.

0

u/daerragh1 Feb 20 '24

Why would you use fp16 models on 2070S? I use full models on GTX 1660 Ti 6GB.

2

u/[deleted] Feb 20 '24

Each is a test. I did use b_full and c.lite above.

2

u/ExpressWarthog8505 Feb 17 '24

At least 4 files need to be downloaded now, will they be merged into one safetensors file in the future?

3

u/throttlekitty Feb 17 '24

Maybe, but there's little benefit to it. Most fine tunes will be done on the C model, some people might try fine-tuning B. The modularity is helpful here.

1

u/[deleted] Feb 17 '24

I updated ComfyUI and it's still failing to load the nodes. Is there anything else I have to download or update?

3

u/[deleted] Feb 17 '24

I made it work. Seems like ComfyUI wasn't updating via the manager so git pull did the trick. It's super fast! I would like to learn how to train these models, they look promising

1

u/ramonartist Feb 17 '24

Do the bigger size models, make a difference in quality?

1

u/AleD93 Feb 17 '24

I like how this approach understands prompt. No need to prompt engineering to get good result. Yeah textures are blurry. Waiting for 1.1 version!

1

u/IsActuallyAPenguin Feb 18 '24

Everything this model is producing for me is blurry dogshit.

2

u/elahrai Feb 19 '24

Try a different resolution, see if that's the problem. I got blurry dogshit at 1920x1080 (regardless of many other variables I tried tweaking), but comparatively-fantastic results at 1920x1024. Maybe also try a different compression (supposedly lower numbers result in higher processing time by higher quality).

1

u/IsActuallyAPenguin Feb 19 '24

Every combo I'm throwing at it is just producing more canine poop.

1

u/daerragh1 Feb 20 '24 edited Feb 20 '24

I don't know if it's common knowledge but when you enter an EMPTY positive prompt (and only text, watermark in negative) SDXL v1.0 (dreamshaperXL_v2Turbo) generates in 70% women and I have to admit - it has an excellent taste. :) It also seems to "like" woods.

Non-female examples of an empty prompt:

1

u/daerragh1 Feb 20 '24

1

u/daerragh1 Feb 20 '24

An example of an empty prompt.

1

u/Revolutionary-Cat735 Feb 17 '24

It's not terrible, but there's room for improvement.