Calculate the execution time of all nodes.
Welcome to use my another ComfyUI extension: ComfyUI Browser.
comfyui_profiler.mov
![image](https://private-user-images.githubusercontent.com/828837/294103497-cce14c35-7994-4e0e-8905-c84cdedf0ca4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0MjkzNDIsIm5iZiI6MTcyNDQyOTA0MiwicGF0aCI6Ii84Mjg4MzcvMjk0MTAzNDk3LWNjZTE0YzM1LTc5OTQtNGUwZS04OTA1LWM4NGNkZWRmMGNhNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyM1QxNjA0MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kMzc0YjA1OGQzMWUzYWQ2MGI3ZDE0NDZkNjIxZmM3NmUyYmRmYWZmNjQzNGU4YWZhNWM4MTcxMjY2NWQ5MDBhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.vp8bmIkvRcO007az-TU2BAeLXilIeeQ6CTMj5loRHhs)
![image](https://private-user-images.githubusercontent.com/828837/294103551-e4a4bc4e-b260-437c-9be9-423f87552dd0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0MjkzNDIsIm5iZiI6MTcyNDQyOTA0MiwicGF0aCI6Ii84Mjg4MzcvMjk0MTAzNTUxLWU0YTRiYzRlLWIyNjAtNDM3Yy05YmU5LTQyM2Y4NzU1MmRkMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyM1QxNjA0MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mYjA0N2VjMWM3MWZmMjFhM2Y4ODlmZWQyN2MwYmExY2IyZjAyNTk1MjU2NWJiNzNiODE2ODg4NzdhNzczOGRmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Q-IxBLW75Jj5V3dX2SwySVsZ68a-DYBF3hawLCE2-Ek)
Calculate the execution time of all nodes.
Calculate the execution time of all nodes.
Welcome to use my another ComfyUI extension: ComfyUI Browser.
if you see 276s for everything, you gotta mentally do the math to get minutes every time you look at one.
can you string replace the s, then divide the resulting number by 60, then add an m, and print that if the number of seconds is over 60?
so
32s if less than 60s
1.6m if its whatever that is in seconds.
etc.
may seem like a dumb request but some of us are not great at mental math.
I am a beginner. How can I use it
Installing and enabling this extension rendered the KSampler unusable. It works but get stuck at 100% and never outputs the result.
Nothing gets loged to the terminal output.
Uninstalling the extension fixes the issue.
This happened immediately after installing the node. We're in here:
File "ComfyUI/custom_nodes/comfyui-profiler/__init__.py", line 27, in send_message
await s.send_json('profiler', data)
Note that the Comfy-Dev-Utils package is installed and we're also inside that thing's profiler, it looks like. Perhaps they are incompatible?
0: 448x640 1 face, 3.4ms
0: 448x640 1 face, 3.4ms
Speed: 0.9ms preprocess, 3.4ms inference, 0.5ms postprocess per image at shape (1, 3, 448, 640)
Speed: 0.9ms preprocess, 3.4ms inference, 0.5ms postprocess per image at shape (1, 3, 448, 640)
Detailer: segment upscale for ((92.86456, 129.08794)) | crop region (278, 387) x 2.6464346796206093 -> (735, 1024)
Requested to load SDXL
Loading 1 new model
100%|██████████████████████████████████████████████████████████████████████████████████████████████| 50/50 [00:06<00:00, 7.16it/s]
#995 [FaceDetailer]: 7.52s
#987 [PreviewImage]: 0.01s
#988 [PreviewImage]: 0.01s
#957 [Image Batch]: 0.00s
#918 [PreviewImage]: 0.28s
Exception in thread Thread-4 (prompt_worker):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "ComfyUI/main.py", line 111, in prompt_worker
e.execute(item[2], prompt_id, item[3], item[4])
File "ComfyUI/custom_nodes/ComfyUI-0246/utils.py", line 381, in new_func
res_value = old_func(*final_args, **kwargs)
File "ComfyUI/custom_nodes/comfyui-profiler/__init__.py", line 93, in new_prompt_executor_execute
ret = exist_PromptExecutor_execute(self, prompt, prompt_id, extra_data=extra_data, execute_outputs=execute_outputs)
File "ComfyUI/custom_nodes/rgthree-comfy/__init__.py", line 211, in rgthree_execute
return self.rgthree_old_execute(*args, **kwargs)
File "ComfyUI/execution.py", line 391, in execute
self.success, error, ex = recursive_execute(self.server, prompt, self.outputs, output_node_id, extra_data, executed, prompt_id, self.outputs_ui, self.object_storage)
File "ComfyUI/custom_nodes/ComfyUI-Dev-Utils/nodes/execution_time.py", line 32, in swizzle_origin_recursive_execute
result = origin_recursive_execute(server, prompt, outputs, current_item, extra_data, executed, prompt_id,
File "ComfyUI/custom_nodes/comfyui-profiler/__init__.py", line 65, in new_recursive_execute
ret = exist_recursive_execute(server, prompt, outputs, current_item, extra_data, executed, prompt_id, outputs_ui, object_storage)
File "ComfyUI/execution.py", line 134, in recursive_execute
result = recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed, prompt_id, outputs_ui, object_storage)
File "ComfyUI/custom_nodes/ComfyUI-Dev-Utils/nodes/execution_time.py", line 32, in swizzle_origin_recursive_execute
result = origin_recursive_execute(server, prompt, outputs, current_item, extra_data, executed, prompt_id,
File "ComfyUI/custom_nodes/comfyui-profiler/__init__.py", line 73, in new_recursive_execute
asyncio.run(send_message({
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "ComfyUI/custom_nodes/comfyui-profiler/__init__.py", line 27, in send_message
await s.send_json('profiler', data)
File "ComfyUI/server.py", line 621, in send_json
await send_socket_catch_exception(ws.send_json, message)
File "ComfyUI/server.py", line 36, in send_socket_catch_exception
await function(message)
File "ComfyUI/venv/lib/python3.10/site-packages/aiohttp/web_ws.py", line 351, in send_json
await self.send_str(dumps(data), compress=compress)
File "ComfyUI/venv/lib/python3.10/site-packages/aiohttp/web_ws.py", line 335, in send_str
await self._writer.send(data, binary=False, compress=compress)
File "ComfyUI/venv/lib/python3.10/site-packages/aiohttp/http_websocket.py", line 729, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File "ComfyUI/venv/lib/python3.10/site-packages/aiohttp/http_websocket.py", line 644, in _send_frame
message = await compressobj.compress(message)
File "ComfyUI/venv/lib/python3.10/site-packages/aiohttp/compression_utils.py", line 71, in compress
async with self._compress_lock:
File "/usr/lib/python3.10/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/usr/lib/python3.10/asyncio/locks.py", line 106, in acquire
fut = self._get_loop().create_future()
File "/usr/lib/python3.10/asyncio/mixins.py", line 30, in _get_loop
raise RuntimeError(f'{self!r} is bound to a different event loop')
RuntimeError: <asyncio.locks.Lock object at 0x7f110dce5f00 [locked]> is bound to a different event loop
[profiler] #142 PreviewImage: 0.2367 seconds, total 13.0739 seconds(#141)
[profiler] #64 SaveImage: 0.4078 seconds, total 13.245 seconds(#141)
Prompt executed in 13.51 seconds
[rgthree] Using rgthree's optimized recursive execution.
Traceback (most recent call last):
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\main.py", line 254, in
loop.run_until_complete(run(server, address=args.listen, port=args.port, verbose=not args.dont_print_server, call_on_start=call_on_start))
File "asyncio\base_events.py", line 649, in run_until_complete
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\main.py", line 149, in run
await asyncio.gather(server.start(address, port, verbose, call_on_start), server.publish_loop())
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\server.py", line 622, in publish_loop
await self.send(*msg)
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\server.py", line 557, in send
await self.send_json(event, data, sid)
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\server.py", line 608, in send_json
await send_socket_catch_exception(ws.send_json, message)
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\server.py", line 36, in send_socket_catch_exception
await function(message)
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\venv\lib\site-packages\aiohttp\web_ws.py", line 351, in send_json
await self.send_str(dumps(data), compress=compress)
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\venv\lib\site-packages\aiohttp\web_ws.py", line 335, in send_str
await self._writer.send(data, binary=False, compress=compress)
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\venv\lib\site-packages\aiohttp\http_websocket.py", line 729, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\venv\lib\site-packages\aiohttp\http_websocket.py", line 644, in _send_frame
message = await compressobj.compress(message)
File "C:\Users\anime\Documents\Coding\Stability Matrix\Data\Packages\ComfyUI\venv\lib\site-packages\aiohttp\compression_utils.py", line 71, in compress
async with self._compress_lock:
File "asyncio\locks.py", line 14, in aenter
File "asyncio\locks.py", line 106, in acquire
File "asyncio\mixins.py", line 30, in _get_loop
RuntimeError: <asyncio.locks.Lock object at 0x000001F21C304760 [unlocked, waiters:1]> is bound to a different event loop
I thought there was a problem with Comfyui, but it was with this extension. I get this error after KSampler execution:
Traceback (most recent call last): File "H:\ComfyUI_windows_portable\ComfyUI\main.py", line 241, in <module> loop.run_until_complete(run(server, address=args.listen, port=args.port, verbose=not args.dont_print_server, call_on_start=call_on_start)) File "asyncio\base_events.py", line 653, in run_until_complete File "H:\ComfyUI_windows_portable\ComfyUI\main.py", line 143, in run await asyncio.gather(server.start(address, port, verbose, call_on_start), server.publish_loop()) File "H:\ComfyUI_windows_portable\ComfyUI\server.py", line 627, in publish_loop await self.send(*msg) File "H:\ComfyUI_windows_portable\ComfyUI\server.py", line 562, in send await self.send_json(event, data, sid) File "H:\ComfyUI_windows_portable\ComfyUI\server.py", line 613, in send_json await send_socket_catch_exception(ws.send_json, message) File "H:\ComfyUI_windows_portable\ComfyUI\server.py", line 41, in send_socket_catch_exception await function(message) File "H:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\web_ws.py", line 352, in send_json await self.send_str(dumps(data), compress=compress) File "H:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\web_ws.py", line 336, in send_str await self._writer.send(data, binary=False, compress=compress) File "H:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\http_websocket.py", line 729, in send await self._send_frame(message, WSMsgType.TEXT, compress) File "H:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\http_websocket.py", line 644, in _send_frame message = await compressobj.compress(message) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\compression_utils.py", line 71, in compress async with self._compress_lock: File "asyncio\locks.py", line 15, in __aenter__ File "asyncio\locks.py", line 106, in acquire File "asyncio\mixins.py", line 20, in _get_loop RuntimeError: <asyncio.locks.Lock object at 0x000001E8A59BD290 [unlocked, waiters:1]> is bound to a different event loop
When trying to undo with Ctrl+Z the extension causes an error which leads to the workflow being erased.
I already had my workflow erased twice, since it seems to reload some default workflow and overwrite the workflow with it...
please fix by changing this line (adding '?' to '_overwrite')
if (node.onDrawForeground?._overwrited) {
Line 30 in 00a99e2
thank you
TypeError: Cannot read properties of undefined (reading '_overwrited')
Workflow:
{"last_node_id":16,"last_link_id":16,"nodes":[{"id":6,"type":"EmptyLatentImage","pos":[1228,109],"size":{"0":315,"1":106},"flags":{},"order":0,"mode":0,"outputs":[{"name":"LATENT","type":"LATENT","links":[6],"shape":3}],"properties":{"Node name for S&R":"EmptyLatentImage"},"widgets_values":[512,512,1]},{"id":7,"type":"VAEDecode","pos":[2061,97],"size":{"0":210,"1":46},"flags":{},"order":7,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":9,"slot_index":1}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[12],"shape":3,"slot_index":0}],"properties":{"Node name for S&R":"VAEDecode"}},{"id":9,"type":"VAELoader","pos":[1617,246],"size":[372.47609881882,58],"flags":{},"order":1,"mode":0,"outputs":[{"name":"VAE","type":"VAE","links":[9],"shape":3}],"properties":{"Node name for S&R":"VAELoader"},"widgets_values":["vae-ft-mse-840000-ema-pruned.safetensors"]},{"id":15,"type":"BNK_CLIPTextEncodeAdvanced","pos":[1135,831],"size":{"0":400,"1":200},"flags":{},"order":5,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[16],"shape":3}],"title":"CLIP Text Encode (Advanced) - NEGATIVE","properties":{"Node name for S&R":"BNK_CLIPTextEncodeAdvanced"},"widgets_values":["ugly, deformed","mean","compel"]},{"id":3,"type":"CheckpointLoaderSimple","pos":[789,389],"size":{"0":315,"1":98},"flags":{},"order":2,"mode":0,"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"shape":3},{"name":"CLIP","type":"CLIP","links":[13,14],"shape":3,"slot_index":1},{"name":"VAE","type":"VAE","links":null,"shape":3}],"properties":{"Node name for S&R":"CheckpointLoaderSimple"},"widgets_values":["deliberate_v2.safetensors"]},{"id":2,"type":"KSampler","pos":[1618,389],"size":{"0":315,"1":262},"flags":{},"order":6,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":1,"slot_index":0},{"name":"positive","type":"CONDITIONING","link":15,"slot_index":1},{"name":"negative","type":"CONDITIONING","link":16,"slot_index":2},{"name":"latent_image","type":"LATENT","link":6,"slot_index":3}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"shape":3,"slot_index":0}],"properties":{"Node name for S&R":"KSampler"},"widgets_values":[515687388721624,"randomize",25,6,"dpmpp_2m","karras",1]},{"id":14,"type":"BNK_CLIPTextEncodeAdvanced","pos":[1134,552],"size":{"0":400,"1":200},"flags":{},"order":4,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":13}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[15],"shape":3}],"title":"CLIP Text Encode (Advanced) - POSITIVE","properties":{"Node name for S&R":"BNK_CLIPTextEncodeAdvanced"},"widgets_values":["(\"A dream of a distant galaxy, by Caspar David Friedrich, matte painting\", \"trending on artstation, HQ\").and()","mean","compel"]},{"id":12,"type":"PreviewImage","pos":[2341,255],"size":[550.953125,566.02734375],"flags":{},"order":8,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":12}],"properties":{"Node name for S&R":"PreviewImage"}},{"id":13,"type":"Show Metadata [Crystools]","pos":{"0":2356,"1":891,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"size":[527.3515625,304.8125],"flags":{"collapsed":false},"order":3,"mode":0,"inputs":[],"outputs":[],"title":"🪛 Show Metadata ","properties":{}}],"links":[[1,3,0,2,0,"MODEL"],[6,6,0,2,3,"LATENT"],[7,2,0,7,0,"LATENT"],[9,9,0,7,1,"VAE"],[12,7,0,12,0,"IMAGE"],[13,3,1,14,0,"CLIP"],[14,3,1,15,0,"CLIP"],[15,14,0,2,1,"CONDITIONING"],[16,15,0,2,2,"CONDITIONING"]],"groups":[],"config":{},"extra":{"ds":{"scale":1,"offset":[-737.83984375,50.8125]},"info":{"name":"workflow","author":"","description":"","version":"1","created":"2024-08-12T16:42:33.669Z","modified":"2024-08-12T17:08:10.662Z","software":"ComfyUI"},"workspace_info":{"id":"s-fF6wnqkkVOTOcRqrHOu","saveLock":false,"cloudID":null,"coverMediaPath":null}},"version":0.4}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.