File size: 1,052 Bytes
9ed2e4d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Microscope tooling

Small utilities to inspect this repository’s Diffusers checkpoint without leaving the repo.

## Setup

From the repo root:

```bash
cd microscope
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt
```

## Usage

Inspect the local model (default: one directory up from this folder) without importing PyTorch/Diffusers:

```bash
python inspect_model.py --model-dir .. --config-only
```

Include parameter counts by scanning `*.safetensors` headers (still does not load weights into RAM):

```bash
python inspect_model.py --model-dir .. --config-only --params
```

Write a machine-readable summary:

```bash
python inspect_model.py --model-dir .. --config-only --params --json-out model_summary.json
```

Flags:

- `--model-dir`: path to the Diffusers pipeline (default: `..`).
- `--config-only`: read JSON configs and print a summary (recommended).
- `--params`: count parameters from `*.safetensors` metadata (no tensor loading).
- `--json-out`: write a JSON summary to this path.