Back to All Tutorials
Intermediate20 min read

Complete Microsoft Lens ComfyUI Workflow Guide: 3.8B MMDiT Standard vs. Turbo Setup

Step-by-step tutorial on running Microsoft's Lens natively in ComfyUI — covering 3.8B dual-stream MMDiT architecture, GPT-OSS-20B text encoding, Standard vs. Turbo 8-step setups, and Subgraph encapsulation.

By CGFlowStudio
2026-08-20

Complete Microsoft Lens ComfyUI Workflow Guide: 3.8B MMDiT Standard vs. Turbo Setup

Lens from Microsoft (released under the permissive MIT license) is a compact, highly efficient 3.8-billion parameter open-weights text-to-image foundation model. Designed with a dual-stream Multimodal Diffusion Transformer (MMDiT) architecture, multi-layer text feature extraction from GPT-OSS-20B, and FLUX.2 semantic VAE decoding, Lens achieves competitive photorealistic rendering quality with significantly lower training and inference compute.

Lens features native mixed-resolution training, allowing it to render diverse aspect ratios (16:9, 9:16, 1:1, 21:9) without cropping distortion or subject warping.

Available in two primary model variants — Lens Standard (~50 steps for maximum detail) and Lens Turbo (~8 steps for rapid generation) — Microsoft Lens is natively supported in ComfyUI. In this tutorial guide, we walk you step-by-step through installing model weights, configuring the GPT-OSS text encoder, navigating Subgraph nodes, and executing both Standard and Turbo workflows.


1. Introduction & Core Capabilities

Before running your first generation, let’s look at the architectural innovations that make Microsoft Lens exceptionally compact and responsive:

💡
Why Mixed-Resolution Training Matters: Traditional models force images to be square or pre-cropped during training. Lens was trained natively across multi-aspect ratio resolutions, ensuring subjects in widescreen (16:9) or vertical (9:16) compositions maintain natural spatial proportions.

Standard vs. Turbo Model Edition Comparison

Standard Model ~50 Steps

Lens (Standard)

Full 50-step model. Delivers highest micro-texture resolution, fine lighting gradients, and intricate background details for final production output.

Distilled Model ~8 Steps

Lens Turbo

Step-distilled variant for ultra-fast rendering. Completes generation in just 8 steps, making it perfect for rapid previewing and batch ideation.


2. Getting Started – Loading Official Templates

ComfyUI provides built-in native workflow templates for Microsoft Lens.

1 Update ComfyUI Core

Update ComfyUI to the latest version to ensure native loader nodes and Subgraph support are active.

2 Open Template Library

Click Templates in the ComfyUI top menu and search for Lens or Lens Turbo.

3 Select Target Workflow

Choose between Lens: Text to Image or Lens Turbo: Text to Image.


3. Model Installation & Directory Structure

Download required Lens diffusion checkpoints, GPT-OSS text encoders, and VAE weights from Comfy-Org/Lens on Hugging Face and place them into your local ComfyUI subdirectories:

📂 Microsoft Lens Model Directory Layout ComfyUI/models/
📂 ComfyUI/models/
📁 diffusion_models/
📄 lens_bf16.safetensors (Standard 50-Step Model - or MXFP8)
📄 lens_turbo_bf16.safetensors (Turbo 8-Step Model - or MXFP8)
📁 text_encoders/
📄 gpt_oss_20b_nvfp4.safetensors (Shared GPT-OSS-20B Text Encoder)
📁 vae/
📄 flux2-vae.safetensors (Shared FLUX.2 Semantic VAE)

4. Step-by-Step Workflow Walkthroughs

Workflow 1: Lens (Standard) Text-to-Image

The Standard workflow renders high-fidelity imagery in ~50 sampling steps.

Lens Standard Pipeline Flow
GPT-OSS-20B Text Encoder Lens Subgraph (50 Steps) ResolutionSelector SaveImage
  1. Load Standard Template: Open Templates -> Image -> Lens.
  2. Select Model Weights: Ensure lens_bf16.safetensors (or mxfp8) and gpt_oss_20b_nvfp4.safetensors are selected in the loader.
  3. Enter Prompt: Type your descriptive prompt into the prompt input node.
  4. Choose Aspect Ratio: Use ResolutionSelector to choose your desired aspect ratio (e.g., 16:9 Widescreen, 1:1 Square, 9:16 Portrait).
  5. Run Queue: Click Queue Prompt (Ctrl+Enter). Generation completes in ~50 steps.

Workflow 2: Lens Turbo Text-to-Image

The Lens Turbo workflow completes sampling in just 8 steps for rapid generation.

Lens Turbo Pipeline Flow
GPT-OSS-20B Text Encoder Lens Turbo Subgraph (8 Steps) SaveImage
  1. Load Turbo Template: Open Templates -> Image -> Lens Turbo.
  2. Select Turbo Checkpoint: Select lens_turbo_bf16.safetensors.
  3. Run Queue: Rapid sampling renders final images in under 3 seconds on consumer GPUs.

5. Understanding the Subgraph Architecture

To keep the canvas clean and modular, the core sampling and conditioning pipeline for Microsoft Lens is wrapped inside a Subgraph node:

Subgraph Inspection & Customization

Beginners can use the top-level inputs (prompt, resolution, seed) directly. Advanced creators can double-click the Lens Subgraph node to open its inner canvas, inspect latent conditioning nodes, or swap out samplers.


6. Available Models Comparison Table

Model Variant File Name Sampling Steps Ideal Use Case
Lens Standard lens_bf16.safetensors ~50 Steps High-detail production rendering & portfolio artwork.
Lens Standard (MXFP8) lens_mxfp8.safetensors ~50 Steps High-detail rendering for 12GB–16GB VRAM GPUs.
Lens Turbo lens_turbo_bf16.safetensors ~8 Steps Ultra-fast concept iteration & batch generation.
Lens Turbo (MXFP8) lens_turbo_mxfp8.safetensors ~8 Steps Fast iteration for lower VRAM hardware.

7. Practical Tips & Troubleshooting

📐 Aspect Ratio Freedom

Feel free to experiment with extreme aspect ratios (e.g. 21:9 ultrawide or 9:16 vertical stories). Lens's mixed-resolution training prevents stretched faces or repeating subjects.

💾 Lowering VRAM Footprint

If running on a 12GB–16GB VRAM GPU, select the mxfp8 quantized variant for both diffusion model and text encoder to optimize VRAM utilization.

📂 Saved Image Location

Generated images save automatically to ComfyUI/output/ with full workflow node metadata embedded into the image file.


8. Conclusion & Next Steps

Microsoft Lens offers local AI creators a compact, 3.8B parameter foundation model with an open MIT license. By starting with Lens Turbo for fast prompt discovery and switching to Lens Standard for final renders, you can build efficient image generation pipelines on consumer hardware.

Next Steps to Explore

  • Test generating widescreen 21:9 landscapes using Lens Standard.
  • Double-click the Lens Subgraph to inspect inner latent sampling structures.
  • Browse more image tutorials on our ComfyHub Tutorials Directory.