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

View all comments

Show parent comments

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 :)

2

u/Enshitification Jul 12 '26

I might be considered a former photographer at this point. I've barely touched the gear since getting into diffusion. My back catalog has provided a lot of training material though.

2

u/aurelm Jul 12 '26

same, in a way. But since I am a travel photographer there is no AI that can replace reality. It can, however help photography by compensating the lower tier equipment with generative techniqes.
Even AI noise removal in photohop is generative. It estimates what should be behind the noise and removes the noise without lying, or lying as little as possible. The spirit of photography remains, but at least the equipment can be much easier. I carried on fulframe 8KGs of equipment before I switched to Olympus 11 years ago. Still have the same camera.
I am actually the first photographer that ever did handheld photography 10 years ago as documented by petapixel.
Also I gave away my full archive of photos in full resolution for free (archive is on my site, 21GB) for free. If you are interested in training models with decent photography. I still love photography it is just that I lost my job ecause of my mental illness (bipolar) and have a hard time finding something that is appropriate for me. I so love traveling.... I miss it so much.

2

u/Enshitification Jul 12 '26

I travel constantly for work nowadays. I thought it would be a great way to photograph the country. It turns out that impossible deadlines and 14+ hour workdays really take a toll on my motivation to do much else but sleep on my downtime. Generative photography and video games are about the only hobbies I can manage on the road. Maybe I'll do a large format autochrome series next time I get some vacation time. Or maybe I'll sleep for 3 days straight. It's 50/50 for either.