ComfyUI Node
Xiaomi-Lens-0 Loader
Loads Xiaomi-Lens-0 (4B, bfloat16, about 9 GB) from models/xiaomi_lens/<name>/, the files of the Hugging Face repository SeerRay-Lab/Xiaomi-Lens-0.
Xiaomi-Lens-0 Loader
- model
◄model▾►
◄deviceauto►
◄attentionauto►
◄decoder_attentionauto►
◄after_runkeep on device►
Categoryloaders/xiaomi_lens
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | a folder in models/xiaomi_lens/ | |
| device | COMBO | auto | auto: ComfyUI's GPU. cpu: works, slower (bfloat16, about 10 GB of RAM) |
| attention | COMBO | auto | auto: FlashAttention-2 (what upstream uses) when flash-attn is installed and the model runs on CUDA, otherwise PyTorch SDPA |
| decoder_attention | COMBO | auto | the mask decoder's attention. auto: flash-attn (upstream's default) when installed and on CUDA, otherwise PyTorch SDPA. mha: upstream's fallback without flash-attn (identical results to upstream there), but its memory grows with the square of the image size: about 32 GB for an 8 MP image |
| after_run | COMBO | keep on device | keep on device: fast repeated runs. move to CPU: frees about 9 GB of VRAM after each run |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | XIAOMI_LENS_MODEL | — |