h3-blackwell-runtime/tools/inspect_comfy_db.py
2026-08-12 14:12:42 +07:00

13 lines
427 B
Python

"""List persisted ComfyUI SQLite tables and recent rows for capture recovery."""
import sqlite3
connection = sqlite3.connect("/workspace/ComfyUI/user/comfyui-v031.db")
tables = connection.execute(
"SELECT name FROM sqlite_master WHERE type = 'table' ORDER BY name"
).fetchall()
print(tables)
for (table,) in tables:
count = connection.execute(f'SELECT COUNT(*) FROM "{table}"').fetchone()[0]
print(table, count)