• 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
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
build-oci.sh Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...
video_editor.config.json Loading commit data...