Skip to content
Other

LIS1-0.8B

сегментация по сложным описаниям за один проход

2 min readupdated

Модель LIS1-0.8B от автора Wojtekb30 находит и выделяет попиксельными масками объекты на изображении по текстовому запросу или логической загадке (например, «что-то, что можно выпить»). В её основе лежит мультимодальная модель Qwen3.5-0.8B, дополненная кастомной головой декодирования масок и опциональным LoRA-адаптером (небольшой надстройкой над базовой моделью). В отличие от аналогов вроде LISA, LIS1 не генерирует текстовые токены по одному и не требует тяжёлого внешнего энкодера SAM — вся работа выполняется за один прямой проход (single forward pass) на внутренних признаках Qwen3.5. Компактная версия на 0.8B параметров подойдёт для локального запуска с 4-битной или 8-битной квантизацией в задачах умного поиска и разметки объектов.

Ключевые особенности

  • Работа за один проход: без авторегрессионной генерации текста и без отдельного бэкбона SAM — маски, контуры и рамки строятся напрямую из скрытых состояний Vision Transformer и последних 4 слоёв LLM.
  • Понимание косвенных описаний: модель обучена на RefCOCO с добавлением 35% синтетических функциональных загадок и проверялась в режиме zero-shot на бенчмарке ReasonSeg.
  • Двухмасштабное декодирование: использует признаки 1/32 и 1/16 разрешения из ViT с кэшированием визуальных эмбеддингов (LRU-кэш) для быстрого прогона нескольких запросов по одной картинке.
  • Два варианта весов: в репозитории доступны noLora (обучена только голова сегментации при замороженной Qwen3.5) и forLora (дополнительно дообучен LoRA-адаптер на верхних 4 слоях LLM).

Что можно сделать

  • Интерактивное выделение объектов по смыслу: находить на фото предметы не только по прямому названию («тост», «красный соус»), но и по назначению («то, из чего пьют»).
  • Автоматическая разметка датасетов: извлекать готовые бинарные маски, полигоны в формате COCO и bounding boxes за один прогон.
  • Локальный инференс на слабом железе: запускать 0.8B-версию в 4-bit или 8-bit через bitsandbytes (при этом ViT-энкодер автоматически остаётся без квантизации для сохранения точности границ).

Пример

from PIL import Image
from lis1_infer import LIS1Inferencer

inferencer = LIS1Inferencer()
inferencer.load_model(
    qwen_path="./Qwen3.5-0.8B",
    lis_model_path="./LIS1-0.8B-forLora.safetensors",
    lora_adapter="./LIS1-0.8B-LoraAdapter",
    device="cuda",
    load_in_4bit=True,
)
images = [Image.open("image1.jpg").convert("RGB")]
outputs = inferencer.run_model(images=images, queries=[["toast", "something you can drink"]])
inferencer.render_image(images=images, outputs=outputs)[0].save("result.png")
ПодробнееReasonSeg zero-shot (LIS1-0.8B forLora): Val overall gIoU — 32.4, cIoU — 31.7; Test overall gIoU — 29.4, cIoU — 28.6 (у версии noLora: Test gIoU — 27.5, cIoU — 29.6).
Семейство LIS1 также включает варианты на 2B, 4B, 9B и 27B (версии от 4B и выше в тестах автора обошли Ultralytics MobileSAM и YOLOE Open Vocabulary).
Для запуска требуются скрипты LIS1ModelCode.py и lis1_infer.py из репозитория, а также локально загруженная базовая модель Qwen3.5-0.8B.
Примеры
Discuss Telegram 0

Will it run?

Working out the memory needs

The bot is still collecting this model's weight sizes; the estimate will appear here in a few minutes. Meanwhile you can rent a GPU with headroom.

Massed ComputeOpen Massed Compute

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # Wojtekb30/LIS1-0.8B
    # ===== Tokens: paste yours between the quotes =====
    export HF_TOKEN=""        # huggingface.co/settings/tokens, for gated models
    # ==========================================
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download Wojtekb30/LIS1-0.8B --local-dir ~/models/LIS1-0.8B
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to LIS1-0.8B
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of LIS1-0.8B (quants, finetunes, LoRAs) will show up under the bell.

No known relatives of this model yet. All derivatives on Hugging Face

About the model

Wojtekb30/LIS1-0.8B
Author
Wojtekb30
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

00

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments