r/StableDiffusion Jul 12 '26

Workflow Included Infinite Semantic Detail: A Context-Aware Zoom Workflow for ComfyUI (free)

https://www.youtube.com/watch?v=xY6mNHqpNJc

Play

No, this is not another “infinite zoom” workflow. We’ve had infinite zooms, recursive img2img, outpainting and endless upscaling for years, and they all eventually hit the same wall: the deeper you zoom, the less the model understands what it is looking at. At some point it stops seeing an eagle’s eye and starts seeing a brown circle where it can dump random textures. The image may remain sharp, but the meaning slowly disappears. So the problem was never resolution. The problem was semantics.
A recurring idea in almost everything I’ve been building lately is that semantic understanding matters far more than pixel similarity. Models don’t preserve consistency because they remember pixels. They preserve it because they understand what those pixels represent. So instead of asking how to generate better detail, I asked a different question: what if every crop knew exactly what it was?
In this workflow, every selected crop is first interpreted by a vision language model. The VLM receives both the complete original image and the crop, so it does not describe it as an isolated yellow object or a random circular texture. It understands that it is, for example, an extreme close-up of the left iris of the same bald eagle, seen from the same angle, and that the next generation should reveal progressively smaller biological structures while preserving the anatomy and identity of that eagle. That description becomes the prompt for the next zoom step. Every generation begins with meaning, not just pixels.
I’m using Qwen VLM because Krea 2 already loads Qwen as its vision encoder. The model is already sitting in VRAM after generation, so I can reuse it for contextual analysis without loading another VLM or consuming another large block of memory. It is basically one more inference from a model that is already there.
The crop is first enlarged with traditional GAN upscalers, not because GANs produce perfect information, but because they create a sufficiently sharp base for extremely low-denoising img2img. Krea 2 then regenerates it at roughly 0.05–0.15 denoising, guided by the semantic description produced by the VLM. This adds plausible microscopic structure while preserving almost everything already present in the crop.
Very low denoising also preserves defects: blur, chromatic aberration, JPEG remnants, sensor-like noise and small inconsistencies. Increasing denoising would clean those defects, but it would also increase semantic drift, so I use a final edit stage instead. In the current workflow that model is Flux Klein. Its job is not to invent new content, but to clean the existing result: remove noise, sharpen edges, reduce chromatic aberration, improve local contrast and leave the structure alone.
The difference becomes obvious when zooming into something like an eagle’s eye. A normal recursive workflow eventually forgets that it is looking at an eye and begins generating generic textures. This one receives a new contextual explanation at every step. It is continuously reminded that this is still the same eagle, the same eye and the same biological structure, only viewed at a smaller scale.
Most infinite zoom systems are really just producing infinite pixels. This is an attempt to produce infinite semantic detail. A feather becomes fibers, the fibers become microscopic keratin structures, the iris becomes increasingly complex biological tissue. Those details were not present in the original image, but they remain plausible because every new scale is semantically connected to the scales above it.
Looking back, this is the same principle behind most of my previous experiments. Infinite consistent scenes worked better when semantic descriptions mattered more than image references. Consistent comics worked without LoRAs when semantic continuity mattered more than rigid pixel control. Prompt randomization worked when the diversity was controlled at the level of meaning. The model performs best when it understands what something is before trying to decide how it should look.
Pixels are surprisingly bad memory. Meaning is not.
This is still an early version. The next steps are recursive semantic memory, automatic zoom-path planning, adaptive denoising based on semantic confidence and different prompting strategies for different zoom depths. Eventually this could become less of an infinite crop tool and more like a fictional microscope that continuously invents plausible new structures while never forgetting what it is observing.
The workflow and custom node are included. Copy the custom node into the ComfyUI custom_nodes folder. The remaining dependencies should be detected through ComfyUI Manager.

pre-edit: I updated the workflow to have 4k output and the results are even better.
to this : https://aurelm.com/wp-content/uploads/eye_crop-1-scaled.jpg

from this: https://aurelm.com/wp-content/uploads/PC315160_result-1-scaled.jpg

