dflash-console 0.3.276__tar.gz → 0.3.277__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. {dflash_console-0.3.276 → dflash_console-0.3.277}/.gitignore +4 -0
  2. {dflash_console-0.3.276 → dflash_console-0.3.277}/PKG-INFO +3 -3
  3. {dflash_console-0.3.276 → dflash_console-0.3.277}/README.md +2 -2
  4. {dflash_console-0.3.276 → dflash_console-0.3.277}/api/app.py +178 -14
  5. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/bounded_proc.py +12 -6
  6. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/gpu_processes.py +140 -47
  7. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hf_catalog_cache.py +2 -1
  8. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hf_catalog_index.py +27 -9
  9. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hf_local_match.py +51 -1
  10. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/huggingface.py +401 -40
  11. dflash_console-0.3.277/core/model_notes.py +451 -0
  12. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/model_presets.py +14 -10
  13. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtime.py +40 -5
  14. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/server_boot.py +12 -0
  15. dflash_console-0.3.277/core/ui_state.py +235 -0
  16. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/version.py +1 -1
  17. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/vision_setup.py +575 -482
  18. {dflash_console-0.3.276 → dflash_console-0.3.277}/pyproject.toml +1 -1
  19. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/css/dflash-shell.css +576 -115
  20. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/index.html +14 -12
  21. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/download-queue.js +117 -1
  22. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/downloads-live.js +6 -5
  23. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/model-search-live.js +166 -13
  24. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/models-live.js +5037 -4721
  25. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/server-live.js +252 -48
  26. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/status-feed.js +19 -4
  27. dflash_console-0.3.277/static/js/ui-state-sync.js +337 -0
  28. {dflash_console-0.3.276 → dflash_console-0.3.277}/LICENSE +0 -0
  29. {dflash_console-0.3.276 → dflash_console-0.3.277}/NOTICE.md +0 -0
  30. {dflash_console-0.3.276 → dflash_console-0.3.277}/api/__init__.py +0 -0
  31. {dflash_console-0.3.276 → dflash_console-0.3.277}/api/gateway.py +0 -0
  32. {dflash_console-0.3.276 → dflash_console-0.3.277}/assets/dflash_console_logo.png +0 -0
  33. {dflash_console-0.3.276 → dflash_console-0.3.277}/assets/dflash_console_logo_only.png +0 -0
  34. {dflash_console-0.3.276 → dflash_console-0.3.277}/assets/dflash_console_logo_only2.png +0 -0
  35. {dflash_console-0.3.276 → dflash_console-0.3.277}/assets/dflash_console_logo_only_clear.png +0 -0
  36. {dflash_console-0.3.276 → dflash_console-0.3.277}/assets/dflash_txt_logo.png +0 -0
  37. {dflash_console-0.3.276 → dflash_console-0.3.277}/assets/dflash_txt_logo_clear.png +0 -0
  38. {dflash_console-0.3.276 → dflash_console-0.3.277}/config.example.json +0 -0
  39. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/__init__.py +0 -0
  40. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/api_access_log.py +0 -0
  41. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/api_catalog.py +0 -0
  42. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/api_introspection.py +0 -0
  43. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/api_providers.py +0 -0
  44. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/auto_register.py +0 -0
  45. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/catalog_load.py +0 -0
  46. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/chat_proxy.py +0 -0
  47. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/chat_queue.py +0 -0
  48. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/chat_ready.py +0 -0
  49. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/chat_vision.py +0 -0
  50. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/client_identity.py +0 -0
  51. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/components_hub.py +0 -0
  52. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/config.py +0 -0
  53. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/dflash_generation.py +0 -0
  54. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/diagnostics_bundle.py +0 -0
  55. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/display_names.py +0 -0
  56. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/embedding_server.py +0 -0
  57. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/engine_state.py +0 -0
  58. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/freetoken_runtime_install.py +0 -0
  59. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/fs_browse.py +0 -0
  60. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/fs_reveal.py +0 -0
  61. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/gateway_access_log.py +0 -0
  62. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/gateway_routing.py +0 -0
  63. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/gguf_meta.py +0 -0
  64. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/gpu_devices.py +0 -0
  65. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/gpu_policy.py +0 -0
  66. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/gpu_process_memory_windows.py +0 -0
  67. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/gpu_relief.py +0 -0
  68. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hardware_apply.py +0 -0
  69. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hardware_info.py +0 -0
  70. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hf_catalog_draft.py +0 -0
  71. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hf_catalog_recommend.py +0 -0
  72. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hf_engines.py +0 -0
  73. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hf_install.py +0 -0
  74. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/hf_model_fit.py +0 -0
  75. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/inference_stats.py +0 -0
  76. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/library_import.py +0 -0
  77. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/load_activity.py +0 -0
  78. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/load_progress.py +0 -0
  79. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/local_models.py +0 -0
  80. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/log_utils.py +0 -0
  81. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/memory_guardrails.py +0 -0
  82. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/model_discovery.py +0 -0
  83. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/model_paths.py +0 -0
  84. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/model_runtime_policy.py +0 -0
  85. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/model_stack.py +0 -0
  86. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/net_listeners.py +0 -0
  87. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/node_connect.py +0 -0
  88. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/ocr_setup.py +0 -0
  89. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/release_notice.py +0 -0
  90. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/remote_gpu.py +0 -0
  91. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/remote_nodes.py +0 -0
  92. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtime_install_job.py +0 -0
  93. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtime_recommendations.py +0 -0
  94. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/__init__.py +0 -0
  95. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/base.py +0 -0
  96. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/contention.py +0 -0
  97. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/faster_whisper.py +0 -0
  98. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/freetoken.py +0 -0
  99. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/noop.py +0 -0
  100. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/ollama.py +0 -0
  101. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/patch_qwen2_head_dim.py +0 -0
  102. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/piper.py +0 -0
  103. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/qwen_vl_chat_template.jinja +0 -0
  104. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/registry.py +0 -0
  105. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/stt.py +0 -0
  106. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/transformers_hf.py +0 -0
  107. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/vibevoice.py +0 -0
  108. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/runtimes/vllm.py +0 -0
  109. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/setup.py +0 -0
  110. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/stack_match.py +0 -0
  111. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/status_report.py +0 -0
  112. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/support_journal.py +0 -0
  113. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/system_stats.py +0 -0
  114. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/transformers_runtime_install.py +0 -0
  115. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/vllm_runtime_install.py +0 -0
  116. {dflash_console-0.3.276 → dflash_console-0.3.277}/core/win_loop.py +0 -0
  117. {dflash_console-0.3.276 → dflash_console-0.3.277}/dflash_cli/__init__.py +0 -0
  118. {dflash_console-0.3.276 → dflash_console-0.3.277}/dflash_cli/__main__.py +0 -0
  119. {dflash_console-0.3.276 → dflash_console-0.3.277}/dflash_cli/cli.py +0 -0
  120. {dflash_console-0.3.276 → dflash_console-0.3.277}/dflash_cli/commands.py +0 -0
  121. {dflash_console-0.3.276 → dflash_console-0.3.277}/dflash_cli/http.py +0 -0
  122. {dflash_console-0.3.276 → dflash_console-0.3.277}/dflash_cli/render.py +0 -0
  123. {dflash_console-0.3.276 → dflash_console-0.3.277}/dflash_cli/resolve.py +0 -0
  124. {dflash_console-0.3.276 → dflash_console-0.3.277}/dflash_cli/server_takeover.py +0 -0
  125. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/AGENT-PROMPT-CLIENT-IDENTITY.md +0 -0
  126. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/AGENT-PROMPT-DFLASH-TRANSLATION-PERF-AI-TOOLS.md +0 -0
  127. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/AGENT-PROMPT-TRANSLATEGEMMA-AI-TOOLS.md +0 -0
  128. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/API.md +0 -0
  129. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ARCHITECTURE.md +0 -0
  130. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/BUG-REPORTS.md +0 -0
  131. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/CLI.md +0 -0
  132. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/CLIENT-IDENTITY.md +0 -0
  133. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/CURSOR.md +0 -0
  134. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/GOING-PUBLIC.md +0 -0
  135. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/LICENSING.md +0 -0
  136. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/LINUX-CLI.md +0 -0
  137. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/MULTI-MODAL-AGENT-PROMPT.md +0 -0
  138. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/MULTI-MODAL-RUNTIME-PLAN.md +0 -0
  139. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/PRODUCTION.md +0 -0
  140. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/RELEASING.md +0 -0
  141. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/SHARE-A-GPU.md +0 -0
  142. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/STT-ENGINE-DECISION.md +0 -0
  143. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/USER-GUIDE.md +0 -0
  144. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/announcements/public-preview-v0.3.103.md +0 -0
  145. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/announcements/public-preview-v0.3.122.md +0 -0
  146. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/announcements/public-preview.md +0 -0
  147. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/automatic-updates.md +0 -0
  148. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/plans/shared-speak-stt-service.md +0 -0
  149. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.103.md +0 -0
  150. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.106.md +0 -0
  151. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.117.md +0 -0
  152. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.118.md +0 -0
  153. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.119.md +0 -0
  154. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.120.md +0 -0
  155. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.121.md +0 -0
  156. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.122.md +0 -0
  157. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.123.md +0 -0
  158. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.128.md +0 -0
  159. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.129.md +0 -0
  160. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.132.md +0 -0
  161. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.133.md +0 -0
  162. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/release-notes-0.3.208.md +0 -0
  163. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/README.md +0 -0
  164. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/devices-view.md +0 -0
  165. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/model-search.md +0 -0
  166. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/models-view.md +0 -0
  167. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/nodes-v1-plan.md +0 -0
  168. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-appearance.md +0 -0
  169. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-chat.md +0 -0
  170. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-developer.md +0 -0
  171. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-general.md +0 -0
  172. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-hardware.md +0 -0
  173. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-integrations.md +0 -0
  174. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-lm-link.md +0 -0
  175. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-model-defaults.md +0 -0
  176. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-runtime.md +0 -0
  177. {dflash_console-0.3.276 → dflash_console-0.3.277}/docs/ui/settings-runtimes.md +0 -0
  178. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/app-functional.html +0 -0
  179. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/css/dflash-console.css +0 -0
  180. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/css/studio.css +0 -0
  181. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/about-live.js +0 -0
  182. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/app-settings-live.js +0 -0
  183. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/app.js +0 -0
  184. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/bug-report-live.js +0 -0
  185. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/chat-live.js +0 -0
  186. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/component-install-live.js +0 -0
  187. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/console-api.js +0 -0
  188. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/dashboard.js +0 -0
  189. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/desktop-shell.js +0 -0
  190. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/dflash-console-ui.js +0 -0
  191. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/docs-live.js +0 -0
  192. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/library-browse-live.js +0 -0
  193. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/library-scan-live.js +0 -0
  194. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/library-type-options.js +0 -0
  195. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/log-format.js +0 -0
  196. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/model-card.js +0 -0
  197. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/model-catalog-groups.js +0 -0
  198. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/nodes-live.js +0 -0
  199. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/release-notice.js +0 -0
  200. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/runtime-recommendations.js +0 -0
  201. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/runtime-steppers.js +0 -0
  202. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/select-theme.js +0 -0
  203. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/server-reload-watch.js +0 -0
  204. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/settings-live.js +0 -0
  205. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/setup-wizard-live.js +0 -0
  206. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/speak-live.js +0 -0
  207. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/stack-wizard.js +0 -0
  208. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/sysbar-live.js +0 -0
  209. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/table-column-resize.js +0 -0
  210. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/js/ui-layout-prefs.js +0 -0
  211. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/vendor/marked.min.js +0 -0
  212. {dflash_console-0.3.276 → dflash_console-0.3.277}/static/vendor/purify.min.js +0 -0
@@ -15,6 +15,10 @@ htmlcov/
15
15
  config.json
16
16
  config.json.lock
17
17
 
18
+ # Per-install user data (notes, shared UI state such as pins)
19
+ model-notes.json
20
+ ui-state.json
21
+
18
22
  # Local model weights (developer checkout keeps them under ./models)
19
23
  models/*
20
24
  !models/.gitkeep
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: dflash-console
3
- Version: 0.3.276
3
+ Version: 0.3.277
4
4
  Summary: Local control panel and terminal CLI for DFlash stacks and local model runtimes
5
5
  Project-URL: Homepage, https://github.com/ilan4ever/Dflash-Console
6
6
  Project-URL: Repository, https://github.com/ilan4ever/Dflash-Console
@@ -681,7 +681,7 @@ Loading a model on that GPU runs it on the other computer. If the file is not
681
681
  there yet, it is downloaded there first. Short steps:
682
682
  [docs/SHARE-A-GPU.md](./docs/SHARE-A-GPU.md).
683
683
 
684
- **Developer:** ILAN AVIV · **UI:** [http://127.0.0.1:8900/](http://127.0.0.1:8900/) · **Version:** v0.3.276
684
+ **Developer:** ILAN AVIV · **UI:** [http://127.0.0.1:8900/](http://127.0.0.1:8900/) · **Version:** v0.3.277
685
685
 
686
686
  ## Download (Windows)
687
687
 
@@ -776,7 +776,7 @@ Typical first session:
776
776
  3. For a DFlash GGUF, right-click and **Find and attach draft** if you want speculative decoding.
777
777
  4. Chat in the **Playground**, or point any OpenAI client at `http://127.0.0.1:8001/v1` with optional `X-DFlash-Client: YourApp` so **Engines** shows who is using each model.
778
778
 
779
- ### Recent improvements (v0.3.276)
779
+ ### Recent improvements (v0.3.277)
780
780
 
781
781
  - **Engines and library** — live token counts follow the name the engine actually loaded, prompt reading is labeled separately from generation speed, a full model name stays on that model, and the phone and desktop sidebars remember their own menu state
782
782
  - **Startup** — the desktop app keeps its own Python environment, so an upgrade no longer stops when the computer’s Python is missing the server
@@ -15,7 +15,7 @@ Loading a model on that GPU runs it on the other computer. If the file is not
15
15
  there yet, it is downloaded there first. Short steps:
16
16
  [docs/SHARE-A-GPU.md](./docs/SHARE-A-GPU.md).
17
17
 
18
- **Developer:** ILAN AVIV · **UI:** [http://127.0.0.1:8900/](http://127.0.0.1:8900/) · **Version:** v0.3.276
18
+ **Developer:** ILAN AVIV · **UI:** [http://127.0.0.1:8900/](http://127.0.0.1:8900/) · **Version:** v0.3.277
19
19
 
20
20
  ## Download (Windows)
21
21
 
@@ -110,7 +110,7 @@ Typical first session:
110
110
  3. For a DFlash GGUF, right-click and **Find and attach draft** if you want speculative decoding.
111
111
  4. Chat in the **Playground**, or point any OpenAI client at `http://127.0.0.1:8001/v1` with optional `X-DFlash-Client: YourApp` so **Engines** shows who is using each model.
112
112
 
113
- ### Recent improvements (v0.3.276)
113
+ ### Recent improvements (v0.3.277)
114
114
 
115
115
  - **Engines and library** — live token counts follow the name the engine actually loaded, prompt reading is labeled separately from generation speed, a full model name stays on that model, and the phone and desktop sidebars remember their own menu state
116
116
  - **Startup** — the desktop app keeps its own Python environment, so an upgrade no longer stops when the computer’s Python is missing the server
@@ -774,6 +774,10 @@ class HfDownloadRequest(BaseModel):
774
774
  repo_id: str = Field(..., min_length=3)
775
775
  filename: str = Field(..., min_length=4)
776
776
  library_id: str | None = None
777
+ # Multi-file catalog groups (sharded GGUF) start one job per shard.
778
+ files: list[str] | None = None
779
+ # Diffusers / sharded SafeTensors models need the whole repository.
780
+ whole_repo: bool = False
777
781
 
778
782
 
779
783
  class HfInstallRequest(BaseModel):
@@ -819,6 +823,36 @@ class LibraryImportRequest(BaseModel):
819
823
  overwrite: bool = Field(default=False)
820
824
 
821
825
 
826
+ class ModelNoteRequest(BaseModel):
827
+ """Personal note (text/Markdown) for one catalog model."""
828
+
829
+ key: str = Field(..., min_length=1, max_length=400)
830
+ text: str = Field(default='')
831
+ label: str = Field(default='', max_length=200)
832
+
833
+
834
+ class UiPinsRequest(BaseModel):
835
+ """Shared pin list for one scope (models library / engines page)."""
836
+
837
+ scope: str = Field(..., min_length=1, max_length=20)
838
+ keys: list[str] = Field(default_factory=list)
839
+ client: str = Field(default='', max_length=80)
840
+
841
+
842
+ class UiPinToggleRequest(BaseModel):
843
+ scope: str = Field(..., min_length=1, max_length=20)
844
+ key: str = Field(..., min_length=1, max_length=400)
845
+ client: str = Field(default='', max_length=80)
846
+
847
+
848
+ class UiPrefRequest(BaseModel):
849
+ """One shared setting (JSON value); ``value: null`` removes it."""
850
+
851
+ name: str = Field(..., min_length=1, max_length=60)
852
+ value: Any = Field(default=None)
853
+ client: str = Field(default='', max_length=80)
854
+
855
+
822
856
  class PresetsImportBody(BaseModel):
823
857
  files: dict[str, str] = Field(default_factory=dict)
824
858
 
@@ -1856,14 +1890,9 @@ def hf_model_detail(
1856
1890
  repo_id: str,
1857
1891
  category: str = Query('all-gguf'),
1858
1892
  ) -> dict[str, Any]:
1859
- from core.hf_catalog_cache import get_or_fetch_detail
1860
- from core.huggingface import get_model_detail
1893
+ from core.huggingface import _cached_model_detail
1861
1894
 
1862
- result = get_or_fetch_detail(
1863
- repo_id=repo_id,
1864
- category=category,
1865
- fetcher=lambda: get_model_detail(repo_id, category=category),
1866
- )
1895
+ result = _cached_model_detail(repo_id, category=category)
1867
1896
  if not result.get('success'):
1868
1897
  raise HTTPException(status_code=404, detail=result.get('error') or 'not found')
1869
1898
  return result
@@ -1905,9 +1934,56 @@ def hf_local_installs(repo_id: str = Query(..., min_length=3)) -> dict[str, Any]
1905
1934
 
1906
1935
  @app.post('/api/hf/download')
1907
1936
  def hf_download(body: HfDownloadRequest) -> dict[str, Any]:
1908
- from core.huggingface import start_download
1937
+ from core.huggingface import start_download, start_repo_download
1938
+
1939
+ repo = str(body.repo_id or '').strip()
1940
+ filename = str(body.filename or '').strip()
1941
+ requested = [str(name or '').strip() for name in (body.files or []) if str(name or '').strip()]
1942
+ if filename and filename not in requested:
1943
+ requested.insert(0, filename)
1944
+ config = load_config()
1945
+
1946
+ # Diffusers / sharded SafeTensors checkpoints only work together with the
1947
+ # rest of the repository (index, config, VAE, text encoder). The catalog
1948
+ # row points at one shard, so fetch the whole repo instead of that file.
1949
+ sharded_weights = bool(
1950
+ re.search(r'-\d{5}-of-\d{5}\.(?:safetensors|bin)$', filename, re.IGNORECASE)
1951
+ )
1952
+ if body.whole_repo or sharded_weights:
1953
+ result = start_repo_download(repo, library_id=body.library_id, cfg=config)
1954
+ if not result.get('success'):
1955
+ if result.get('already_installed'):
1956
+ raise HTTPException(status_code=409, detail=result)
1957
+ raise HTTPException(status_code=400, detail=result.get('error') or 'download failed')
1958
+ return result
1959
+
1960
+ # Sharded GGUF groups: the catalog shows them as one "N files" download.
1961
+ # Start one job per shard so the model is complete on disk.
1962
+ if len(requested) > 1 and all(name.lower().endswith('.gguf') for name in requested):
1963
+ jobs: list[dict[str, Any]] = []
1964
+ errors: list[dict[str, Any]] = []
1965
+ for name in requested:
1966
+ row = start_download(repo, name, library_id=body.library_id, cfg=config)
1967
+ if row.get('success'):
1968
+ jobs.append({'filename': name, 'job_id': row.get('job_id'), 'path': row.get('path')})
1969
+ elif row.get('already_installed'):
1970
+ jobs.append({'filename': name, 'already_installed': True, 'path': row.get('path')})
1971
+ else:
1972
+ errors.append({'filename': name, 'error': row.get('error') or 'download failed'})
1973
+ if not jobs:
1974
+ detail = errors[0]['error'] if errors else 'download failed'
1975
+ raise HTTPException(status_code=400, detail=detail)
1976
+ primary = next((row for row in jobs if row.get('job_id')), jobs[0])
1977
+ return {
1978
+ 'success': True,
1979
+ 'job_id': primary.get('job_id', ''),
1980
+ 'path': primary.get('path', ''),
1981
+ 'jobs': jobs,
1982
+ 'errors': errors,
1983
+ 'library_id': body.library_id or '',
1984
+ }
1909
1985
 
1910
- result = start_download(body.repo_id, body.filename, library_id=body.library_id, cfg=load_config())
1986
+ result = start_download(repo, filename, library_id=body.library_id, cfg=config)
1911
1987
  if not result.get('success'):
1912
1988
  if result.get('already_installed'):
1913
1989
  raise HTTPException(status_code=409, detail=result)
@@ -2100,9 +2176,76 @@ def models_catalog(
2100
2176
  models.append(row)
2101
2177
  payload['models'] = models
2102
2178
  payload['total_count'] = len(models)
2179
+ from core.model_notes import attach_notes
2180
+
2181
+ attach_notes(models)
2103
2182
  return payload
2104
2183
 
2105
2184
 
2185
+ @app.get('/api/model-notes')
2186
+ def model_notes_list() -> dict[str, Any]:
2187
+ """Every personal model note, keyed by stable model identity."""
2188
+ from core.model_notes import load_notes
2189
+
2190
+ notes = load_notes()
2191
+ return {'success': True, 'notes': notes, 'count': len(notes)}
2192
+
2193
+
2194
+ @app.put('/api/model-notes')
2195
+ def model_note_save(body: ModelNoteRequest) -> dict[str, Any]:
2196
+ from core.model_notes import set_note
2197
+
2198
+ result = set_note(body.key, body.text, label=body.label)
2199
+ if not result.get('success'):
2200
+ raise HTTPException(status_code=400, detail=result.get('error') or 'could not save note')
2201
+ return result
2202
+
2203
+
2204
+ @app.delete('/api/model-notes')
2205
+ def model_note_delete(key: str = Query(..., min_length=1, max_length=400)) -> dict[str, Any]:
2206
+ from core.model_notes import delete_note
2207
+
2208
+ return delete_note(key)
2209
+
2210
+
2211
+ @app.get('/api/ui-state')
2212
+ def ui_state_get() -> dict[str, Any]:
2213
+ """Shared UI state (pins) so the Electron window and a browser agree."""
2214
+ from core.ui_state import get_state
2215
+
2216
+ return {'success': True, **get_state()}
2217
+
2218
+
2219
+ @app.put('/api/ui-state/pins')
2220
+ def ui_state_set_pins(body: UiPinsRequest) -> dict[str, Any]:
2221
+ from core.ui_state import set_pins
2222
+
2223
+ result = set_pins(body.scope, body.keys, client=body.client)
2224
+ if not result.get('success'):
2225
+ raise HTTPException(status_code=400, detail=result.get('error') or 'could not save pins')
2226
+ return result
2227
+
2228
+
2229
+ @app.post('/api/ui-state/pins/toggle')
2230
+ def ui_state_toggle_pin(body: UiPinToggleRequest) -> dict[str, Any]:
2231
+ from core.ui_state import toggle_pin
2232
+
2233
+ result = toggle_pin(body.scope, body.key, client=body.client)
2234
+ if not result.get('success'):
2235
+ raise HTTPException(status_code=400, detail=result.get('error') or 'could not toggle pin')
2236
+ return result
2237
+
2238
+
2239
+ @app.put('/api/ui-state/prefs')
2240
+ def ui_state_set_pref(body: UiPrefRequest) -> dict[str, Any]:
2241
+ from core.ui_state import set_pref
2242
+
2243
+ result = set_pref(body.name, body.value, client=body.client)
2244
+ if not result.get('success'):
2245
+ raise HTTPException(status_code=400, detail=result.get('error') or 'could not save setting')
2246
+ return result
2247
+
2248
+
2106
2249
  @app.post('/api/models/load')
2107
2250
  def model_load(body: ModelLoadRequest, request: Request) -> dict[str, Any]:
2108
2251
  """Unified loader — load ANY catalog model by path.
@@ -2526,13 +2669,34 @@ def _attach_external_scan() -> None:
2526
2669
 
2527
2670
  started = time.time()
2528
2671
  if not console_pipeline_active(cfg):
2529
- payload['external_gpu_loads'] = []
2530
- payload['gpu_other_usage'] = {'processes': [], 'total_other_vram_gb': 0.0}
2531
- payload['gpu_models_scan'] = 'skipped'
2532
- payload['gpu_other_scan'] = 'skipped'
2533
- payload['external_scan_skipped'] = True
2672
+ # Standby still shows GPU truth: external model cards plus app
2673
+ # processes, both throttled inside their scanners.
2674
+ try:
2675
+ payload['external_gpu_loads'] = get_external_gpu_loads(
2676
+ servers=enabled,
2677
+ gpus=gpus,
2678
+ cfg=cfg,
2679
+ fast=True,
2680
+ )
2681
+ except Exception as exc:
2682
+ payload['external_scan_error'] = str(exc)[:240]
2683
+ payload['external_gpu_loads'] = payload.get('external_gpu_loads') or []
2684
+ payload['gpu_models_scan'] = 'done'
2685
+ payload['gpu_other_scan'] = 'done'
2686
+ payload['external_scan_skipped'] = False
2534
2687
  payload['quick'] = False
2535
2688
  payload['updated_at'] = time.time()
2689
+ try:
2690
+ _attach_gpu_other_usage(payload, servers=enabled, gpus=gpus)
2691
+ except Exception:
2692
+ payload['gpu_other_usage'] = payload.get('gpu_other_usage') or {
2693
+ 'processes': [],
2694
+ 'total_other_vram_gb': 0.0,
2695
+ }
2696
+ payload['status_build_ms'] = max(
2697
+ int(payload.get('status_build_ms') or 0),
2698
+ int((time.time() - started) * 1000),
2699
+ )
2536
2700
  payload = _merge_adapter_engine_rows(payload)
2537
2701
  payload['boot_id'] = _BOOT_ID
2538
2702
  _store_status_payload(payload, include_external=True)
@@ -96,25 +96,31 @@ def run_bounded(argv: list[str], *, timeout: float = 3.0) -> tuple[int | None, s
96
96
  def run_nvidia_smi(args: list[str], *, timeout: float = 3.0) -> str:
97
97
  """One shared NVIDIA query for every screen that shows the GPU.
98
98
 
99
- A stuck query starts a short cooldown. Later callers get the last good
100
- answer instead of starting another check that would freeze too.
99
+ Concurrent callers wait for the in-flight query instead of returning an
100
+ empty answer (an empty GPU process list renders the Engines page blank).
101
+ A failed query falls back to the last good answer.
101
102
  """
102
103
  global _NVIDIA_COOLDOWN_UNTIL
103
104
  key = tuple(args)
104
105
  now = time.time()
105
106
  if now < _NVIDIA_COOLDOWN_UNTIL:
106
- return _NVIDIA_LAST_OK.get(key, '')
107
- if not _NVIDIA_LOCK.acquire(blocking=False):
107
+ cached = _NVIDIA_LAST_OK.get(key, '')
108
+ if cached:
109
+ return cached
110
+ acquired = _NVIDIA_LOCK.acquire(timeout=2.0)
111
+ if not acquired:
108
112
  return _NVIDIA_LAST_OK.get(key, '')
109
113
  try:
110
114
  if time.time() < _NVIDIA_COOLDOWN_UNTIL:
111
- return _NVIDIA_LAST_OK.get(key, '')
115
+ cached = _NVIDIA_LAST_OK.get(key, '')
116
+ if cached:
117
+ return cached
112
118
  code, text = run_bounded(['nvidia-smi', *args], timeout=timeout)
113
119
  if code is None:
114
120
  _NVIDIA_COOLDOWN_UNTIL = time.time() + 20.0
115
121
  return _NVIDIA_LAST_OK.get(key, '')
116
122
  if code != 0 or not text:
117
- return ''
123
+ return _NVIDIA_LAST_OK.get(key, '')
118
124
  _NVIDIA_LAST_OK[key] = text
119
125
  return text
120
126
  finally:
@@ -367,6 +367,20 @@ def _windows_parent_pid_map() -> dict[int, int]:
367
367
  def _load_windows_parent_pid_map() -> dict[int, int]:
368
368
  if sys.platform != 'win32':
369
369
  return {}
370
+ # Reuse the shared Win32_Process snapshot when it is available: it already
371
+ # carries every ParentProcessId, so no second WMI/PowerShell call is needed.
372
+ table = _process_table_powershell()
373
+ mapping: dict[int, int] = {}
374
+ if table:
375
+ for pid, row in table.items():
376
+ try:
377
+ mapping[int(pid)] = int(row.get('parent_pid') or 0)
378
+ except (TypeError, ValueError):
379
+ continue
380
+ _PARENT_MAP_CACHE['at'] = time.time()
381
+ _PARENT_MAP_CACHE['map'] = dict(mapping)
382
+ return mapping
383
+
370
384
  script = (
371
385
  "Get-CimInstance Win32_Process | "
372
386
  "Select-Object ProcessId, ParentProcessId | ConvertTo-Json -Compress"
@@ -381,7 +395,6 @@ def _load_windows_parent_pid_map() -> dict[int, int]:
381
395
  except json.JSONDecodeError:
382
396
  return {}
383
397
  rows = payload if isinstance(payload, list) else [payload]
384
- mapping: dict[int, int] = {}
385
398
  for row in rows:
386
399
  if not isinstance(row, dict):
387
400
  continue
@@ -667,10 +680,17 @@ def _external_card_detail(
667
680
 
668
681
 
669
682
  def _query_compute_apps() -> list[dict[str, Any]]:
670
- text = _run_nvidia_smi([
683
+ args = [
671
684
  '--query-compute-apps=gpu_uuid,pid,process_name,used_gpu_memory',
672
685
  '--format=csv,noheader,nounits',
673
- ])
686
+ ]
687
+ text = _run_nvidia_smi(args)
688
+ if not text:
689
+ # A concurrent/cooldown miss must not look like "no GPU processes".
690
+ from core.bounded_proc import run_bounded
691
+
692
+ _code, retry = run_bounded(['nvidia-smi', *args], timeout=8)
693
+ text = retry or ''
674
694
  if not text:
675
695
  return []
676
696
 
@@ -703,20 +723,14 @@ def _pid_listening_on_port(port: int, host: str = '127.0.0.1') -> int | None:
703
723
 
704
724
 
705
725
  def _managed_listener_pids(servers: list[dict[str, Any]]) -> set[int]:
706
- pids: set[int] = set()
707
- for server in servers:
708
- if not isinstance(server, dict):
709
- continue
710
- port = int(server.get('port') or 0)
711
- if port <= 0:
712
- continue
713
- host = str(server.get('host') or '127.0.0.1')
714
- if not tcp_port_open(host, port):
715
- continue
716
- pid = _pid_listening_on_port(port, host)
717
- if pid:
718
- pids.add(pid)
719
- return pids
726
+ """PIDs listening on configured engine ports (one TCP probe pass + netstat)."""
727
+ from core.net_listeners import _netstat_listen_pids, configured_listening_ports
728
+
729
+ open_ports = configured_listening_ports(servers)
730
+ if not open_ports:
731
+ return set()
732
+ port_pids = _netstat_listen_pids()
733
+ return {int(port_pids[port]) for port in open_ports if port in port_pids}
720
734
 
721
735
 
722
736
  def _listening_ports_map() -> dict[int, list[int]]:
@@ -807,25 +821,60 @@ def _fetch_process_details(pids: list[int]) -> dict[int, dict[str, Any]]:
807
821
 
808
822
 
809
823
  def _fetch_process_details_powershell(pids: list[int]) -> dict[int, dict[str, Any]]:
810
- if not pids or sys.platform != 'win32':
824
+ """Process details from one shared Win32_Process table snapshot.
825
+
826
+ The runtime bundle does not ship psutil, so this fallback is the normal
827
+ path on Windows. It used to run ``Get-CimInstance Win32_Process`` once per
828
+ requested PID set (~2s each, dozens per GPU scan); one snapshot answers
829
+ every lookup in the same scan.
830
+ """
831
+ wanted = {int(pid) for pid in pids if int(pid) > 0}
832
+ if not wanted:
833
+ return {}
834
+ table = _process_table_powershell()
835
+ return {pid: dict(table[pid]) for pid in wanted if pid in table}
836
+
837
+
838
+ def _process_table_powershell() -> dict[int, dict[str, Any]]:
839
+ if sys.platform != 'win32':
840
+ return {}
841
+ now = time.time()
842
+ cached = _PROCESS_TABLE_CACHE.get('rows')
843
+ if (
844
+ isinstance(cached, dict)
845
+ and cached
846
+ and (now - float(_PROCESS_TABLE_CACHE.get('at') or 0.0)) < _PROCESS_TABLE_TTL_SECONDS
847
+ ):
848
+ return cached
849
+ with _PROCESS_TABLE_LOCK:
850
+ cached = _PROCESS_TABLE_CACHE.get('rows')
851
+ if (
852
+ isinstance(cached, dict)
853
+ and cached
854
+ and (time.time() - float(_PROCESS_TABLE_CACHE.get('at') or 0.0)) < _PROCESS_TABLE_TTL_SECONDS
855
+ ):
856
+ return cached
857
+ rows = _query_process_table_powershell()
858
+ if rows:
859
+ _PROCESS_TABLE_CACHE['rows'] = rows
860
+ _PROCESS_TABLE_CACHE['at'] = time.time()
861
+ return rows
862
+ return cached if isinstance(cached, dict) else {}
863
+
864
+
865
+ def _query_process_table_powershell() -> dict[int, dict[str, Any]]:
866
+ if sys.platform != 'win32':
811
867
  return {}
812
- pid_list = ','.join(str(int(pid)) for pid in sorted(set(pids)))
813
868
  script = (
814
- f"$ids = @({pid_list});"
815
- "$rows = Get-CimInstance Win32_Process | Where-Object { $ids -contains $_.ProcessId } | "
816
- "Select-Object ProcessId, Name, CommandLine, ExecutablePath, ParentProcessId;"
817
- "$parents = @{};"
818
- "foreach ($row in $rows) { if ($row.ParentProcessId) { $parents[$row.ParentProcessId] = $true } };"
819
- "$parentRows = Get-CimInstance Win32_Process | Where-Object { $parents.ContainsKey($_.ProcessId) } | "
820
- "Select-Object ProcessId, Name;"
821
- "$payload = @{ processes = @($rows); parents = @($parentRows) };"
822
- "$payload | ConvertTo-Json -Depth 4 -Compress"
869
+ "Get-CimInstance Win32_Process | "
870
+ "Select-Object ProcessId, ParentProcessId, Name, CommandLine, ExecutablePath | "
871
+ "ConvertTo-Json -Depth 3 -Compress"
823
872
  )
824
873
  from core.bounded_proc import powershell_argv, run_bounded
825
874
 
826
875
  code, text = run_bounded(
827
876
  powershell_argv(script),
828
- timeout=3,
877
+ timeout=12,
829
878
  )
830
879
  if code != 0 or not text:
831
880
  return {}
@@ -834,20 +883,14 @@ def _fetch_process_details_powershell(pids: list[int]) -> dict[int, dict[str, An
834
883
  payload = json.loads(text)
835
884
  except json.JSONDecodeError:
836
885
  return {}
837
- if not isinstance(payload, dict):
886
+ if isinstance(payload, dict):
887
+ payload = [payload]
888
+ if not isinstance(payload, list):
838
889
  return {}
839
890
 
840
- parent_names: dict[int, str] = {}
841
- for entry in payload.get('parents') or []:
842
- if not isinstance(entry, dict):
843
- continue
844
- try:
845
- parent_names[int(entry.get('ProcessId') or 0)] = str(entry.get('Name') or '')
846
- except (TypeError, ValueError):
847
- continue
848
-
849
- details: dict[int, dict[str, Any]] = {}
850
- for entry in payload.get('processes') or []:
891
+ entries: list[tuple[int, int, str, str, str]] = []
892
+ names: dict[int, str] = {}
893
+ for entry in payload:
851
894
  if not isinstance(entry, dict):
852
895
  continue
853
896
  try:
@@ -860,11 +903,23 @@ def _fetch_process_details_powershell(pids: list[int]) -> dict[int, dict[str, An
860
903
  parent_pid = int(entry.get('ParentProcessId') or 0)
861
904
  except (TypeError, ValueError):
862
905
  parent_pid = 0
906
+ name = str(entry.get('Name') or '')
907
+ names[pid] = name
908
+ entries.append((
909
+ pid,
910
+ parent_pid,
911
+ name,
912
+ str(entry.get('CommandLine') or ''),
913
+ str(entry.get('ExecutablePath') or ''),
914
+ ))
915
+
916
+ details: dict[int, dict[str, Any]] = {}
917
+ for pid, parent_pid, name, command_line, executable_path in entries:
863
918
  details[pid] = {
864
- 'process_name': str(entry.get('Name') or ''),
865
- 'command_line': str(entry.get('CommandLine') or ''),
866
- 'executable_path': str(entry.get('ExecutablePath') or ''),
867
- 'parent_process_name': parent_names.get(parent_pid, ''),
919
+ 'process_name': name,
920
+ 'command_line': command_line,
921
+ 'executable_path': executable_path,
922
+ 'parent_process_name': names.get(parent_pid, ''),
868
923
  'parent_pid': parent_pid or None,
869
924
  }
870
925
  return details
@@ -2195,6 +2250,12 @@ def _cards_from_known_apps(
2195
2250
  _API_KEY_RE = re.compile(r'--api-key[=\s]+(\S+)', re.I)
2196
2251
  _API_KEY_CACHE: dict[int, tuple[float, str]] = {}
2197
2252
  _PROCESS_DETAILS_CACHE: dict[str, Any] = {'at': 0.0, 'map': {}}
2253
+ # Full Win32_Process table (one PowerShell call) shared by every per-PID
2254
+ # lookup inside a GPU scan. Without psutil the old code launched PowerShell
2255
+ # per PID set, which took over a minute per scan.
2256
+ _PROCESS_TABLE_CACHE: dict[str, Any] = {'at': 0.0, 'rows': {}}
2257
+ _PROCESS_TABLE_LOCK = threading.Lock()
2258
+ _PROCESS_TABLE_TTL_SECONDS = 3.0
2198
2259
  _LISTEN_PORTS_CACHE: tuple[float, dict[int, list[int]]] = (0.0, {})
2199
2260
  _PROCESS_DETAILS_TTL_SECONDS = 30.0
2200
2261
  _LISTEN_PORTS_TTL_SECONDS = 3.0
@@ -2203,6 +2264,9 @@ _GPU_LIVE_CACHE: tuple[float, dict[int, dict[str, Any]]] = (0.0, {})
2203
2264
  _GPU_LIVE_TTL_SECONDS = 1.5
2204
2265
  _EXTERNAL_SCAN_CACHE: dict[str, Any] = {'at': 0.0, 'cards': []}
2205
2266
  _EXTERNAL_SCAN_MIN_INTERVAL = 2.5
2267
+ # Engines idle: the page must still show what owns the GPU, but the scan is
2268
+ # expensive (nvidia-smi + process details), so run it on a slow cadence.
2269
+ _EXTERNAL_SCAN_STANDBY_INTERVAL = 15.0
2206
2270
 
2207
2271
 
2208
2272
  def _api_key_from_cmdline(command_line: str) -> str:
@@ -2795,6 +2859,27 @@ def _apply_external_loading_ttl(
2795
2859
  return out
2796
2860
 
2797
2861
 
2862
+ def _pipeline_listener_up(cfg: dict[str, Any]) -> bool:
2863
+ """True when an enabled engine profile is actually listening.
2864
+
2865
+ ``engine_on`` can lag behind a listener the boot/adopt path restored, and
2866
+ a stale flag must not hide every external model card.
2867
+ """
2868
+ try:
2869
+ servers = [
2870
+ row for row in (cfg.get('servers') or [])
2871
+ if isinstance(row, dict) and row.get('enabled', True)
2872
+ ]
2873
+ except AttributeError:
2874
+ return False
2875
+ if not servers:
2876
+ return False
2877
+ from core.net_listeners import configured_listening_ports
2878
+
2879
+ open_ports = configured_listening_ports(servers)
2880
+ return any(int(row.get('port') or 0) in open_ports for row in servers)
2881
+
2882
+
2798
2883
  def get_external_gpu_loads(
2799
2884
  *,
2800
2885
  servers: list[dict[str, Any]] | None = None,
@@ -2819,8 +2904,16 @@ def get_external_gpu_loads(
2819
2904
  resolved_cfg = cfg if cfg is not None else _load_config()
2820
2905
  except Exception:
2821
2906
  resolved_cfg = cfg or {}
2822
- if not console_pipeline_active(resolved_cfg):
2823
- return []
2907
+ if not console_pipeline_active(resolved_cfg) and not _pipeline_listener_up(resolved_cfg):
2908
+ # Standby: serve (and slowly refresh) the last scan instead of hiding
2909
+ # every external card while an app still sits on the GPU.
2910
+ cached = _EXTERNAL_SCAN_CACHE.get('cards')
2911
+ cached_at = float(_EXTERNAL_SCAN_CACHE.get('at') or 0.0)
2912
+ if (time.time() - cached_at) < _EXTERNAL_SCAN_STANDBY_INTERVAL:
2913
+ return _enrich_external_cards(
2914
+ [dict(row) for row in cached if isinstance(row, dict)],
2915
+ attach_stats=False,
2916
+ )
2824
2917
 
2825
2918
  now = time.time()
2826
2919
  cached_cards = _EXTERNAL_SCAN_CACHE.get('cards')
@@ -13,7 +13,8 @@ from core.config import ROOT
13
13
 
14
14
  logger = logging.getLogger(__name__)
15
15
 
16
- _CACHE_VERSION = 9
16
+ # v10: repo sizes are measured from the current revision (not Hub usedStorage).
17
+ _CACHE_VERSION = 10
17
18
  _MIN_CACHED_MODELS = {
18
19
  'supported': 8,
19
20
  'dflash': 8,