You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] LazyTurtle converts .bin/.pt checkpoints into a full temp safetensors copy on every load() and keeps it until interpreter exit #4205
Severity: low–medium (disk leak in long-lived processes: one model-sized copy per load, in the system TMPDIR, not the configured offload path) Version: 7.11.0 @ 9dad249
Summary
utils/structure.py:1289-1292 does tempfile.mkdtemp(prefix="lazyturtle-") and cleans up only via atexit.register(shutil.rmtree, ...). Nothing ties the copy to the lifetime of the model or turtle, and conversions aren't reused for the same source.
Actual: one 250,502,107-byte dir after the first load+del, two (500 MB) after the second. They are removed only at exit.
Expected:
Clean up when the model or turtle is released (weakref finaliser / context).
Reuse the conversion per source path.
Put it under the configured offload path rather than the system TMPDIR.
Found during an AI-assisted review (Claude Code) of 9dad249; repros were run on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Activity
fix: cache and release LazyTurtle .bin conversions (#4205) (#4285)