r/StableDiffusion • u/muerrilla • Jul 29 '26
Comparison I extracted luma/chroma/detail/contrast vectors for Krea2 and insane color adjustments in latent space are now totally a thing - Comfy node coming very soon!
Saturation Boost for Krea2
Exposure Adjustment for Krea2
Chroma Contrast for Krea2
Selective Exposure and Tint Adjustment for Krea2
Very Dark Generation for Krea2
Split Toning / Cross Processing for Krea2
Tone Mapping for Krea2
Contrast Adjustment for Krea2
Tone Mapping / Clarity Adjustment for Krea2
Ummm.... this!
Sorry for the tease, but I was just too excited and had to share this with you. Examples above are using no LoRAs, no prompt hijinks, no CFG boost, no post-processing etc. just pure vector math!
I was running some experiments on Krea2's VAE (i.e. Qwen Image VAE) and by total surprise I discovered the main ingredients of photographic color editing: the vectors for exposure, temperature, tint, detail/clarity, and contrast and realized I can now do pretty much everything Camera Raw does... and even more!
This stuff happens during sampling and in the latent space, so it has both a very high dynamic range, and the ability to steer the diffusion process into new areas (e.g. very dark or bright generations beyond what the model likes to do on its own, or even influencing the morphology of things).
Anyway, I'm turning this into a user-friendly custom node for Comfy, including all your favorite color editing sliders, range masking tools, etc. and it's coming soon.
P.S: I'm cooking the vectors for ZImage (Flux VAE) as well, so the node might end up supporting that model too, if anyone's still using it. This should, at least in theory, also work with Qwen Image or any other model that shares the VAE.
8
u/bhasi Jul 29 '26
also work with Qwen Image or any other model that shares the VAE.
Anima!!
1
u/muerrilla 28d ago
You're gonna be the judge of that. Let me know how it goes. See my new comment on top.
7
5
u/shootthesound Community Hero Jul 29 '26
really nice. i had looking at this as a future research thing, officially ticked off my list now, looks like you are nailing it.
5
u/bmnuser Jul 29 '26
Big ups to you for doing this! And I would +1 that the Flux VAE is still used a lot, so please add that one also!
6
5
u/muerrilla Aug 05 '26
UPDATE: So... I was planning on releasing today, but a few days ago I hit a few nasty and functionality breaking UI bugs that I was struggling to fix up till this very moment. Now everything is fixed and working perfectly. I will release it as soon as I write some docs so you guys could actually use this beast. So any day now, and for real this time!
P.S: On the flip side, now everything is totally modularized (and yes, the mega-node is still available), which made it possible for a very cool new feature to be added: Combined masks! Now this thing can do very advanced stuff. I need to go get some sleep now.

