mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-02 20:57:11 +08:00
Merge 02cf1ac38a9f8c0624469bd74bdf5af95752f9c0 into 1fd306824d35bf2669f6be46fadab37efd7081c4
This commit is contained in:
commit
2619dd050e
22
server.py
22
server.py
@ -290,7 +290,6 @@ class PromptServer():
|
|||||||
image = post.get("image")
|
image = post.get("image")
|
||||||
overwrite = post.get("overwrite")
|
overwrite = post.get("overwrite")
|
||||||
image_is_duplicate = False
|
image_is_duplicate = False
|
||||||
|
|
||||||
image_upload_type = post.get("type")
|
image_upload_type = post.get("type")
|
||||||
upload_dir, image_upload_type = get_dir_by_type(image_upload_type)
|
upload_dir, image_upload_type = get_dir_by_type(image_upload_type)
|
||||||
|
|
||||||
@ -529,6 +528,7 @@ class PromptServer():
|
|||||||
"ram_total": ram_total,
|
"ram_total": ram_total,
|
||||||
"ram_free": ram_free,
|
"ram_free": ram_free,
|
||||||
"comfyui_version": __version__,
|
"comfyui_version": __version__,
|
||||||
|
"workflows_templates_version": get_workflow_templates_version(),
|
||||||
"python_version": sys.version,
|
"python_version": sys.version,
|
||||||
"pytorch_version": comfy.model_management.torch_version,
|
"pytorch_version": comfy.model_management.torch_version,
|
||||||
"embedded_python": os.path.split(os.path.split(sys.executable)[0])[1] == "python_embeded",
|
"embedded_python": os.path.split(os.path.split(sys.executable)[0])[1] == "python_embeded",
|
||||||
@ -548,6 +548,26 @@ class PromptServer():
|
|||||||
}
|
}
|
||||||
return web.json_response(system_stats)
|
return web.json_response(system_stats)
|
||||||
|
|
||||||
|
def get_workflow_templates_version():
|
||||||
|
"""Reads the version number of comfyui-workflow-templates from the requirements.txt file."""
|
||||||
|
try:
|
||||||
|
current_dir = os.path.dirname(__file__)
|
||||||
|
requirements_path = os.path.join(current_dir, 'requirements.txt')
|
||||||
|
|
||||||
|
version = "not_found"
|
||||||
|
with open(requirements_path, 'r', encoding='utf-8') as f:
|
||||||
|
for line in f:
|
||||||
|
if line.startswith('comfyui-workflow-templates=='):
|
||||||
|
version = line.strip().split('==')[1]
|
||||||
|
break
|
||||||
|
except FileNotFoundError:
|
||||||
|
version = "requirements.txt not found"
|
||||||
|
except Exception as e:
|
||||||
|
logging.info(f"Error reading version in get_workflow_templates_version: {e}")
|
||||||
|
version = "unknown"
|
||||||
|
|
||||||
|
return version
|
||||||
|
|
||||||
@routes.get("/prompt")
|
@routes.get("/prompt")
|
||||||
async def get_prompt(request):
|
async def get_prompt(request):
|
||||||
return web.json_response(self.get_queue_info())
|
return web.json_response(self.get_queue_info())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user