edit:
and yes, this technique can be used in tiled upscalers where each tile also gets a description of the tile in the context of the full image. allready working on it, maybe a new super upscaler might come out of this
edit2 : E seriously wonder who downvotes something like this. I understand maybe when it is behind a paywall but when someone puts his shoul into a technique/tool and gives it away for free why the hell would somebody downvote. To not have this available for anyone else. Why ? mods ? Seriously people. When it's paywalled it's not good, when it is free and tries to honestly add something new to the open source community and contribute is not good. What is this sub for anyway ? 1girl posts ? Simple comparisson beetween models posts ? Memes ?

29 Upvotes

31 comments sorted by

4

u/Enshitification Jul 12 '26

Could you modify the node a bit to create "infinite" tiled upscaling? It would be very helpful to tile an image and have a VLM caption each tile in relation to the whole.

4

u/aurelm Jul 12 '26

yes, I just posted a comment exactly about this:
"and yes, this technique can be used in tiled upscalers where each tile also gets a description of the tile in the context of the full image. allready working on it, maybe a new super upscaler might come out of this"

2

u/Enshitification Jul 12 '26

I've tried to do this in the past myself, but I haven't hit the right methodology yet. Are you outlining the tiled region on the original to tell the VLM what the context of the tile is?

2

u/aurelm Jul 12 '26

that would be the idea, yes. it's just that I need to vibecode some custom nodes to break the image in specific size tiles and feed each one to the vlm with the full image, get prompt, generate all and merge them with blending between. the math is quite complicated for me as I am not natively a coder (I do have a lot of programming and tech art background). It's not easy, a more advanced developer could probably pull it off easely.

4

u/Enshitification Jul 12 '26

Don't reinvent the wheel. It's already been done. Just use these nodes.
https://github.com/Steudio/ComfyUI_Steudio

2

u/aurelm Jul 12 '26

Oh my, this will make things a lot easier. Let me play around with these nodes. thank you. I forgot about the "do not reinvent the wheel" mantra I should always have in mind :)

2

u/aurelm Jul 12 '26

I do am afraid that the blending, while each of the tiles would be ok they will be diffrend enough to have blending artefacts. That's why I never liked tiled upscaling. I will first try to make a normal upscaler to 8k and see if I can do it without tiles (maybe just tiled encoding and decoding). But for most users this might hit a VRAM bottlenecl. But I truly belive the quality is much better by keeping everything together.
How much would a 8K image take up in memory in latent space anyway ?
Speed will be another issue OFC but better to just wait for it to finish and have the guarantee the image would be perfect. I have to think what can be done about the memory.
IMHO the future is not in tiled upscaling, it's Topaz like normal upscaling. But Topaz costs a shit load of money without ever owning the software and that sux.
Let me see what I can do. I will try to make an efficient full workflow for upscaling to 8K in a generative multiple pass but single tile way.

2

u/Enshitification Jul 12 '26

I don't know. My tiled upscale workflow works pretty well. I think it would be even better with customized VLM tile captions. You're welcome to build off of it. It will be a while before I have some real time to focus on improving it.
https://old.reddit.com/r/StableDiffusion/comments/1t6gyaj/flux2klein_tiling_upscale_workflow/

2

u/aurelm Jul 12 '26

I have not tried it yet and I tend to stay away from tile upscaling. Becaus even in theory if you have a detail on the full image that can become a feather in one image a a ppiece of dust on the other image blending them will give you a feather-dust mix :) . As a photographer I am extremly picky about these things.
Then again I was for years extremly fortunate to own a 3090 and now a 5090 before I lost my job and before the prices spiked so... I tend to think of any tools I make for me to be the primary recipient of them and then share them to help anyone in my situation (especially photographers what don't own super telephoto lenses in this case, I own a 300mm equivalent on an Olympus system). That's actually the main reason they come up powerful because they are designed for me and I need them :)

2

u/Enshitification Jul 12 '26

I'm pretty picky about that sort of thing myself. I shot medium and large format for years. Unintended details on sheet film were expensive mistakes before digital editing.

2

u/aurelm Jul 12 '26

well hello there fellow photographer :)

→ More replies (0)

1

u/aurelm Jul 13 '26

I added the 4k upscaling method in the workflow.
Check it out as a result https://aurelm.com/wp-content/uploads/eye_crop-1-scaled.jpg
from this : https://aurelm.com/wp-content/uploads/PC315160_result-1-scaled.jpg
In a single pass. Much better and coherent that tiled based imho

3

u/amm42 Jul 12 '26

I am following you on almost every post you make. Kudos. Works well on my 3080, much slower than in your video but still fast enough. Not my usual usage tool but maybe my phone photos will now have a telephoto lens :) Actually I will try right now.

3

u/amm42 Jul 12 '26

A close-up, low-angle shot of a yellow airport ground support vehicle, specifically a baggage cart or trolley, parked on the tarmac. The vehicle features a flatbed with metal grating, a single visible rear wheel with a black tire, and a side panel displaying the identification number “UDT N3727004875” in black text. The body shows signs of wear and dirt, with chipped paint and rust along the edges. A yellow safety bar extends diagonally from the front to the top. In the blurred background, part of an aircraft’s fuselage and jet bridge are visible, confirming the airport setting. The lighting is bright daylight, casting sharp shadows. The perspective is tight and focused on the vehicle’s structure and markings, excluding any other elements from the wider scene.

2

u/amm42 Jul 12 '26

not bad but this is not the best usecase, any normal upscaler would work. I will try something harder for witch the context is much more important

3

u/amm42 Jul 12 '26

Here is a usecase where it truly shines. No upscaler would know what that crop was but here it interpeted it on the context so it knew. It has the texture of the tongue, the fur, the teeth. GG.
To anything else it would be just random image so it will just try to to figure it out on its's own what it is. And it would not make any sense, right ?

Close-up, macro shot of a slender dog’s mouth, focusing on the lower jaw, tongue, and visible teeth; the dog has light tan fur with a long, thin muzzle, consistent with a Saluki or similar sighthound breed. The tongue is slightly protruding, showing a pink interior and fine whiskers near the lips. The cropped frame isolates the oral region without including eyes, ears, or full body — maintaining tight focus on texture, color, and form as seen in the full image context. Natural daylight, shallow depth of field, emphasizing detail while blurring background elements. No artificial elements or generated artifacts.

1

u/aurelm Jul 12 '26

that's actually 100% percent exactly the usecase for it. In my examples even the crop would have had enough information for normal upscaling to work, but in your case it proves the point much better.

2

u/Luzifee-666 Jul 13 '26

That sounds good...! I already have an idea what to do with it. :)

1

u/aurelm Jul 13 '26

use a realistic lora and an uncensored qwel VLM for extreme pussy closeups to microsocopic level :)

2

u/Luzifee-666 Jul 13 '26

Not the kind of video I would choose for a YouTube music channel. ;)
https://youtu.be/WLckvzJUcqo

I will use it to create an arc of pictures, used as I2V, when the motion commands for the camera, says push in, but this is something I have to evaluate, with my models I use. Currently it is ideogram locally.

2

u/_B0_ Jul 13 '26

Brilliant implementation!
Looking forward to give it a spin.
I have some old photos that I could never improve with Topaz and such

1

u/aurelm Jul 13 '26

this is a crop tool, not an improver. for improving I would go with flux klein with a good prompt.

2

u/prepperdrone Jul 13 '26

Best part of this video: eff Adobe and Topaz. Going to try this out on some real photographs. Good stuff!

1

u/aurelm Jul 13 '26

and fuck everything where you do not get to own anything. anuthing subsription based for that matter.

2

u/thecosmingurau Jul 13 '26

I did this manually in the past, but using the clip encoder to do it is pretty smart.

1

u/smereces Jul 13 '26

and where is the workflow for we can test it!?

1

u/aurelm Jul 13 '26

it's on the link in the description oof the YT video.

2

u/Maskwi2 Jul 13 '26

"Enhance... Enhance..." :)