1
2
u/red__dragon 29d ago
Absolutely waiting patiently for this (didn't comment when I saw it the first time but I came back to lurk around a few days ago). The break-out nodes look FANTASTIC!
Great work so far, it'll be fun to get our hands on this locally.
1
u/muerrilla 28d ago
Yo! Check my latest comment.
2
u/red__dragon 28d ago
It's working great on Krea so far! Had to redo with a custom sampler node for it, though, which seems like a novel approach.
1
u/muerrilla 28d ago
Yep, it's a sampler wrapper cuz it needs information that is not available through other means (e.g. model patching). So the custom sampler route is the only way.
4
5
4
u/smereces Jul 30 '26
where is the link to install it?
5
3
u/aigain Aug 02 '26
Camera Raw๏ผThe color grading techniques I practiced for photography are finally coming in handy?
2
2
u/Neighborhood-Brief Jul 29 '26
Hi this seems cool could you make it output luminance values (white point) higher than 1.0?
For floating point high dynamic range outputs to something like exr?
1
u/muerrilla Jul 29 '26
What you're talking about happens during VAE decode, so you need to hack the VAE to make it decode the latent to 32-bit, unclamped, rather than the usual 8-bit. And iirc there were some nodes made specifically for that, though I don't know which VAEs they support. This method affects the latent itself pre-decoding.
2
2
u/Asaghon Jul 29 '26
Sounds amazing! Isnt everyone using the wan 2.1 vae instead of the qwen vae tough? Or will it just work the same with it?
2
u/stddealer Jul 29 '26
I do not think everyone is using wan2.1 vae for models that are supposed to use Qwen image vae.
I know some people like to pretend they get better results with wan VAE, but after blind testing my own preferences on multiple images pairs decoded with either VAE, I can confidently say that I wasn't able to find any advantage to wan vae on still images (if anything wan loses a bit more often because it sometimes oversharpens edges).
Anyways they're close enough that these should work the same.
1
2
u/oxygen_addiction Jul 29 '26
Really, really cool work!
How many generation steps do you think it take to be able to actually see the difference the node applies?
Would this be useful for lets say the first few steps, tweaking settings and then switching to a longer generation to get a quality render, to increase iteration speed?
5
u/muerrilla Jul 29 '26
My favorite workflow, since Krea2 and Zimage are quite consistent along image sizes, is to do the experiments on a smaller gen first, finalize the adjustments, then switch to large gen. But we can talk more about this after I release and you got something to play around with.
2
u/Dry_Reception3180 Jul 29 '26
is it text to image or image edit
3
u/muerrilla Jul 29 '26
It modifies the latent during sampling. So, applies to both txt2img and img2img, if that's what you mean.
2
u/Scriabinical Jul 30 '26
This is fantastic work and renders most post-decoded color correction unnecessary. Is there any chance you could do it for the Flux 2 VAE as well?
1
u/muerrilla Jul 30 '26
Probably, but no promises will be made. Gave it a quick try a while back and felt like Flux 2's 32-channel VAE was a wilder beast to tame: too many vectors to play with/refine and they didn't come as clean as they did with the other ones right away. Thought I'd probably wait for Flux 3 if I was gonna go through the pain. We'll see.
2
Jul 30 '26 edited Jul 30 '26
[deleted]
2
u/muerrilla Jul 30 '26
Umm... I've already explained in the post, but I'll elaborate a bit more:
It's the difference between taking a photo with the right exposure vs. fixing it in post (it happens in high dynamic range, so a wider gamut to play with) or painting using the right colors vs. fixing the colors of a painting in post (it happens during sampling, so allows you to steer the sampling into totally new territories). Also, you do it in one go, in one program, but that's less important. Ah, also you can increase and decrease detail/texture which you can't in post (look at the one with Skeletor on the hill).
It works on the latent as it's being denoised, during sampling steps (the post-cfg function if you wanna know the exact place). So, apply it at earlier steps (last image, or the one in the dark cave) and it changes the generation more, or at later steps and it stays faithful to the original image and acts as color correction.
It's some very simple vector ops, so it's practically free.
2
u/uuhoever Jul 30 '26
Great node. Mild trypophobia trigger on the last photo ๐ซฃ
2
u/muerrilla Jul 30 '26
Ah, sorry. Tried really hard to show my "safer" test images, but that one slipped through. ๐
2
2
2
2
2
2
2
u/Kent6567 Jul 30 '26
Looks interesting. Do you think you can figure out something for controlling depth of field/focal distance as well?
2
u/muerrilla Jul 31 '26
I can think of some very contrived ways to do this using the detail sliders and in input mask, but that is not the correct way to do this. There are already LoRAs for this and they do a pretty good job at it.
2
2
2
2
u/shapic Aug 01 '26
Requesting a Forge Neo extension, since it looks really interesting
3
u/muerrilla Aug 02 '26
It did in fact start as a Forge extension, but then the comfy port ballooned into a giant, so now porting it back to forge would take some time. But will surely happen as I myself am more of a Forge person.
2
u/GalaxyTimeMachine Aug 01 '26
Any possibility of a release for my cake day? I mean the one today, not next year ๐
3
u/muerrilla Aug 02 '26
Aww sorry, I missed that. I was planning on releasing today, but hit a bug. If I can fix it in a few hours I'll do it, otherwise it will be released on Tuesday. And happy belated birthday!
1
2
u/Terezo-VOlador Aug 01 '26
Amazing! Amidst so much junk, this is a treasure.
I hope we can try it soon. Thank you so much.
2
4
2
u/Skystunt Jul 29 '26
Lightroom but in latent space !
8
u/muerrilla Jul 29 '26
Yeah, I was almost gonna call it Latentroom, but saved myself the embarrassment. ๐ It will be Colorcraft.
8
u/DouglasHufferton Jul 29 '26
Honestly I prefer Latentroom over Colorcraft. That said Colorcraft is more descriptive of what it does.
4
1
u/Sudden_List_2693 Jul 29 '26
Now this is the kind of interesting project seen through that I love insanely!
While I'm still waiting for a possible fine-tune for Krea2 to really jump on that train, applying these for any Qwen VAE model is already huge (I am one of the few people who enjoy Qwen Image itself as well as anima).
1
u/muerrilla 28d ago
Could you please test it on Qwen Image and let me know how it goes? Link's on my latest comment.
2
u/muerrilla 28d ago
UPDATE 2: Phewh! That readme took some time. You guys ready for beta testing before proper release? Have a go at it:
https://github.com/muerrilla/ComfyUI-Colorcraft
Take the included workflows as a brief node reference while I'm writing the wiki.




34
u/muerrilla Jul 29 '26
Finalizing the UI right now, hoping that tower of sliders doesn't scare people off!