Microsoft Lens in ComfyUI (Patreon)
Downloads
Content
Video - https://youtu.be/wy3uUTF9DCo
Overview
Lens is a 3.8B-parameter foundational text-to-image model designed for efficient training and fast high-resolution generation. It combines dense-caption pre-training, mixed-resolution learning, GPT-OSS multi-layer text features, and the FLUX.2 semantic VAE to reach competitive quality with substantially less training compute than larger T2I models.
Highlights
Efficient Foundation — Trained on Lens-800M, an 800M image-text corpus with long GPT-4.1 captions, maximising information density per training batch.
Compact & Expressive — A 48-block MMDiT denoiser leverages FLUX.2 latents and concatenated multi-layer GPT-OSS features for stronger prompt following and multilingual generalisation.
Flexible Resolution — Mixed-resolution training enables inference across aspect ratios from 1:2 to 2:1 and resolutions up to 1440×1440. Though it can also do 2048x2048 at a push, or even higher when upscaling.
Post-trained Variants — RL tuning improves visual quality and artifact suppression; the distilled Lens-Turbo supports fast 4-step generation.
The ComfyUI files currently feature 2 versions of the model in both bf16 and mxfp8 formats.
It's super-fast (around 5s) and being a mere 3.8B model, the smaller model files are under 6GB!
For text it isn't as good as HiDream O1, but the images it makes aren't as smooth - which I think is great news. Prompt adherence is almost as good too.
Workflow Information
This workflow will work will all model version, and if you only want to use the best model then stick with either of the turbo versions
For high quality images, I personally prefer the results from 2-pass rendering (sometimes even leaving the upscale at 1x just to get extra detail or balance out the colours).
Model Downloads
Links for model downloads are included in the workflow:
Custom Nodes
The custom node requirements are minimal, with just the usual essentials for a Comfy life!
Install using ComfyUI manager or git clone.
Model Loading
Personally I'd suggest using the lens_turbo_bf16 model as that is both fast and high quality, but if you've got a lower end machine then the mxfp8 turbo is just as good!
Settings
1440x1440 is the default size, but you can select other resolutions. Comfy will automatically resize to the closest resolution size (divisible by 8).
Just 4 steps at CFG 1 are needed for the turbo model, but you may get slightly better images if you crank that all the way up to 6 or 8 steps.
Prompting
Enter a prompt to create your image. For the Turbo model you can ignore the negative prompt area in red. The ERNIE prompt-enhancer is also available via options if you don't fancy typing a huge load of text.
Remember with the ERNIE prompt-enhancer, you can also issue "commands" such as "make me something with an ancient feel" or "some random animal".
Options
There are many options available from basic text-2-image, all the way up to inpainting and upscaling.
As mentioned, personally I like doing a second pass via the image upscaling anyway for what I think is a better image. This can make the colours a lot lighter, though an interesting alternative is to use linear quadratic with a high denoise (>0.5). This will change the image A LOT compared to the original, but can be better overall.
If you're doing image-2-image or inpainting, then you should load an image:
The mask isn't used in image-2-image mode, and you can also select IMG_LOADED in the GET node for the image upscaling groups if you're not wanting to do an initial generation.
Lens doesn't seem to hot with img-2-img tasks from my tests so far, but the inpainting is very good!
If you're like me and have limited hand use, or you're simply not great at drawing masks, then Auto Masking will save you some pain:
The prompts shouldn't be very long, and you can alter the threshold value if it isn't quite doing what you want.
Whichever masking option you choose, Lens does quite well at filling in:
Upscaling & Compare
When using the upscaling & compare groups, don't forget you can choose what to upscale or compare via the GET nodes:
Upscaling will tend to make images brighter, which I think looks a bit more realistic, but may not be what you want. If you're looking for the darker colours, then unfortunately lens will require a higher (>0.5) denoise value, thus changing the image more.
The SeedVR upscaling option will stay closer to the original colours, if that is what you prefer.
On the left-hand side of the image below is an example of image upscaling. It has much more detail and what I think are better colours, even if they are quite bright:
Give it a go for yourself and see!
Example Images
Some example upscaled images are shown below:
Enjoy! :)