From 35590a293de4feada41e81c2df9dcfe1eb4d6747 Mon Sep 17 00:00:00 2001 From: lum3on Date: Thu, 8 May 2025 10:33:43 +0200 Subject: [PATCH] workflow_quantize.json --- examples/workflow_quantize.json | 559 +++++++++++++++++++++++--------- 1 file changed, 398 insertions(+), 161 deletions(-) diff --git a/examples/workflow_quantize.json b/examples/workflow_quantize.json index 977cc1f..135d43b 100644 --- a/examples/workflow_quantize.json +++ b/examples/workflow_quantize.json @@ -1,22 +1,148 @@ { "id": "0c605522-962a-4c82-9089-e97d4235261f", "revision": 0, - "last_node_id": 14, - "last_link_id": 14, + "last_node_id": 18, + "last_link_id": 18, "nodes": [ + { + "id": 14, + "type": "SaveAsSafeTensor", + "pos": [ + 510.0681457519531, + 550.5472412109375 + ], + "size": [ + 363.431396484375, + 83.39691162109375 + ], + "flags": {}, + "order": 10, + "mode": 4, + "inputs": [ + { + "name": "quantized_model_state_dict", + "type": "MODEL_STATE_DICT", + "link": 14 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "SaveAsSafeTensor", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "C:\\Users\\RAIIN Studios\\Documents\\protable\\ComfyUI\\models\\fluxfill-fp8e4m3fn.safetensors" + ] + }, + { + "id": 16, + "type": "CheckpointLoaderSimple", + "pos": [ + -421.72259521484375, + 332.6713562011719 + ], + "size": [ + 290.4454650878906, + 98 + ], + "flags": {}, + "order": 0, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 17 + ] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": null + }, + { + "name": "VAE", + "type": "VAE", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.32", + "Node name for S&R": "CheckpointLoaderSimple", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "SD1.5\\epicphotogasm_ultimateFidelity.safetensors" + ] + }, + { + "id": 17, + "type": "UnetLoaderGGUF", + "pos": [ + -415.4770202636719, + 572.0929565429688 + ], + "size": [ + 270, + 58 + ], + "flags": {}, + "order": 1, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 18 + ] + } + ], + "properties": { + "cnr_id": "comfyui-gguf", + "ver": "47bec6147569a138dd30ad3e14f190a36a3be456", + "Node name for S&R": "UnetLoaderGGUF", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "flux1-dev-Q8_0.gguf" + ] + }, { "id": 5, "type": "UNETLoader", "pos": [ - 141.08615112304688, - 169.95050048828125 + -422.3947448730469, + 134.14698791503906 ], "size": [ 287.13525390625, 83.07095336914062 ], "flags": {}, - "order": 0, + "order": 2, "mode": 0, "inputs": [], "outputs": [ @@ -24,7 +150,7 @@ "name": "MODEL", "type": "MODEL", "links": [ - 4 + 16 ] } ], @@ -45,107 +171,19 @@ "default" ] }, - { - "id": 11, - "type": "QuantizeFP8Format", - "pos": [ - 466.7684020996094, - 179.52532958984375 - ], - "size": [ - 323.7391357421875, - 59.94718933105469 - ], - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "model_state_dict", - "type": "MODEL_STATE_DICT", - "link": 11 - } - ], - "outputs": [ - { - "name": "quantized_model_state_dict", - "type": "MODEL_STATE_DICT", - "links": [ - 12 - ] - } - ], - "properties": { - "Node name for S&R": "QuantizeFP8Format", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65 - }, - "widgets_values": [ - "float8_e4m3fn" - ] - }, - { - "id": 2, - "type": "ModelToStateDict", - "pos": [ - 142.7964630126953, - 307.8086853027344 - ], - "size": [ - 291.43902587890625, - 79.07095336914062 - ], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 4 - } - ], - "outputs": [ - { - "name": "model_state_dict", - "type": "MODEL_STATE_DICT", - "slot_index": 0, - "links": [ - 11, - 13 - ] - } - ], - "properties": { - "Node name for S&R": "ModelToStateDict", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65 - }, - "widgets_values": [] - }, { "id": 13, "type": "QuantizeModel", "pos": [ - 119.18730163574219, - 500.8162536621094 + 139.14344787597656, + 542.1537475585938 ], "size": [ 345.158203125, 106 ], "flags": {}, - "order": 4, + "order": 8, "mode": 4, "inputs": [ { @@ -179,19 +217,191 @@ "float16" ] }, + { + "id": 9, + "type": "Note", + "pos": [ + 934.3568115234375, + 514.1301879882812 + ], + "size": [ + 371.62591552734375, + 149.91725158691406 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "Available Scaling Strategies:\n\n- per_tensor : Uses a single scale factor for the entire tensor (fast, less precise).\n\n- per_channel : Computes a separate scale for each output channel (more accurate)." + ], + "color": "#ffbbff", + "bgcolor": "#f1a7fb" + }, + { + "id": 11, + "type": "QuantizeFP8Format", + "pos": [ + 459.6412048339844, + 222.2886199951172 + ], + "size": [ + 367.9277648925781, + 59.94718933105469 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "model_state_dict", + "type": "MODEL_STATE_DICT", + "link": 11 + } + ], + "outputs": [ + { + "name": "quantized_model_state_dict", + "type": "MODEL_STATE_DICT", + "links": [ + 12 + ] + } + ], + "properties": { + "Node name for S&R": "QuantizeFP8Format", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "float8_e4m3fn" + ] + }, + { + "id": 15, + "type": "Any Switch (rgthree)", + "pos": [ + -70.95974731445312, + 314.68389892578125 + ], + "size": [ + 166.72030639648438, + 108.85087585449219 + ], + "flags": { + "collapsed": false + }, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "any_01", + "type": "MODEL", + "link": 16 + }, + { + "name": "any_02", + "type": "MODEL", + "link": 17 + }, + { + "name": "any_03", + "type": "MODEL", + "link": 18 + }, + { + "name": "any_04", + "type": "MODEL", + "link": null + }, + { + "name": "any_05", + "type": "MODEL", + "link": null + } + ], + "outputs": [ + { + "dir": 4, + "label": "MODEL", + "name": "*", + "shape": 3, + "type": "MODEL", + "links": [ + 15 + ] + } + ], + "properties": { + "cnr_id": "rgthree-comfy", + "ver": "32142fe476878a354dda6e2d4b5ea98960de3ced" + }, + "widgets_values": [] + }, + { + "id": 2, + "type": "ModelToStateDict", + "pos": [ + 145.28746032714844, + 277.02728271484375 + ], + "size": [ + 291.43902587890625, + 79.07095336914062 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 15 + } + ], + "outputs": [ + { + "name": "model_state_dict", + "type": "MODEL_STATE_DICT", + "slot_index": 0, + "links": [ + 11, + 13 + ] + } + ], + "properties": { + "Node name for S&R": "ModelToStateDict", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [] + }, { "id": 4, "type": "SaveAsSafeTensor", "pos": [ - 471.4664611816406, - 311.7754211425781 + 456.5610656738281, + 336.84515380859375 ], "size": [ - 318.212890625, - 69.432373046875 + 379.96441650390625, + 69.17916870117188 ], "flags": {}, - "order": 5, + "order": 9, "mode": 0, "inputs": [ { @@ -216,74 +426,30 @@ ] }, { - "id": 14, - "type": "SaveAsSafeTensor", - "pos": [ - 490.1119689941406, - 509.20977783203125 - ], - "size": [ - 363.431396484375, - 83.39691162109375 - ], - "flags": {}, - "order": 6, - "mode": 4, - "inputs": [ - { - "name": "quantized_model_state_dict", - "type": "MODEL_STATE_DICT", - "link": 14 - } - ], - "outputs": [], - "properties": { - "Node name for S&R": "SaveAsSafeTensor", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65 - }, - "widgets_values": [ - "C:\\Users\\RAIIN Studios\\Documents\\protable\\ComfyUI\\models\\fluxfill-fp8e4m3fn.safetensors" - ] - }, - { - "id": 9, + "id": 18, "type": "Note", "pos": [ - 911.549560546875, - 467.0907897949219 + 883.9888916015625, + 249.35699462890625 ], "size": [ - 371.62591552734375, - 149.91725158691406 + 415.2137145996094, + 122.82212829589844 ], "flags": {}, - "order": 1, + "order": 4, "mode": 0, "inputs": [], "outputs": [], "properties": {}, "widgets_values": [ - "Available Scaling Strategies:\n\n- per_tensor : Uses a single scale factor for the entire tensor (fast, less precise).\n\n- per_channel : Computes a separate scale for each output channel (more accurate)." + "If zou want to safe tensor file zou will always have to name the model correctly in zour path like in this example:\nC:\\Users\\RAIIN Studios\\Documents\\protable\\ComfyUI\\models\\fluxfill-fp8e4m3fn.safetensors" ], - "color": "#432", - "bgcolor": "#653" + "color": "#ffbbff", + "bgcolor": "#f1a7fb" } ], "links": [ - [ - 4, - 5, - 0, - 2, - 0, - "MODEL" - ], [ 11, 2, @@ -315,6 +481,38 @@ 14, 0, "MODEL_STATE_DICT" + ], + [ + 15, + 15, + 0, + 2, + 0, + "MODEL" + ], + [ + 16, + 5, + 0, + 15, + 0, + "MODEL" + ], + [ + 17, + 16, + 0, + 15, + 1, + "MODEL" + ], + [ + 18, + 17, + 0, + 15, + 2, + "MODEL" ] ], "groups": [ @@ -322,9 +520,9 @@ "id": 1, "title": "fp8", "bounding": [ - 131.08615112304688, - 96.35050201416016, - 680.042724609375, + 126.80980682373047, + 139.11367797851562, + 728.5076293945312, 311.2386169433594 ], "color": "#3f789e", @@ -335,14 +533,53 @@ "id": 2, "title": "fp/bf16", "bounding": [ - 109.18731689453125, - 427.21624755859375, + 129.14346313476562, + 468.5540771484375, 775.532958984375, 198.77328491210938 ], "color": "#3f789e", "font_size": 24, "flags": {} + }, + { + "id": 3, + "title": "Diffmodel", + "bounding": [ + -431.82818603515625, + 61.81802749633789, + 304.28436279296875, + 173.7981414794922 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 4, + "title": "ckpt", + "bounding": [ + -430.8782958984375, + 260.8616638183594, + 310.4454650878906, + 181.60000610351562 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 5, + "title": "Unet", + "bounding": [ + -429.7647399902344, + 502.79107666015625, + 310.23577880859375, + 143.02545166015625 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} } ], "config": {}, @@ -355,4 +592,4 @@ "VHS_KeepIntermediate": true }, "version": 0.4 -} \ No newline at end of file +}