Skip to content
 
 

Repository files navigation

Safetensors Model Inspector

Inspect .safetensors models from a desktop GUI and CLI.

image

What It Does

  • Detects architecture families and variants (Flux, SDXL/SD3, Wan, Hunyuan, Qwen, HiDream, LTX, Z-Image, Chroma, and more)
  • Detects adapter type (LoRA, LyCORIS, LoHa, LoKr, DoRA, GLoRA)
  • Extracts training metadata when present (steps, epochs, images, resolution, software, and related fields)
  • Supports file or folder workflows (including recursive folder scanning)
  • Supports .modelinfo key dumps for debugging and sharing

Repository Layout

  • gui.py: GUI only
  • inspect_model.py: model parsing, detection logic, data extraction, CLI
  • requirements.txt: dependencies
  • venv_create.bat: virtual environment bootstrap helper
  • venv_activate.bat: activate helper

Setup

  1. Create the virtual environment:
venv_create.bat
  1. Activate:
venv_activate.bat
  1. Run GUI:
py gui.py
  1. Run CLI help:
py inspect_model.py --help

CLI Usage

Inspect one or more files

py inspect_model.py path\to\model1.safetensors path\to\model2.safetensors

Inspect folders

py inspect_model.py path\to\folder
py inspect_model.py path\to\folder --recursive

JSON output

py inspect_model.py path\to\folder --recursive --json

Write .modelinfo files

py inspect_model.py path\to\folder --recursive --write-modelinfo

Dump key/debug report text to console

py inspect_model.py path\to\folder --recursive --dump-keys

Optional alias fallback (filename tokens)

py inspect_model.py path\to\folder --recursive --allow-filename-alias-detection

GUI Walkthrough

Top Area (Input + Controls)

  • Drag and drop files or folders into the drop zone
  • Use Browse... or Browse Folder...
  • Analyze processes queued inputs
  • Settings controls visibility and behavior
  • Minimize / Restore collapses or expands the top area for more workspace
image

Tab: Simple Cards

  • Lightweight model cards
  • Supports card selection, multi-select, and context menu actions
image

Tab: Detailed Cards

  • Full card details with configured metadata visibility
  • Supports card selection, multi-select, and context menu actions
image
  • Supports specific LoRA formats like LoHa, LoKr, GLoRa
  • Some fail sometimes (lycoris)
image

Tab: Data

  • Sortable/resizable table
  • Multi-select cells and copy via Ctrl+C
  • Right-click actions (View Raw, Copy Selected Entries)
  • Column visibility can be configured in settings
image

Tab: Raw

  • Per-model raw .modelinfo text view
  • View Raw context action jumps here for the selected model
  • Ctrl+C copies the selected text, or the full raw content when no selection exists
image

Notes

  • Folder drag/drop and folder browse both support recursive discovery of .safetensors.
  • Filtering in the UI affects visibility and copy behavior (hidden rows are excluded from table copy).
  • .modelinfo output is generated by shared backend logic in inspect_model.py.
  • Filename alias detection is opt-in in Settings and can map filename tokens to fallback labels.
  • Pony7 is treated as distinct from PDXL. The alias tokens pony7, ponyv7, and pony v7 map to Pony7.

Settings (Current)

General

  • Filename Alias Detection: optional filename-token fallback for special labels
  • Auto-minimize top section on Analyze
  • Auto-analyze when files are added
  • File add behavior:
    • Replace current input list
    • Append to current input list
  • Default tab: Simple Cards, Detailed Cards, Data, or Raw

Visibility Groups

  • Simple Cards: choose which data fields are shown
  • Detailed Cards: choose which data fields are shown
  • Data Columns: choose visible columns in the Data tab

About

Inspects .safetensor files and list data for models, checkpoints and adapters like LoRA

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages