refactor: consistency error message style

This commit is contained in:
Dr.Lt.Data
2023-10-29 11:13:21 +09:00
parent b9b26f9615
commit b6993594da
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -118,7 +118,7 @@ try:
try:
subprocess.check_call(pip_install + ['opencv-python'])
except:
print(f"ComfyUI-Impact-Pack: failed to install 'opencv-python'. Please, install manually.")
print(f"[ERROR] ComfyUI-Impact-Pack: failed to install 'opencv-python'. Please, install manually.")
try:
import git
@@ -190,5 +190,5 @@ try:
install()
except Exception as e:
print("[ComfyUI-Impact-Pack]: Dependency installation has failed. Please install manually.")
print("[ERROR] ComfyUI-Impact-Pack: Dependency installation has failed. Please install manually.")
print(e)
+1 -1
View File
@@ -2,7 +2,7 @@ import configparser
import os
version = "V4.27.5"
version = "V4.27.6"
dependency_version = 15
+1 -1
View File
@@ -1572,7 +1572,7 @@ class ImageReceiver:
mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu")
return (image, mask.unsqueeze(0))
except Exception as e:
print(f"[ComfyUI-Impact-Pack] ImageReceiver - invalid 'image_data'")
print(f"[WARN] ComfyUI-Impact-Pack: ImageReceiver - invalid 'image_data'")
mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu")
return (empty_pil_tensor(64, 64), mask, )
else:
+4 -4
View File
@@ -106,7 +106,7 @@ async def sam_prepare(request):
model_name = os.path.join(impact_pack.model_path, "sams", model_name)
print(f"ComfyUI-Impact-Pack: Loading SAM model '{impact_pack.model_path}'")
print(f"[INFO] ComfyUI-Impact-Pack: Loading SAM model '{impact_pack.model_path}'")
filename, image_dir = folder_paths.annotated_filepath(data["filename"])
@@ -122,7 +122,7 @@ async def sam_prepare(request):
thread = threading.Thread(target=async_prepare_sam, args=(image_dir, model_name, filename,))
thread.start()
print(f"ComfyUI-Impact-Pack: SAM model loaded. ")
print(f"[INFO] ComfyUI-Impact-Pack: SAM model loaded. ")
@server.PromptServer.instance.routes.post("/sam/release")
@@ -133,7 +133,7 @@ async def release_sam(request):
del sam_predictor
sam_predictor = None
print(f"ComfyUI-Impact-Pack: unloading SAM model")
print(f"[INFO] ComfyUI-Impact-Pack: unloading SAM model")
@server.PromptServer.instance.routes.post("/sam/detect")
@@ -439,7 +439,7 @@ def onprompt(json_data):
workflow_imagereceiver_update(json_data)
regional_sampler_seed_update(json_data)
except Exception as e:
print(f"[ComfyUI-Impact-Pack] Error on prompt: Several features will not work.\n{e}")
print(f"[WARN] ComfyUI-Impact-Pack: Error on prompt - several features will not work.\n{e}")
return json_data
+1 -1
View File
@@ -365,7 +365,7 @@ try:
sys.__comfyui_manager_register_message_collapse(filter_message)
except Exception as e:
print(f"e: {e}")
print(f"[WARN] ComfyUI-Impact-Pack: `ComfyUI` or `ComfyUI-Manager` is an outdated version.")
pass