• Stefy Lanza (nextime / spora )'s avatar
    downloads: dedup re-downloads + kill orphaned workers; single-line load progress · 28a2eecb
    Stefy Lanza (nextime / spora ) authored
    Re-downloading a model that was already in progress spawned a second
    download_worker. Both contend for huggingface_hub's per-blob file lock —
    the first downloads, the second blocks on the lock and reports 0% forever
    ("Downloading full repository…"). Two causes, both fixed:
    
    - Same-process re-download click: api_download_model now dedups via
      _active_download_session(model_id, file_pattern) and attaches the client
      to the live session instead of spawning a rival worker.
    - Restart case: workers were plain Popen children with no parent-death
      signal, so a server/engine restart orphaned them (still holding the lock)
      while the new instance lost its in-memory dedup state. Workers now spawn
      with PR_SET_PDEATHSIG=SIGKILL so they die with the server; the re-download
      then resumes cleanly from the .incomplete blob.
    
    Also render engine "Loading weights" tqdm progress as a single updating
    line on a TTY (in-place \r) and throttle to whole-percent changes when
    piped, instead of one line per update.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    28a2eecb
Name
Last commit
Last update
..
__init__.py Loading commit data...
app.py Loading commit data...
assignment.py Loading commit data...
engine_supervisor.py Loading commit data...
gpu_detect.py Loading commit data...
registry.py Loading commit data...
router.py Loading commit data...