> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Lens ComfyUI workflow example

> Run Lens, Microsoft's 3.8B open text-to-image model, in ComfyUI: a dual-stream MMDiT backbone, GPT-OSS-20B text features, and the FLUX.2 semantic VAE.

**Lens** is an open text-to-image model by **Microsoft**, licensed under MIT. With **3.8 billion** parameters, it uses a **dual-stream MMDiT** architecture with **GPT-OSS-20B** text encoder features and the **FLUX.2 semantic VAE** to deliver competitive image quality with substantially less training compute than larger T2I models.

**Model highlights**:

* **Dual-stream MMDiT architecture**: joint image-text processing for coherent generation
* **GPT-OSS-20B multi-layer text features**: rich text understanding for accurate prompt following
* **FLUX.2 semantic VAE**: high-fidelity latent representation
* **Mixed-resolution training**: supports various aspect ratios without cropping
* **Compact 3.8B footprint**: runs on consumer GPUs with 24 GB VRAM

**Related links**:

* [Paper (arXiv)](https://arxiv.org/abs/2605.21573)
* [GitHub](https://github.com/microsoft/Lens)
* [Hugging Face (Microsoft)](https://huggingface.co/microsoft/Lens)
* [Hugging Face (Comfy-Org)](https://huggingface.co/Comfy-Org/Lens)

## Lens text-to-image workflow

Both the standard and Turbo variants use a **Subgraph** node to manage the text-to-image generation pipeline. You can open the subgraph to inspect or customize the internal nodes.

<Card title="Learn about Subgraph" icon="book-open" href="/interface/features/subgraph">
  This workflow uses Subgraph nodes for modular processing. Check out the Subgraph documentation to learn how to customize and extend the workflow.
</Card>

<h3 id="image_lens_t2i">
  Lens: Text to Image
</h3>

Input a text prompt and select resolution and aspect ratio. Generate a high-quality image using the efficient Lens text-to-image model.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/image_lens_t2i-1.webp" alt="Lens text-to-image workflow preview" />

<CardGroup cols={2}>
  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_lens_t2i.json">
    Download JSON or search "Lens" in Template Library
  </Card>
</CardGroup>

**Example output**

![Lens text-to-image example output](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/image_lens_t2i.png)

<Tip>
  <Tabs>
    <Tab title="Local users">
      Make sure your ComfyUI is updated.

      * [Download ComfyUI](https://www.comfy.org/download)
      * [Update Guide](/installation/update_comfyui)

      Workflows in this guide can be found in the [Workflow Templates](/interface/features/template).
      If you can't find them in the template, your ComfyUI may be outdated.

      If nodes are missing when loading a workflow, possible reasons:

      1. You are not using the latest ComfyUI version (Nightly version)
      2. Some nodes failed to import at startup
    </Tab>

    <Tab title="Cloud users">
      * [Cloud](https://cloud.comfy.org) will update after ComfyUI stable release.

      So, if you find any core node missing in this document, it might be because the new core nodes have not yet been released in the latest stable version. Please wait for the next stable release.
    </Tab>
  </Tabs>
</Tip>

#### Get started

1. Update ComfyUI to the latest version
2. Go to **Template** and search for **Lens**
3. Select the **Lens** workflow
4. Download any missing models (see [model downloads](#lens-model-downloads)), enter your prompt, and click **Queue**

<h3 id="image_lens_turbo_t2i">
  Lens Turbo: Text to Image
</h3>

Input a text prompt and select resolution, aspect ratio, and inference steps. Generate a high-quality image using the Lens text-to-image model.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/image_lens_turbo_t2i-1.webp" alt="Lens Turbo text-to-image workflow preview" />

<CardGroup cols={2}>
  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_lens_turbo_t2i.json">
    Download JSON or search "Lens Turbo" in Template Library
  </Card>
</CardGroup>

**Example output**

![Lens Turbo text-to-image example output](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/image_lens_turbo_t2i.png)

#### Get started

1. Update ComfyUI to the latest version
2. Go to **Template** and search for **Lens Turbo**
3. Select the **Lens Turbo** workflow
4. Download any missing models (see [model downloads](#lens-model-downloads)), enter your prompt, and click **Queue**

## Lens model downloads

You can find all model files at [Comfy-Org/Lens](https://huggingface.co/Comfy-Org/Lens) on Hugging Face.

<CardGroup cols={2}>
  <Card title="lens_bf16.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Lens/blob/main/diffusion_models/lens_bf16.safetensors">
    Diffusion model for Lens (BF16).
  </Card>

  <Card title="lens_turbo_bf16.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Lens/blob/main/diffusion_models/lens_turbo_bf16.safetensors">
    Diffusion model for Lens Turbo (BF16).
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="gpt_oss_20b_nvfp4.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Lens/blob/main/text_encoders/gpt_oss_20b_nvfp4.safetensors">
    Text encoder (GPT-OSS-20B) shared by both Lens and Lens Turbo.
  </Card>

  <Card title="flux2-vae.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/Lens/blob/main/vae/flux2-vae.safetensors">
    VAE (FLUX.2) shared by both Lens and Lens Turbo.
  </Card>
</CardGroup>

**Model storage location**

```
📂 ComfyUI/
├── 📂 models/
│   ├── 📂 diffusion_models/
│   │   ├── lens_bf16.safetensors (or lens_mxfp8.safetensors)
│   │   └── lens_turbo_bf16.safetensors (or lens_turbo_mxfp8.safetensors)
│   ├── 📂 text_encoders/
│   │   └── gpt_oss_20b_nvfp4.safetensors
│   └── 📂 vae/
│       └── flux2-vae.safetensors
```

## Available models

| Model      | Description                                           | Inference steps | Link                                                  |
| ---------- | ----------------------------------------------------- | --------------- | ----------------------------------------------------- |
| Lens       | Standard 3.8B model: higher quality, more steps       | \~50            | [Hugging Face](https://huggingface.co/microsoft/Lens) |
| Lens Turbo | Distilled variant: faster generation with fewer steps | \~8             | [Hugging Face](https://huggingface.co/microsoft/Lens) |
