Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "id": "5815757a-45b7-4d72-9921-5465ea472666",
- "revision": 0,
- "last_node_id": 64,
- "last_link_id": 41,
- "nodes": [
- {
- "id": 25,
- "type": "PlaySound|pysssss",
- "pos": [
- 90,
- 1160
- ],
- "size": [
- 270,
- 106
- ],
- "flags": {},
- "order": 14,
- "mode": 2,
- "inputs": [
- {
- "name": "any",
- "type": "*",
- "link": 30
- }
- ],
- "outputs": [
- {
- "name": "*",
- "shape": 6,
- "type": "*",
- "links": [
- 31
- ]
- }
- ],
- "properties": {
- "cnr_id": "comfyui-custom-scripts",
- "ver": "1.2.4",
- "Node name for S&R": "PlaySound|pysssss",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "always",
- 0.5,
- "notify.mp3"
- ]
- },
- {
- "id": 19,
- "type": "CheckpointLoaderSimple",
- "pos": [
- -360,
- 920
- ],
- "size": [
- 390,
- 110
- ],
- "flags": {},
- "order": 0,
- "mode": 2,
- "inputs": [],
- "outputs": [
- {
- "name": "MODEL",
- "type": "MODEL",
- "links": []
- },
- {
- "name": "CLIP",
- "type": "CLIP",
- "links": [
- 27
- ]
- },
- {
- "name": "VAE",
- "type": "VAE",
- "links": null
- }
- ],
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "CheckpointLoaderSimple",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "SD15\\photon_v1.safetensors"
- ]
- },
- {
- "id": 23,
- "type": "CLIPSave",
- "pos": [
- 430,
- 920
- ],
- "size": [
- 450,
- 110
- ],
- "flags": {
- "collapsed": false
- },
- "order": 17,
- "mode": 2,
- "inputs": [
- {
- "name": "clip",
- "type": "CLIP",
- "link": 35
- }
- ],
- "outputs": [],
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "CLIPSave",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- ""
- ]
- },
- {
- "id": 17,
- "type": "PlaySound|pysssss",
- "pos": [
- 90,
- 920
- ],
- "size": [
- 270,
- 106
- ],
- "flags": {},
- "order": 13,
- "mode": 2,
- "inputs": [
- {
- "name": "any",
- "type": "*",
- "link": 27
- }
- ],
- "outputs": [
- {
- "name": "*",
- "shape": 6,
- "type": "*",
- "links": [
- 35
- ]
- }
- ],
- "properties": {
- "cnr_id": "comfyui-custom-scripts",
- "ver": "1.2.4",
- "Node name for S&R": "PlaySound|pysssss",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "always",
- 0.5,
- "notify.mp3"
- ]
- },
- {
- "id": 26,
- "type": "CheckpointLoaderSimple",
- "pos": [
- -360,
- 1160
- ],
- "size": [
- 390,
- 110
- ],
- "flags": {},
- "order": 1,
- "mode": 2,
- "inputs": [],
- "outputs": [
- {
- "name": "MODEL",
- "type": "MODEL",
- "links": []
- },
- {
- "name": "CLIP",
- "type": "CLIP",
- "links": []
- },
- {
- "name": "VAE",
- "type": "VAE",
- "links": [
- 30
- ]
- }
- ],
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "CheckpointLoaderSimple",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "SD15\\photon_v1.safetensors"
- ]
- },
- {
- "id": 52,
- "type": "MarkdownNote",
- "pos": [
- -700,
- 680
- ],
- "size": [
- 310,
- 120
- ],
- "flags": {},
- "order": 2,
- "mode": 0,
- "inputs": [],
- "outputs": [],
- "title": "Fast Groups Muter tip (Markdown Note)",
- "properties": {
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "Run only specific parts of the workflow with the **\"Fast Group Muter\"** node above."
- ],
- "color": "#432",
- "bgcolor": "#653"
- },
- {
- "id": 32,
- "type": "PreviewAny",
- "pos": [
- 20,
- 750
- ],
- "size": [
- 480,
- 90
- ],
- "flags": {
- "collapsed": true
- },
- "order": 23,
- "mode": 0,
- "inputs": [
- {
- "name": "source",
- "type": "*",
- "link": 33
- }
- ],
- "outputs": [],
- "title": "preview file name structure (Preview Any)",
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "PreviewAny",
- "widget_ue_connectable": {}
- },
- "widgets_values": []
- },
- {
- "id": 8,
- "type": "WidgetToString",
- "pos": [
- 20,
- 710
- ],
- "size": [
- 390,
- 154
- ],
- "flags": {
- "collapsed": true
- },
- "order": 19,
- "mode": 0,
- "inputs": [
- {
- "name": "any_input",
- "shape": 7,
- "type": "*",
- "link": 7
- }
- ],
- "outputs": [
- {
- "name": "STRING",
- "type": "STRING",
- "links": [
- 15,
- 33
- ]
- }
- ],
- "title": "get model name (Widget To String)",
- "properties": {
- "cnr_id": "comfyui-kjnodes",
- "ver": "1.0.9",
- "Node name for S&R": "WidgetToString",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- 0,
- "",
- true,
- "",
- 2
- ]
- },
- {
- "id": 5,
- "type": "CheckpointLoaderSimple",
- "pos": [
- 20,
- 560
- ],
- "size": [
- 480,
- 110
- ],
- "flags": {},
- "order": 15,
- "mode": 0,
- "inputs": [
- {
- "name": "ckpt_name",
- "type": "COMBO",
- "widget": {
- "name": "ckpt_name"
- },
- "link": 14
- }
- ],
- "outputs": [
- {
- "name": "MODEL",
- "type": "MODEL",
- "links": [
- 7,
- 19
- ]
- },
- {
- "name": "CLIP",
- "type": "CLIP",
- "links": null
- },
- {
- "name": "VAE",
- "type": "VAE",
- "links": null
- }
- ],
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "CheckpointLoaderSimple",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "SD15\\photon_v1.safetensors"
- ]
- },
- {
- "id": 3,
- "type": "ModelSave",
- "pos": [
- 830,
- 560
- ],
- "size": [
- 460,
- 60
- ],
- "flags": {},
- "order": 24,
- "mode": 0,
- "inputs": [
- {
- "name": "model",
- "type": "MODEL",
- "link": 39
- },
- {
- "name": "filename_prefix",
- "type": "STRING",
- "widget": {
- "name": "filename_prefix"
- },
- "link": 38
- }
- ],
- "outputs": [],
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "ModelSave",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- ""
- ]
- },
- {
- "id": 10,
- "type": "CR Text Replace",
- "pos": [
- 20,
- 790
- ],
- "size": [
- 480,
- 198
- ],
- "flags": {
- "collapsed": true
- },
- "order": 22,
- "mode": 0,
- "inputs": [
- {
- "name": "text",
- "type": "STRING",
- "link": 15
- }
- ],
- "outputs": [
- {
- "label": "STRING",
- "name": "STRING",
- "type": "*",
- "links": [
- 38
- ]
- },
- {
- "name": "show_help",
- "type": "STRING",
- "links": null
- }
- ],
- "title": "prune checkpoint name (🔤 CR Text Replace)",
- "properties": {
- "cnr_id": "ComfyUI_Comfyroll_CustomNodes",
- "ver": "d78b780ae43fcf8c6b7c6505e6ffb4584281ceca",
- "Node name for S&R": "CR Text Replace",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "ckpt_name: ",
- "",
- ".safetensors",
- "",
- "",
- ""
- ]
- },
- {
- "id": 15,
- "type": "PlaySound|pysssss",
- "pos": [
- 530,
- 560
- ],
- "size": [
- 270,
- 110
- ],
- "flags": {
- "collapsed": false
- },
- "order": 20,
- "mode": 0,
- "inputs": [
- {
- "name": "any",
- "type": "*",
- "link": 19
- }
- ],
- "outputs": [
- {
- "name": "*",
- "shape": 6,
- "type": "*",
- "links": [
- 39
- ]
- }
- ],
- "properties": {
- "cnr_id": "comfyui-custom-scripts",
- "ver": "1.2.4",
- "Node name for S&R": "PlaySound|pysssss",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "always",
- 0.5,
- "notify.mp3"
- ]
- },
- {
- "id": 36,
- "type": "MarkdownNote",
- "pos": [
- -370,
- 0
- ],
- "size": [
- 460,
- 460
- ],
- "flags": {
- "collapsed": false
- },
- "order": 3,
- "mode": 0,
- "inputs": [],
- "outputs": [],
- "title": "Custom node requirements (Markdown Note)",
- "properties": {
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "# Required Custom Nodes\nOnce you open the workflow, you may get a message warning you of missing nodes. You can install them from the ComfyUI Manager or from the links below:\n\n### 1. rgthree:<br> <https://github.com/rgthree/rgthree-comfy></p>\n### 2.ComfyUI-Custom-Scripts:<br> <https://github.com/pythongosssss/ComfyUI-Custom-Scripts>\n### 3. ComfyUI_Comfyroll_CustomNodes:<br> <https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes>\n"
- ],
- "color": "#432",
- "bgcolor": "#653"
- },
- {
- "id": 13,
- "type": "PrimitiveNode",
- "pos": [
- -360,
- 560
- ],
- "size": [
- 350,
- 110
- ],
- "flags": {},
- "order": 4,
- "mode": 0,
- "inputs": [],
- "outputs": [
- {
- "name": "COMBO",
- "type": "COMBO",
- "widget": {
- "name": "ckpt_name"
- },
- "links": [
- 14
- ]
- }
- ],
- "title": "checkpoint selector (Primitive)",
- "properties": {
- "Run widget replace on values": false,
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "SD15\\photon_v1.safetensors",
- "fixed",
- ""
- ]
- },
- {
- "id": 27,
- "type": "VAESave",
- "pos": [
- 430,
- 1160
- ],
- "size": [
- 450,
- 110
- ],
- "flags": {
- "collapsed": false
- },
- "order": 18,
- "mode": 2,
- "inputs": [
- {
- "name": "vae",
- "type": "VAE",
- "link": 31
- }
- ],
- "outputs": [],
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "VAESave",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "VAE_SD15"
- ]
- },
- {
- "id": 61,
- "type": "PlaySound|pysssss",
- "pos": [
- 90,
- 1370
- ],
- "size": [
- 270,
- 106
- ],
- "flags": {},
- "order": 16,
- "mode": 2,
- "inputs": [
- {
- "name": "any",
- "type": "*",
- "link": 40
- }
- ],
- "outputs": [
- {
- "name": "*",
- "shape": 6,
- "type": "*",
- "links": [
- 41
- ]
- }
- ],
- "properties": {
- "cnr_id": "comfyui-custom-scripts",
- "ver": "1.2.4",
- "Node name for S&R": "PlaySound|pysssss",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "always",
- 0.5,
- "notify.mp3"
- ]
- },
- {
- "id": 62,
- "type": "CheckpointLoaderSimple",
- "pos": [
- -360,
- 1370
- ],
- "size": [
- 390,
- 110
- ],
- "flags": {},
- "order": 5,
- "mode": 2,
- "inputs": [],
- "outputs": [
- {
- "name": "MODEL",
- "type": "MODEL",
- "links": []
- },
- {
- "name": "CLIP",
- "type": "CLIP",
- "links": []
- },
- {
- "name": "VAE",
- "type": "VAE",
- "links": [
- 40
- ]
- }
- ],
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "CheckpointLoaderSimple",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "SD15\\photon_v1.safetensors"
- ]
- },
- {
- "id": 63,
- "type": "VAESave",
- "pos": [
- 430,
- 1370
- ],
- "size": [
- 450,
- 110
- ],
- "flags": {
- "collapsed": false
- },
- "order": 21,
- "mode": 2,
- "inputs": [
- {
- "name": "vae",
- "type": "VAE",
- "link": 41
- }
- ],
- "outputs": [],
- "properties": {
- "cnr_id": "comfy-core",
- "ver": "0.3.31",
- "Node name for S&R": "VAESave",
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "VAE_SDXL"
- ]
- },
- {
- "id": 54,
- "type": "MarkdownNote",
- "pos": [
- -700,
- 880
- ],
- "size": [
- 310,
- 160
- ],
- "flags": {},
- "order": 6,
- "mode": 0,
- "inputs": [],
- "outputs": [],
- "title": "CLIP Extractor tip (Markdown Note)",
- "properties": {
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "Unmute this group with the **\"Fast Groups Muter\"** node to extract the CLIPs only."
- ],
- "color": "#432",
- "bgcolor": "#653"
- },
- {
- "id": 31,
- "type": "Fast Groups Muter (rgthree)",
- "pos": [
- -700,
- 520
- ],
- "size": [
- 310,
- 154
- ],
- "flags": {},
- "order": 7,
- "mode": 0,
- "inputs": [],
- "outputs": [
- {
- "name": "OPT_CONNECTION",
- "type": "*",
- "links": null
- }
- ],
- "properties": {
- "matchColors": "",
- "matchTitle": "",
- "showNav": true,
- "sort": "position",
- "customSortAlphabet": "",
- "toggleRestriction": "default",
- "widget_ue_connectable": {}
- }
- },
- {
- "id": 64,
- "type": "MarkdownNote",
- "pos": [
- -700,
- 1330
- ],
- "size": [
- 310,
- 160
- ],
- "flags": {},
- "order": 8,
- "mode": 0,
- "inputs": [],
- "outputs": [],
- "title": "VAE Extractor tip (Markdown Note)",
- "properties": {
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "Unmute this group with the **\"Fast Groups Muter\"** node to extract an SDXL VAE only."
- ],
- "color": "#432",
- "bgcolor": "#653"
- },
- {
- "id": 55,
- "type": "MarkdownNote",
- "pos": [
- -700,
- 1120
- ],
- "size": [
- 310,
- 160
- ],
- "flags": {},
- "order": 9,
- "mode": 0,
- "inputs": [],
- "outputs": [],
- "title": "VAE Extractor tip (Markdown Note)",
- "properties": {
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "Unmute this group with the **\"Fast Groups Muter\"** node to extract an SD1.5 VAE only."
- ],
- "color": "#432",
- "bgcolor": "#653"
- },
- {
- "id": 38,
- "type": "MarkdownNote",
- "pos": [
- 110,
- 0
- ],
- "size": [
- 460,
- 460
- ],
- "flags": {
- "collapsed": false
- },
- "order": 10,
- "mode": 0,
- "inputs": [],
- "outputs": [],
- "title": "How to use the U-Net extractor (Markdown Note)",
- "properties": {
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "# How to use the U-Net extractor\n1. In the **\"checkpoint selector (Primitive)\"** node, select the checkpoint you'd like to extract the U-Net from.<br>\n\n1. Run the workflow. The extracted U-Net `.safetensors` file will be saved in your ComfyUI output folder.\n\nThe combination of **\"Widget To String\"** and **\"CR Text Replace\"** nodes automates the naming of the extracted U-Nets. Otherwise, you'd have to manually type a name every time you want to extract a U-Net from a checkpoint. It's a neat little time-saver. 🙂\n\n## If you want to extract the U-Net from more than 1 checkpoint:\n\n1. In the **\"checkpoint selector (Primitive)\"** node, set **\"control after generate\"** to **\"increment\"**\n<br>\n1. In the same node, pick the checkpoint you'd like to start extracting from.\n<br>\n1. In ComfyUI, set the \"Batch Count\" number to the amount of models you'd like to extract the U-Nets from and click the blue **> Run** button.<p>\nComfyUI will run through this many checkpoints from the **\"checkpoint selector\"** node's list, starting from the checkpoint you picked.\n\n**WARNING:**<br> If you run a large number of extractions at once, make sure you have enough space on the disk where your ComfyUI output folder resides. The SD 1.5 U-Nets are normally ~1.6 GB each, and SDXL U-Nets are ~4.8 GB each. <p>\n**NOTE:**<br>\nComfyUI adds `_00001_` to the end of the file name, so you may want to remove this after extraction to keep the model names tidy. If you have many models, there's a free program called [Advanced Renamer](https://www.advancedrenamer.com/) that you can use to bulk remove this set of characters. Even though it's free for personal use, I recommend supporting the author by purchasing a license, but only if you can afford to. It's a great little program that I personally use, and which has already saved me lots of time in file naming operations."
- ],
- "color": "#432",
- "bgcolor": "#653"
- },
- {
- "id": 56,
- "type": "MarkdownNote",
- "pos": [
- 590,
- 0
- ],
- "size": [
- 460,
- 460
- ],
- "flags": {
- "collapsed": false
- },
- "order": 11,
- "mode": 0,
- "inputs": [],
- "outputs": [],
- "title": "What to do with the extracted models (Markdown Note)",
- "properties": {
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "# What to do with the extracted models\n## Use them similarly to any Flux workflow:\n* Put the U-Nets into your ComfyUI **\"diffusion_models\"** folder\n* Put the extracted CLIP_L and CLIP_G models into your ComfyUI **\"clip\"** folder\n* Put the extracted VAEs into your ComfyUI **\"vae\"** folder\n\n### With SD 1.5 models, use the following nodes in place of the \"Load Checkpoint\" node:\n\n* Load Diffusion Model\n* Load CLIP<br>(in this loader, pick the extracted CLIP_L model)\n* Load VAE\n\n### With SDXL models, use the following nodes in place of the \"Load Checkpoint\" node:\n\n* Load Diffusion Model\n* DualCLIPLoader<br>(in this loader, pick the extracted CLIP_L and CLIP_G models)\n* Load VAE"
- ],
- "color": "#432",
- "bgcolor": "#653"
- },
- {
- "id": 43,
- "type": "MarkdownNote",
- "pos": [
- -710,
- 0
- ],
- "size": [
- 320,
- 460
- ],
- "flags": {
- "collapsed": false
- },
- "order": 12,
- "mode": 0,
- "inputs": [],
- "outputs": [],
- "title": "What is this? (Markdown Note)",
- "properties": {
- "widget_ue_connectable": {}
- },
- "widgets_values": [
- "# What is this?\n\nI was starting to run low on disk space due to the many checkpoints I have downloaded over the past year or so.\n\nWhile their U-Nets differ, all these checkpoints normally use the same CLIP and VAE models which are baked into the checkpoint.\n\nIf you think about it, this is quite wasteful for disk space, especially when the number of checkpoints is large.\n\nTo tackle this, I came up with a workflow that breaks down my checkpoints into their individual components (U-Net, CLIP, and VAE) to reuse them and save on disk space. Now I can reuse the same CLIP and VAE with all similar models and enjoy the space savings. 🙂\n\n### How much disk space can you expect to free up? A couple of examples:\nIf you have 50 SD 1.5 models: **~ 20 GB**.<br>(each SD 1.5 model saves you ~400 MB)<p>\nIf you have 50 SDXL models: **~ 90 GB**<br>(each SDXL model saves you ~1.8 GB)<br>\n\n## RUN AT YOUR OWN RISK!<p>\nAlways test your extracted models before deleting the checkpoints by comparing images generated with the same seeds. If they differ, it's possible that the particular checkpoint is using custom CLIP_L, CLIP_G, or VAE that are different from the default SD 1.5 and SDXL ones. If such cases occur, extract them from that checkpoint, name them appropriately, and keep them along with the default SD 1.5/SDXL CLIP and VAE models."
- ],
- "color": "#432",
- "bgcolor": "#653"
- }
- ],
- "links": [
- [
- 7,
- 5,
- 0,
- 8,
- 0,
- "*"
- ],
- [
- 14,
- 13,
- 0,
- 5,
- 0,
- "COMBO"
- ],
- [
- 15,
- 8,
- 0,
- 10,
- 0,
- "STRING"
- ],
- [
- 19,
- 5,
- 0,
- 15,
- 0,
- "*"
- ],
- [
- 27,
- 19,
- 1,
- 17,
- 0,
- "*"
- ],
- [
- 30,
- 26,
- 2,
- 25,
- 0,
- "*"
- ],
- [
- 31,
- 25,
- 0,
- 27,
- 0,
- "VAE"
- ],
- [
- 33,
- 8,
- 0,
- 32,
- 0,
- "*"
- ],
- [
- 35,
- 17,
- 0,
- 23,
- 0,
- "CLIP"
- ],
- [
- 38,
- 10,
- 0,
- 3,
- 1,
- "STRING"
- ],
- [
- 39,
- 15,
- 0,
- 3,
- 0,
- "MODEL"
- ],
- [
- 40,
- 62,
- 2,
- 61,
- 0,
- "*"
- ],
- [
- 41,
- 61,
- 0,
- 63,
- 0,
- "VAE"
- ]
- ],
- "groups": [
- {
- "id": 1,
- "title": "U-Net Extractor group",
- "bounding": [
- -370,
- 490,
- 1670,
- 310
- ],
- "color": "#a1309b",
- "font_size": 24,
- "flags": {}
- },
- {
- "id": 2,
- "title": "CLIP Extractor group",
- "bounding": [
- -370,
- 850,
- 1260,
- 193.60000610351562
- ],
- "color": "#b58b2a",
- "font_size": 24,
- "flags": {}
- },
- {
- "id": 3,
- "title": "VAE SD1.5 Extractor group",
- "bounding": [
- -370,
- 1090,
- 1260,
- 193.60000610351562
- ],
- "color": "#A88",
- "font_size": 24,
- "flags": {}
- },
- {
- "id": 4,
- "title": "VAE SDXL Extractor group",
- "bounding": [
- -370,
- 1300,
- 1260,
- 193.60000610351562
- ],
- "color": "#A88",
- "font_size": 24,
- "flags": {}
- }
- ],
- "config": {},
- "extra": {
- "ue_links": [],
- "links_added_by_ue": [],
- "frontendVersion": "1.18.6",
- "VHS_latentpreview": true,
- "VHS_latentpreviewrate": 0,
- "VHS_MetadataImage": true,
- "VHS_KeepIntermediate": true
- },
- "version": 0.4
- }
Advertisement
Add Comment
Please, Sign In to add comment