diff --git a/__init__.py b/__init__.py index 558f3a6..02f3e1f 100644 --- a/__init__.py +++ b/__init__.py @@ -12,7 +12,7 @@ logging.basicConfig(level=logging.INFO) logger = logging.getLogger("DepthEstimation") # Version info -__version__ = "1.3.1" +__version__ = "1.3.2" # Node class mappings - will be populated based on dependency checks NODE_CLASS_MAPPINGS = {} diff --git a/pyproject.toml b/pyproject.toml index 857bbb6..65f79fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyuidepthestimation" description = "A robust custom depth estimation node for ComfyUI using Depth-Anything models (V1, V2, and V3/DA3). It integrates depth estimation with configurable post-processing options including blur, median filtering, contrast enhancement, and gamma correction." -version = "1.3.1" +version = "1.3.2" license = { file = "LICENSE" } dependencies = [ "transformers>=4.20.0", diff --git a/workflows/da3_test_workflow.json b/workflows/da3_test_workflow.json index 5ad8e29..75a1190 100644 --- a/workflows/da3_test_workflow.json +++ b/workflows/da3_test_workflow.json @@ -1,372 +1 @@ -{ - "last_node_id": 8, - "last_link_id": 6, - "nodes": [ - { - "id": 1, - "type": "LoadImage", - "pos": [ - 100, - 100 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 1 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": null, - "shape": 3, - "slot_index": 1 - } - ], - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "example.png", - "image" - ] - }, - { - "id": 2, - "type": "DepthEstimationNode", - "pos": [ - 500, - 100 - ], - "size": { - "0": 315, - "1": 150 - }, - "flags": {}, - "order": 1, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 1 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 2 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "DepthEstimationNode" - }, - "widgets_values": [ - "Depth-Anything-V3-Small", - 1024, - 2.0, - "3", - true, - true, - false, - false - ] - }, - { - "id": 3, - "type": "PreviewImage", - "pos": [ - 900, - 100 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 2 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 4, - "type": "LoadImage", - "pos": [ - 100, - 500 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 3, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 3 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "example.png", - "image" - ] - }, - { - "id": 5, - "type": "LoadImage", - "pos": [ - 100, - 850 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 4, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 4 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "example.png", - "image" - ] - }, - { - "id": 6, - "type": "ImageBatch", - "pos": [ - 500, - 650 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "image1", - "type": "IMAGE", - "link": 3 - }, - { - "name": "image2", - "type": "IMAGE", - "link": 4 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 5 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ImageBatch" - } - }, - { - "id": 7, - "type": "DepthEstimationNode", - "pos": [ - 800, - 600 - ], - "size": { - "0": 315, - "1": 150 - }, - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 5 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 6 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "DepthEstimationNode" - }, - "widgets_values": [ - "Depth-Anything-V3-Base", - 1024, - 2.0, - "3", - true, - true, - false, - false - ] - }, - { - "id": 8, - "type": "PreviewImage", - "pos": [ - 1200, - 600 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 6 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - } - ], - "links": [ - [ - 1, - 1, - 0, - 2, - 0, - "IMAGE" - ], - [ - 2, - 2, - 0, - 3, - 0, - "IMAGE" - ], - [ - 3, - 4, - 0, - 6, - 0, - "IMAGE" - ], - [ - 4, - 5, - 0, - 6, - 1, - "IMAGE" - ], - [ - 5, - 6, - 0, - 7, - 0, - "IMAGE" - ], - [ - 6, - 7, - 0, - 8, - 0, - "IMAGE" - ] - ], - "groups": [ - { - "title": "Single Image Test (DA3-Small)", - "bounding": [ - 50, - 50, - 1200, - 400 - ], - "color": "#3f789e", - "font_size": 24 - }, - { - "title": "Batch Processing Test (DA3-Base)", - "bounding": [ - 50, - 450, - 1500, - 800 - ], - "color": "#3f9e78", - "font_size": 24 - } - ], - "config": {}, - "extra": {}, - "version": 0.4 -} \ No newline at end of file +{"id":"2b6814e9-7446-4a4e-87e2-0ca4c4a2641a","revision":0,"last_node_id":15,"last_link_id":13,"nodes":[{"id":5,"type":"LoadImage","pos":[67.98039364141296,879.4234595325701],"size":[315,314],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"COMBO","widget":{"name":"image"},"link":null},{"localized_name":"choose file to upload","name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[4]},{"localized_name":"MASK","name":"MASK","type":"MASK","links":null}],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.3.71","Node name for S&R":"LoadImage","ue_properties":{"widget_ue_connectable":{},"version":"7.5.1","input_ue_unconnectable":{}}},"widgets_values":["face-AI (1).png","image"]},{"id":8,"type":"PreviewImage","pos":[1167.980393641413,629.4234595325701],"size":[315,314],"flags":{},"order":8,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":8}],"outputs":[],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.3.71","Node name for S&R":"PreviewImage","ue_properties":{"widget_ue_connectable":{},"version":"7.5.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":1,"type":"LoadImage","pos":[63.46069315611765,117.62064983948824],"size":[315,314],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"COMBO","widget":{"name":"image"},"link":null},{"localized_name":"choose file to upload","name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[9]},{"localized_name":"MASK","name":"MASK","type":"MASK","slot_index":1,"links":null}],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.3.71","Node name for S&R":"LoadImage","ue_properties":{"widget_ue_connectable":{},"version":"7.5.1","input_ue_unconnectable":{}}},"widgets_values":["saurian_target_oracle_00021_.jpg","image"]},{"id":9,"type":"DepthEstimationNode","pos":[767.9803936414129,629.4234595325701],"size":[315,226],"flags":{},"order":7,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":13},{"localized_name":"model_name","name":"model_name","type":"COMBO","widget":{"name":"model_name"},"link":null},{"localized_name":"input_size","name":"input_size","type":"INT","widget":{"name":"input_size"},"link":null},{"localized_name":"blur_radius","name":"blur_radius","type":"FLOAT","widget":{"name":"blur_radius"},"link":null},{"localized_name":"median_size","name":"median_size","type":"COMBO","widget":{"name":"median_size"},"link":null},{"localized_name":"apply_auto_contrast","name":"apply_auto_contrast","type":"BOOLEAN","widget":{"name":"apply_auto_contrast"},"link":null},{"localized_name":"apply_gamma","name":"apply_gamma","type":"BOOLEAN","widget":{"name":"apply_gamma"},"link":null},{"localized_name":"force_reload","name":"force_reload","shape":7,"type":"BOOLEAN","widget":{"name":"force_reload"},"link":null},{"localized_name":"force_cpu","name":"force_cpu","shape":7,"type":"BOOLEAN","widget":{"name":"force_cpu"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[8]}],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfyuidepthestimation","ver":"867d27539abf473bfb26530c89baf35a6a1fce02","Node name for S&R":"DepthEstimationNode","aux_id":"Limbicnation/ComfyUIDepthEstimation","ue_properties":{"widget_ue_connectable":{},"input_ue_unconnectable":{},"version":"7.5.1"}},"widgets_values":["Depth-Anything-V3-Base",1024,0.4,"5",false,false,false,false]},{"id":3,"type":"PreviewImage","pos":[866.7116153207534,117.62064983948824],"size":[315,314],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":10}],"outputs":[],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.3.71","Node name for S&R":"PreviewImage","ue_properties":{"widget_ue_connectable":{},"version":"7.5.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":12,"type":"SaveImage","pos":[1230.8887635169858,117.62064983948824],"size":[270,270],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":11},{"localized_name":"filename_prefix","name":"filename_prefix","type":"STRING","widget":{"name":"filename_prefix"},"link":null}],"outputs":[],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.3.71","Node name for S&R":"SaveImage","ue_properties":{"widget_ue_connectable":{},"input_ue_unconnectable":{},"version":"7.5.1"}},"widgets_values":["da3/da3_"]},{"id":10,"type":"DepthEstimationNode","pos":[463.4606931561177,117.62064983948824],"size":[315,226],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":9},{"localized_name":"model_name","name":"model_name","type":"COMBO","widget":{"name":"model_name"},"link":null},{"localized_name":"input_size","name":"input_size","type":"INT","widget":{"name":"input_size"},"link":null},{"localized_name":"blur_radius","name":"blur_radius","type":"FLOAT","widget":{"name":"blur_radius"},"link":null},{"localized_name":"median_size","name":"median_size","type":"COMBO","widget":{"name":"median_size"},"link":null},{"localized_name":"apply_auto_contrast","name":"apply_auto_contrast","type":"BOOLEAN","widget":{"name":"apply_auto_contrast"},"link":null},{"localized_name":"apply_gamma","name":"apply_gamma","type":"BOOLEAN","widget":{"name":"apply_gamma"},"link":null},{"localized_name":"force_reload","name":"force_reload","shape":7,"type":"BOOLEAN","widget":{"name":"force_reload"},"link":null},{"localized_name":"force_cpu","name":"force_cpu","shape":7,"type":"BOOLEAN","widget":{"name":"force_cpu"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[10,11]}],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfyuidepthestimation","ver":"867d27539abf473bfb26530c89baf35a6a1fce02","Node name for S&R":"DepthEstimationNode","aux_id":"Limbicnation/ComfyUIDepthEstimation","ue_properties":{"widget_ue_connectable":{},"input_ue_unconnectable":{},"version":"7.5.1"}},"widgets_values":["Depth-Anything-V3-Base",1024,0.7,"3",true,true,false,false]},{"id":4,"type":"LoadImage","pos":[67.98039364141296,529.4234595325703],"size":[315,314.00000000000006],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"COMBO","widget":{"name":"image"},"link":null},{"localized_name":"choose file to upload","name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[3]},{"localized_name":"MASK","name":"MASK","type":"MASK","links":null}],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.3.71","Node name for S&R":"LoadImage","ue_properties":{"widget_ue_connectable":{},"version":"7.5.1","input_ue_unconnectable":{}}},"widgets_values":["eb1b59c6_original.jpg","image"]},{"id":6,"type":"ImageBatch","pos":[467.98039364141306,679.4234595325701],"size":[210,46],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"image1","name":"image1","type":"IMAGE","link":3},{"localized_name":"image2","name":"image2","type":"IMAGE","link":4}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[13]}],"properties":{"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.3.71","Node name for S&R":"ImageBatch","ue_properties":{"widget_ue_connectable":{},"version":"7.5.1","input_ue_unconnectable":{}}},"widgets_values":[]}],"links":[[3,4,0,6,0,"IMAGE"],[4,5,0,6,1,"IMAGE"],[8,9,0,8,0,"IMAGE"],[9,1,0,10,0,"IMAGE"],[10,10,0,3,0,"IMAGE"],[11,10,0,12,0,"IMAGE"],[13,6,0,9,0,"IMAGE"]],"groups":[{"id":1,"title":"Single Image Test (DA3-Small)","bounding":[53.46069315611767,44.02064983948824,1457.428070360869,397.6],"color":"#3f789e","font_size":24,"flags":{}},{"id":2,"title":"Batch Processing Test (DA3-Base)","bounding":[57.980393641412974,455.82345953257044,1435,747.6],"color":"#3f9e78","font_size":24,"flags":{}}],"config":{},"extra":{"ue_links":[],"links_added_by_ue":[],"ds":{"scale":0.9244328382569064,"offset":[843.7494032146288,39.734443415773114]}},"version":0.4} \ No newline at end of file