Skip to content

fix: unblock Slicer inference (restore current_free_vram + file_system tensor sharing) - #35

Merged
vboussot merged 2 commits into
mainfrom
fix/restore-current-free-vram
Jul 8, 2026
Merged

fix: unblock Slicer inference (restore current_free_vram + file_system tensor sharing)#35
vboussot merged 2 commits into
mainfrom
fix/restore-current-free-vram

Conversation

@vboussot

@vboussot vboussot commented Jul 6, 2026

Copy link
Copy Markdown
Member

PR #33's params cleanup removed current_free_vram alongside the genuinely-unused resolve_vram_plan_for_devices — but SlicerKonfAI imports current_free_vram to feed resolve_vram_plan for the advanced-dialog patch/batch preview, so on_advanced_clicked raised ImportError at runtime.

Restores the helper (unchanged signature current_free_vram(devices, remote_server=None) -> float | None). resolve_vram_plan_for_devices stays removed — nothing calls it. My earlier dead-code grep only covered the KonfAI repo, missing the external SlicerKonfAI dependency.

vboussot added 2 commits July 7, 2026 00:15
The params-primitive cleanup dropped current_free_vram along with the genuinely unused resolve_vram_plan_for_devices, but SlicerKonfAI imports current_free_vram to feed resolve_vram_plan for the advanced-dialog patch/batch preview (ImportError at runtime). Restore the helper; resolve_vram_plan_for_devices stays removed (no caller).
mp.spawn pickles the configured object (a loaded model); with the default file_descriptor strategy each CPU tensor takes one fd, exhausting the process open-file limit ('Too many open files') under Slicer's embedded Python. Switch to the file_system sharing strategy before spawn.
@vboussot vboussot changed the title fix(apps): restore current_free_vram used by SlicerKonfAI fix: unblock Slicer inference (restore current_free_vram + file_system tensor sharing) Jul 6, 2026
@vboussot
vboussot merged commit 83ffe25 into main Jul 8, 2026
29 checks passed
@vboussot
vboussot deleted the fix/restore-current-free-vram branch July 8, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant