mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 14:14:54 +08:00
add embedded python to system state
This commit is contained in:
parent
75ecb31f8c
commit
38fefde06d
@ -1,6 +1,6 @@
|
||||
# generated by datamodel-codegen:
|
||||
# filename: openapi.yaml
|
||||
# timestamp: 2025-06-17T22:03:51+00:00
|
||||
# timestamp: 2025-06-21T23:28:48+00:00
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@ -419,6 +419,10 @@ class ComfyUISystemState(BaseModel):
|
||||
pip_packages: Optional[Dict[str, str]] = Field(
|
||||
None, description="Map of installed pip packages to their versions"
|
||||
)
|
||||
embedded_python: Optional[bool] = Field(
|
||||
None,
|
||||
description="Whether ComfyUI is running from an embedded Python distribution",
|
||||
)
|
||||
|
||||
|
||||
class BatchExecutionRecord(BaseModel):
|
||||
|
||||
@ -565,6 +565,8 @@ class TaskQueue:
|
||||
custom_nodes_count=self._get_custom_nodes_count(),
|
||||
failed_imports=self._get_failed_imports(),
|
||||
pip_packages=self._get_pip_packages(),
|
||||
manager_config=core.get_config(),
|
||||
embedded_python=os.path.split(os.path.split(sys.executable)[0])[1] == "python_embeded",
|
||||
)
|
||||
|
||||
def _get_comfyui_version_info(self) -> ComfyUIVersionInfo:
|
||||
@ -693,6 +695,10 @@ class TaskQueue:
|
||||
cli_args["preview_method"] = str(args.preview_method)
|
||||
if hasattr(args, "enable_manager_legacy_ui"):
|
||||
cli_args["enable_manager_legacy_ui"] = args.enable_manager_legacy_ui
|
||||
if hasattr(args, "front_end_version"):
|
||||
cli_args["front_end_version"] = args.front_end_version
|
||||
if hasattr(args, "front_end_root"):
|
||||
cli_args["front_end_root"] = args.front_end_root
|
||||
return cli_args
|
||||
except Exception:
|
||||
return {}
|
||||
@ -1051,7 +1057,7 @@ async def task_worker():
|
||||
return f"Model installation error: {model_url}"
|
||||
|
||||
while True:
|
||||
timeout = 4096
|
||||
timeout = 4.0
|
||||
task = task_queue.get(timeout)
|
||||
if task is None:
|
||||
is_empty_queue = (
|
||||
@ -1066,7 +1072,7 @@ async def task_worker():
|
||||
"[ComfyUI-Manager] Finalizing batch history with %d completed tasks",
|
||||
task_queue.done_count(),
|
||||
)
|
||||
await task_queue.finalize()
|
||||
task_queue.finalize()
|
||||
logging.debug("[ComfyUI-Manager] Batch finalization complete")
|
||||
|
||||
logging.info("\nAfter restarting ComfyUI, please refresh the browser.")
|
||||
|
||||
@ -724,6 +724,9 @@ components:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Map of installed pip packages to their versions
|
||||
embedded_python:
|
||||
type: [boolean, 'null']
|
||||
description: Whether ComfyUI is running from an embedded Python distribution
|
||||
required: [snapshot_time, comfyui_version, python_version, platform_info]
|
||||
BatchExecutionRecord:
|
||||
type: object
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user