diff --git a/ComfyUI_workflows/inference_lora_adiff.json b/ComfyUI_workflows/inference_Eden_LoRa_adiff.json similarity index 100% rename from ComfyUI_workflows/inference_lora_adiff.json rename to ComfyUI_workflows/inference_Eden_LoRa_adiff.json diff --git a/ComfyUI_workflows/inference_Eden_LoRa_txt2img.json b/ComfyUI_workflows/inference_Eden_LoRa_txt2img.json new file mode 100644 index 0000000..ddbdbe5 --- /dev/null +++ b/ComfyUI_workflows/inference_Eden_LoRa_txt2img.json @@ -0,0 +1,782 @@ +{ + "last_node_id": 26, + "last_link_id": 49, + "nodes": [ + { + "id": 15, + "type": "Note Plus (mtb)", + "pos": { + "0": 301, + "1": -120, + "2": 0, + "3": 0, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 0 + }, + "size": [ + 519.1570279742359, + 181.43570138536967 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Unnamed", + "properties": {}, + "widgets_values": [ + "## How to trigger the LoRa:\nEden's trainer trains a token by default (if not disabled) which triggers the concept.\n\nFor \"object\" and \"face\" mode you just refer to your concept directly with the token, eg: \"a photo of embedding:MY\\_NAME\\_embedding\"\n\nFor \"style\" mode, you just prepend \"in the style of embedding:MY\\_NAME\\_embedding\" in the beginning of your prompt!", + "markdown", + "", + "one_dark" + ], + "color": "#432", + "bgcolor": "#653", + "shape": 1 + }, + { + "id": 13, + "type": "Note Plus (mtb)", + "pos": { + "0": -506, + "1": -142, + "2": 0, + "3": 0, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 0 + }, + "size": [ + 684.8613808966753, + 209.8075855491436 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Unnamed", + "properties": {}, + "widgets_values": [ + "## How to use:\n\n1. Find the training folder in ComfyUI/outputs\n2. Go into the checkpoints folder\n3. Pick the best checkpoint by looking at the validation_grid\n4. Copy the ***_embeddings.safetensors file to ComfyUI/models/embeddings\n5. Copy the ***_LoRa.safetensors file to ComfyUI/models/loras\n6. Hit Refresh in your ComfyUI\n7. Adjust this workflow to load both of those!\n8. Tweak the lora strength and embedding token strength to get the best results!\n\n\nHave fun! :)", + "markdown", + "", + "one_dark" + ], + "color": "#432", + "bgcolor": "#653", + "shape": 1 + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1162, + 188 + ], + "size": { + "0": 140, + "1": 46 + }, + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": 8 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 9 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + -451, + 162 + ], + "size": [ + 429.578383119695, + 98 + ], + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 10 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 12 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 8 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "zavychromaxl_v90.safetensors" + ] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 1327, + 188 + ], + "size": { + "0": 453.85968017578125, + "1": 407.6841125488281 + }, + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 9 + } + ], + "properties": { + "Node name for S&R": "SaveImage" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 859, + 26 + ], + "size": [ + 271.419023112996, + 106 + ], + "flags": {}, + "order": 3, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 2 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 1024, + 1024, + 1 + ] + }, + { + "id": 10, + "type": "LoraLoader", + "pos": [ + 31, + 163 + ], + "size": { + "0": 337.44464111328125, + "1": 126 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 10 + }, + { + "name": "clip", + "type": "CLIP", + "link": 12 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 24 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 25, + 26 + ], + "shape": 3, + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "LoraLoader" + }, + "widgets_values": [ + "Eden_Token_LoRa_sdxl_LoRa.safetensors", + 0.7000000000000001, + 0.7000000000000001 + ] + }, + { + "id": 3, + "type": "KSampler", + "pos": [ + 863, + 186 + ], + "size": [ + 267.5352926614355, + 262 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 24 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 40 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 44 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 2 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 7 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 1093427037772868, + "randomize", + 30, + 8, + "euler_ancestral", + "normal", + 1 + ] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 402, + 124 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 25 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 43 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "(in the style of embedding:Eden_Token_LoRa_sdxl_embeddings:1.0), \n\nwhat do i say to make me exist, oriental mythical beasts, in the golden danish age, in the history of television in the style of light violet and light red, serge najjar, playful and whimsical, associated press photo, afrofuturism-inspired, alasdair mclellan, electronic media" + ] + }, + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 413, + 389 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 26 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 45 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 22, + "type": "ControlNetApplyAdvanced", + "pos": [ + 672, + 741 + ], + "size": { + "0": 315, + "1": 166 + }, + "flags": {}, + "order": 11, + "mode": 4, + "inputs": [ + { + "name": "positive", + "type": "CONDITIONING", + "link": 43 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 45 + }, + { + "name": "control_net", + "type": "CONTROL_NET", + "link": 38 + }, + { + "name": "image", + "type": "IMAGE", + "link": 47 + } + ], + "outputs": [ + { + "name": "positive", + "type": "CONDITIONING", + "links": [ + 40 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "negative", + "type": "CONDITIONING", + "links": [ + 44 + ], + "shape": 3, + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "ControlNetApplyAdvanced" + }, + "widgets_values": [ + 1, + 0, + 1 + ] + }, + { + "id": 23, + "type": "ControlNetLoader", + "pos": [ + 255, + 733 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 4, + "mode": 4, + "outputs": [ + { + "name": "CONTROL_NET", + "type": "CONTROL_NET", + "links": [ + 38 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ControlNetLoader" + }, + "widgets_values": [ + "SDXL/controlnet-canny-sdxl-1.0/diffusion_pytorch_model_V2.safetensors" + ] + }, + { + "id": 25, + "type": "AIO_Preprocessor", + "pos": [ + 258, + 857 + ], + "size": { + "0": 315, + "1": 82 + }, + "flags": {}, + "order": 7, + "mode": 4, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 48 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 47, + 49 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "AIO_Preprocessor" + }, + "widgets_values": [ + "CannyEdgePreprocessor", + 512 + ] + }, + { + "id": 26, + "type": "PreviewImage", + "pos": [ + 679, + 958 + ], + "size": [ + 307.39388136076934, + 34.317686638573264 + ], + "flags": {}, + "order": 10, + "mode": 4, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 49 + } + ], + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 24, + "type": "LoadImage", + "pos": [ + -112, + 857 + ], + "size": [ + 315, + 314 + ], + "flags": {}, + "order": 5, + "mode": 4, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 48 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "000050.jpg", + "image" + ] + } + ], + "links": [ + [ + 2, + 5, + 0, + 3, + 3, + "LATENT" + ], + [ + 7, + 3, + 0, + 8, + 0, + "LATENT" + ], + [ + 8, + 4, + 2, + 8, + 1, + "VAE" + ], + [ + 9, + 8, + 0, + 9, + 0, + "IMAGE" + ], + [ + 10, + 4, + 0, + 10, + 0, + "MODEL" + ], + [ + 12, + 4, + 1, + 10, + 1, + "CLIP" + ], + [ + 24, + 10, + 0, + 3, + 0, + "MODEL" + ], + [ + 25, + 10, + 1, + 6, + 0, + "CLIP" + ], + [ + 26, + 10, + 1, + 7, + 0, + "CLIP" + ], + [ + 38, + 23, + 0, + 22, + 2, + "CONTROL_NET" + ], + [ + 40, + 22, + 0, + 3, + 1, + "CONDITIONING" + ], + [ + 43, + 6, + 0, + 22, + 0, + "CONDITIONING" + ], + [ + 44, + 22, + 1, + 3, + 2, + "CONDITIONING" + ], + [ + 45, + 7, + 0, + 22, + 1, + "CONDITIONING" + ], + [ + 47, + 25, + 0, + 22, + 3, + "IMAGE" + ], + [ + 48, + 24, + 0, + 25, + 0, + "IMAGE" + ], + [ + 49, + 25, + 0, + 26, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "title": "Optional Controlnet", + "bounding": [ + -180, + 645, + 1205, + 536 + ], + "color": "#3f789e", + "font_size": 24, + "locked": false + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.683013455365071, + "offset": { + "0": 493.3539751601979, + "1": 181.8365096487169 + } + } + }, + "version": 0.4 +} \ No newline at end of file diff --git a/ComfyUI_workflows/inference_lora_SD15_txt2img.json b/ComfyUI_workflows/inference_lora_SD15_txt2img.json deleted file mode 100644 index 281c6e4..0000000 --- a/ComfyUI_workflows/inference_lora_SD15_txt2img.json +++ /dev/null @@ -1,533 +0,0 @@ -{ - "last_node_id": 12, - "last_link_id": 23, - "nodes": [ - { - "id": 7, - "type": "CLIPTextEncode", - "pos": [ - 413, - 389 - ], - "size": { - "0": 425.27801513671875, - "1": 180.6060791015625 - }, - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 16 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 6 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "text, watermark" - ] - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [ - 1209, - 188 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 7 - }, - { - "name": "vae", - "type": "VAE", - "link": 8 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 9 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 12, - "type": "Reroute", - "pos": [ - 220, - 14 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 22 - } - ], - "outputs": [ - { - "name": "", - "type": "MODEL", - "links": [ - 19 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": false, - "horizontal": false - } - }, - { - "id": 3, - "type": "KSampler", - "pos": [ - 863, - 186 - ], - "size": { - "0": 315, - "1": 262 - }, - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 19 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 4 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 6 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 2 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 7 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSampler" - }, - "widgets_values": [ - 1, - "fixed", - 25, - 8, - "euler", - "normal", - 1 - ] - }, - { - "id": 5, - "type": "EmptyLatentImage", - "pos": [ - 473, - 609 - ], - "size": { - "0": 315, - "1": 106 - }, - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 2 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "EmptyLatentImage" - }, - "widgets_values": [ - 768, - 768, - 1 - ] - }, - { - "id": 4, - "type": "CheckpointLoaderSimple", - "pos": [ - -467, - 120 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 10 - ], - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 12 - ], - "slot_index": 1 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 8 - ], - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "CheckpointLoaderSimple" - }, - "widgets_values": [ - "juggernaut_reborn.safetensors" - ] - }, - { - "id": 6, - "type": "CLIPTextEncode", - "pos": [ - 415, - 186 - ], - "size": { - "0": 422.84503173828125, - "1": 164.31304931640625 - }, - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 15 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 4 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "a photo of embedding:xander_sd15_embedding on the beach " - ] - }, - { - "id": 11, - "type": "Reroute", - "pos": [ - 220, - 49 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 23 - } - ], - "outputs": [ - { - "name": "", - "type": "CLIP", - "links": [ - 15, - 16 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": false, - "horizontal": false - } - }, - { - "id": 9, - "type": "SaveImage", - "pos": [ - 347, - -270 - ], - "size": { - "0": 210, - "1": 270 - }, - "flags": {}, - "order": 9, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 9 - } - ], - "properties": {}, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 10, - "type": "LoraLoader", - "pos": [ - -72, - -229 - ], - "size": { - "0": 254.95774841308594, - "1": 127.86701202392578 - }, - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 10 - }, - { - "name": "clip", - "type": "CLIP", - "link": 12 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 22 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 23 - ], - "shape": 3, - "slot_index": 1 - } - ], - "properties": { - "Node name for S&R": "LoraLoader" - }, - "widgets_values": [ - "xander_sd15_lora.safetensors", - 0.6, - 0.6 - ] - } - ], - "links": [ - [ - 2, - 5, - 0, - 3, - 3, - "LATENT" - ], - [ - 4, - 6, - 0, - 3, - 1, - "CONDITIONING" - ], - [ - 6, - 7, - 0, - 3, - 2, - "CONDITIONING" - ], - [ - 7, - 3, - 0, - 8, - 0, - "LATENT" - ], - [ - 8, - 4, - 2, - 8, - 1, - "VAE" - ], - [ - 9, - 8, - 0, - 9, - 0, - "IMAGE" - ], - [ - 10, - 4, - 0, - 10, - 0, - "MODEL" - ], - [ - 12, - 4, - 1, - 10, - 1, - "CLIP" - ], - [ - 15, - 11, - 0, - 6, - 0, - "CLIP" - ], - [ - 16, - 11, - 0, - 7, - 0, - "CLIP" - ], - [ - 19, - 12, - 0, - 3, - 0, - "MODEL" - ], - [ - 22, - 10, - 0, - 12, - 0, - "*" - ], - [ - 23, - 10, - 1, - 11, - 0, - "*" - ] - ], - "groups": [], - "config": {}, - "extra": { - "ds": { - "scale": 0.8264462809917354, - "offset": { - "0": 513.8734070325743, - "1": 351.4824273966635 - } - } - }, - "version": 0.4 -} \ No newline at end of file diff --git a/ComfyUI_workflows/inference_lora_SDXL_txt2img.json b/ComfyUI_workflows/inference_lora_SDXL_txt2img.json deleted file mode 100644 index f5d91f7..0000000 --- a/ComfyUI_workflows/inference_lora_SDXL_txt2img.json +++ /dev/null @@ -1,447 +0,0 @@ -{ - "last_node_id": 12, - "last_link_id": 26, - "nodes": [ - { - "id": 3, - "type": "KSampler", - "pos": [ - 863, - 186 - ], - "size": { - "0": 315, - "1": 262 - }, - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 24 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 4 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 6 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 2 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 7 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSampler" - }, - "widgets_values": [ - 1, - "fixed", - 30, - 8, - "euler", - "normal", - 1 - ] - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [ - 1209, - 188 - ], - "size": [ - 140, - 46 - ], - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 7 - }, - { - "name": "vae", - "type": "VAE", - "link": 8 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 9 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 9, - "type": "SaveImage", - "pos": [ - 1377, - 189 - ], - "size": [ - 453.8596810556717, - 407.68411889115805 - ], - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 9 - } - ], - "properties": { - "Node name for S&R": "SaveImage" - }, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 7, - "type": "CLIPTextEncode", - "pos": [ - 413, - 389 - ], - "size": { - "0": 425.27801513671875, - "1": 180.6060791015625 - }, - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 26 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 6 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "" - ] - }, - { - "id": 6, - "type": "CLIPTextEncode", - "pos": [ - 415, - 186 - ], - "size": { - "0": 422.84503173828125, - "1": 164.31304931640625 - }, - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 25 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 4 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "in the style of embedding:crystals_sdxl_embeddings, a stunning artwork of the Taj Mahal" - ] - }, - { - "id": 4, - "type": "CheckpointLoaderSimple", - "pos": [ - -530, - 198 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 10 - ], - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 12 - ], - "slot_index": 1 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 8 - ], - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "CheckpointLoaderSimple" - }, - "widgets_values": [ - "zavychromaxl_v90.safetensors" - ] - }, - { - "id": 10, - "type": "LoraLoader", - "pos": [ - -164, - 197 - ], - "size": [ - 337.4446429640109, - 126 - ], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 10 - }, - { - "name": "clip", - "type": "CLIP", - "link": 12 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 24 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 25, - 26 - ], - "shape": 3, - "slot_index": 1 - } - ], - "properties": { - "Node name for S&R": "LoraLoader" - }, - "widgets_values": [ - "xander_sd15_lora.safetensors", - 0.7000000000000001, - 0.7000000000000001 - ] - }, - { - "id": 5, - "type": "EmptyLatentImage", - "pos": [ - 854, - 22 - ], - "size": { - "0": 315, - "1": 106 - }, - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 2 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "EmptyLatentImage" - }, - "widgets_values": [ - 1024, - 1024, - 1 - ] - } - ], - "links": [ - [ - 2, - 5, - 0, - 3, - 3, - "LATENT" - ], - [ - 4, - 6, - 0, - 3, - 1, - "CONDITIONING" - ], - [ - 6, - 7, - 0, - 3, - 2, - "CONDITIONING" - ], - [ - 7, - 3, - 0, - 8, - 0, - "LATENT" - ], - [ - 8, - 4, - 2, - 8, - 1, - "VAE" - ], - [ - 9, - 8, - 0, - 9, - 0, - "IMAGE" - ], - [ - 10, - 4, - 0, - 10, - 0, - "MODEL" - ], - [ - 12, - 4, - 1, - 10, - 1, - "CLIP" - ], - [ - 24, - 10, - 0, - 3, - 0, - "MODEL" - ], - [ - 25, - 10, - 1, - 6, - 0, - "CLIP" - ], - [ - 26, - 10, - 1, - 7, - 0, - "CLIP" - ] - ], - "groups": [], - "config": {}, - "extra": { - "ds": { - "scale": 0.620921323059155, - "offset": { - "0": 803.2886643162302, - "1": 413.8626947452057 - } - } - }, - "version": 0.4 -} \ No newline at end of file diff --git a/ComfyUI_workflows/traininig_workflow.json b/ComfyUI_workflows/traininig_workflow.json index 3a4f8a0..03084bc 100644 --- a/ComfyUI_workflows/traininig_workflow.json +++ b/ComfyUI_workflows/traininig_workflow.json @@ -1,111 +1,7 @@ { - "last_node_id": 19, - "last_link_id": 31, + "last_node_id": 21, + "last_link_id": 35, "nodes": [ - { - "id": 15, - "type": "Eden_LoRa_trainer", - "pos": [ - 399, - 102 - ], - "size": [ - 408.74602195807825, - 502 - ], - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "sample_images", - "type": "IMAGE", - "links": [ - 28 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "lora_path", - "type": "STRING", - "links": [ - 29 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "embedding_path", - "type": "STRING", - "links": [ - 30 - ], - "shape": 3, - "slot_index": 2 - }, - { - "name": "final_msg", - "type": "STRING", - "links": [ - 31 - ], - "shape": 3, - "slot_index": 3 - } - ], - "properties": { - "Node name for S&R": "Eden_LoRa_trainer" - }, - "widgets_values": [ - "https://edenartlab-lfs.s3.amazonaws.com/datasets/twisting_realities.zip", - "zavychromaxl_v90.safetensors", - "Eden_Token_LoRa", - "style", - 512, - 4, - 300, - 0.001, - 0.0005, - 16, - false, - 3, - 200, - 0.7, - false, - 78327, - "randomize" - ] - }, - { - "id": 5, - "type": "Display Any (rgthree)", - "pos": [ - 902, - 377 - ], - "size": { - "0": 349.3501892089844, - "1": 98.81207275390625 - }, - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "source", - "type": "*", - "link": 31, - "dir": 3 - } - ], - "properties": { - "Node name for S&R": "Display Any (rgthree)" - }, - "widgets_values": [ - "" - ] - }, { "id": 4, "type": "Display Any (rgthree)", @@ -124,7 +20,7 @@ { "name": "source", "type": "*", - "link": 30, + "link": 34, "dir": 3 } ], @@ -153,7 +49,7 @@ { "name": "source", "type": "*", - "link": 29, + "link": 33, "dir": 3 } ], @@ -165,11 +61,116 @@ ] }, { - "id": 19, + "id": 5, + "type": "Display Any (rgthree)", + "pos": [ + 897, + 373 + ], + "size": { + "0": 349.3501892089844, + "1": 98.81207275390625 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "source", + "type": "*", + "link": 35, + "dir": 3 + } + ], + "properties": { + "Node name for S&R": "Display Any (rgthree)" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 21, + "type": "Eden_LoRa_trainer", + "pos": [ + 413, + 124 + ], + "size": [ + 412.0186879621763, + 526 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "sample_images", + "type": "IMAGE", + "links": [ + 32 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "lora_path", + "type": "STRING", + "links": [ + 33 + ], + "shape": 3, + "slot_index": 1 + }, + { + "name": "embedding_path", + "type": "STRING", + "links": [ + 34 + ], + "shape": 3, + "slot_index": 2 + }, + { + "name": "final_msg", + "type": "STRING", + "links": [ + 35 + ], + "shape": 3, + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "Eden_LoRa_trainer" + }, + "widgets_values": [ + "https://edenartlab-lfs.s3.amazonaws.com/datasets/twisting_realities.zip", + "style", + "Eden_Token_LoRa", + "zavychromaxl_v90.safetensors", + 512, + 4, + 300, + 0.001, + 0.0005, + 16, + false, + 3, + 200, + 6, + 0.7, + false, + 61543, + "randomize" + ] + }, + { + "id": 18, "type": "Note Plus (mtb)", "pos": { - "0": 38, - "1": 87, + "0": 411, + "1": -278, "2": 0, "3": 0, "4": 0, @@ -180,8 +181,8 @@ "9": 0 }, "size": [ - 311.85119874831105, - 500.51022151650477 + 1447.6545455654823, + 329.15514519406656 ], "flags": {}, "order": 1, @@ -191,7 +192,7 @@ "title": "Unnamed", "properties": {}, "widgets_values": [ - "\n## A note on settings:\n\nIf you disbale\\_ti (not recommended) you'll get a normal LoRa that does not use a token embedding, in that case you typically need to train for a bit longer and increase the unet_lr.\n\n\"training_images\" can both a a path to a local folder or a url to a public .zip file of imgs which will get downloaded.\n\nYou can provide custom captions by placing a filename.txt file for each filename.jpg in the training_images folder\n\nI highly recommend to keep the training resolution at either 512 or 768.\n\nn_tokens = 1 is currently broken, need to fix that.\n\nAn embedding + LoRa checkpoint will get saved every **save_checkpoint_every_n_steps**, based on the sample image grid you can then pick the best checkpoint to use in your workflows!", + "\n## [Eden](https://www.eden.art/)\nThis LoRa trainer was made by the team behind https://www.eden.art/, led by https://x.com/xsteenbrugge\n\nIf you make awesome stuff w this trainer, give us a shout at:\nhttps://x.com/eden_art_ or\nhttps://www.instagram.com/eden.art____/\n\n---\n\n---\n\n## SD15 + SDXL:\nThis trainer works for both SD15 and SDXL models, but the default settings are primarily tuned for SDXL models.\n\n---\n\n### A note on Embeddings:\nThis trainer optionally trains a textual inversion token into the LoRa, this is highly recommended when using SDXL models, but also means you have to load that token embedding when doing inference! See the example workflows in the repo.\n\n\nThe default settings work great for SDXL, SD15 usually need more training steps (eg 800) and sometimes benefits from disabling ti_training.\n\n---\n\n### A note on captioning:\nImages will get automatically captioned. It is recommended to put a .env file in the root of this custom node repo with your OpenAI API key, if found that will trigger a prompt_cleanup function that significantly improves results!\n", "markdown", "", "one_dark" @@ -201,11 +202,11 @@ "shape": 1 }, { - "id": 18, + "id": 19, "type": "Note Plus (mtb)", "pos": { - "0": 404, - "1": -271, + "0": 48, + "1": 106, "2": 0, "3": 0, "4": 0, @@ -216,8 +217,8 @@ "9": 0 }, "size": [ - 1454.6318854500394, - 307.9066720799907 + 326.25154556548205, + 537.0981451940668 ], "flags": {}, "order": 2, @@ -227,7 +228,7 @@ "title": "Unnamed", "properties": {}, "widgets_values": [ - "\n## [Eden](https://www.eden.art/)\nThis LoRa trainer was made by the team behind https://www.eden.art/, led by https://x.com/xsteenbrugge\n\nIf you make awesome stuff w this trainer, give us a shout at:\nhttps://x.com/eden_art_ or\nhttps://www.instagram.com/eden.art____/\n\n---\n\n## SD15 + SDXL:\nThis trainer works for both SD15 and SDXL models, but the default settings are primarily tuned for SDXL models.\n\n### A note on Embeddings:\nThis trainer optionally trains a textual inversion token into the LoRa, this is highly recommended when using SDXL models, but also means you have to load that token embedding when doing inference! See the example workflows in the repo.\n\n\nThe default settings work great for SDXL, SD15 usually need more training steps (eg 800) and sometimes benefits from disabling ti_training.\n\n### A note on captioning:\nImages will get automatically captioned. It is recommended to put a .env file in the root of this custom node repo with your OpenAI API key, if found that will trigger a prompt_cleanup function that significantly improves results!\n", + "\n## A note on settings:\n\nIf you disbale\\_ti (not recommended) you'll get a normal LoRa that does not use a token embedding, in that case you typically need to train for a bit longer and increase the unet_lr.\n\n---\n\n\"training_images\" can both a a path to a local folder or a url to a public .zip file of imgs which will get downloaded.\n\n---\n\nYou can provide custom captions by placing a filename.txt file for each filename.jpg in the training_images folder\n\n---\n\nI highly recommend to keep the training resolution at either 512 or 768.\n\n---\n\nn_tokens = 1 is currently broken, need to fix that.\n\n---\n\nAn embedding + LoRa checkpoint will get saved every **save\\_checkpoint\\_every\\_n\\_steps**. Based on the sample image grid you can then pick the best checkpoint to use in your workflows!", "markdown", "", "one_dark" @@ -240,8 +241,8 @@ "id": 2, "type": "PreviewImage", "pos": [ - 1312, - 101 + 1307, + 121 ], "size": { "0": 557.6970825195312, @@ -254,7 +255,7 @@ { "name": "images", "type": "IMAGE", - "link": 28 + "link": 32 } ], "properties": { @@ -264,32 +265,32 @@ ], "links": [ [ - 28, - 15, + 32, + 21, 0, 2, 0, "IMAGE" ], [ - 29, - 15, + 33, + 21, 1, 3, 0, "*" ], [ - 30, - 15, + 34, + 21, 2, 4, 0, "*" ], [ - 31, - 15, + 35, + 21, 3, 5, 0, @@ -300,10 +301,10 @@ "config": {}, "extra": { "ds": { - "scale": 0.7513148009015777, + "scale": 0.8264462809917354, "offset": [ - 123.08356135412646, - 476.67783552719476 + 75.76382855598398, + 267.8202654048342 ] } }, diff --git a/main.py b/main.py index dac6e43..200f8c1 100755 --- a/main.py +++ b/main.py @@ -404,7 +404,8 @@ def train(config: TrainingConfig): # Print some statistics: if (global_step % config.checkpointing_steps == 0) and (global_step < (config.max_train_steps - 25)) and global_step > 0: - + print(f"\n---- avg training fps: {images_done / (time.time() - start_time):.2f}", end="\r", flush = True) + output_save_dir = f"{checkpoint_dir}/checkpoint-{global_step}" os.makedirs(output_save_dir, exist_ok=True) config.save_as_json( @@ -458,10 +459,9 @@ def train(config: TrainingConfig): images_done += config.train_batch_size global_step += 1 - if global_step % (config.max_train_steps//50) == 0: + if global_step % (config.max_train_steps//100) == 0: progress = (global_step / config.max_train_steps) + 0.05 #print_system_info() - print(f"\n---- avg training fps: {images_done / (time.time() - start_time):.2f}", end="\r", flush = True) yield np.min((progress, 1.0)) if global_step > config.max_train_steps: diff --git a/node.py b/node.py index a0274d7..d6ed1df 100644 --- a/node.py +++ b/node.py @@ -19,9 +19,9 @@ class Eden_LoRa_trainer: return { "required": { "training_images_folder_path": ("STRING", {"default": "."}), - "ckpt_name": (folder_paths.get_filename_list("checkpoints"), ), + "mode": (["style", "face", "object"], {"default": "style"}), "lora_name": ("STRING", {"default": "Eden_Token_LoRa"}), - "mode": (["style", "face", "object"], ), + "ckpt_name": (folder_paths.get_filename_list("checkpoints"), ), "training_resolution": ("INT", {"default": 512, "min": 256, "max": 1024}), "train_batch_size": ("INT", {"default": 4, "min": 1, "max": 8}), "max_train_steps": ("INT", {"default": 300, "min": 10, "max": 10000}), @@ -31,6 +31,7 @@ class Eden_LoRa_trainer: "disable_ti": ("BOOLEAN", {"default": False}), "n_tokens": ("INT", {"default": 3, "min": 1, "max": 5}), "save_checkpoint_every_n_steps": ("INT", {"default": 200, "min": 10, "max": 10000}), + "n_sample_imgs": ("INT", {"default": 4, "min": 2, "max": 10}), "sample_imgs_lora_scale": ("FLOAT", {"default": 0.7, "min": 0.0, "max": 1.25}), "plot_training_graphs_on_disk": ("BOOLEAN", {"default": False}), "seed": ("INT", {"default": 0, "min": 0, "max": 100000}), @@ -57,6 +58,7 @@ class Eden_LoRa_trainer: n_tokens, plot_training_graphs_on_disk, save_checkpoint_every_n_steps, + n_sample_imgs, sample_imgs_lora_scale, seed, ): @@ -83,6 +85,7 @@ class Eden_LoRa_trainer: train_batch_size=train_batch_size, max_train_steps=max_train_steps, checkpointing_steps=save_checkpoint_every_n_steps, + n_sample_imgs=(n_sample_imgs//2) * 2, sample_imgs_lora_scale=sample_imgs_lora_scale, ti_lr=ti_lr, unet_lr=unet_lr, diff --git a/trainer/config.py b/trainer/config.py index ed5492e..76aea5d 100644 --- a/trainer/config.py +++ b/trainer/config.py @@ -140,6 +140,9 @@ class TrainingConfig(BaseModel): if self.unet_lr_warmup_steps is None: self.unet_lr_warmup_steps = self.max_train_steps + if self.checkpointing_steps < 1: + self.checkpointing_steps = self.max_train_steps + if self.concept_mode == "face": print(f"Face mode is active ----> disabling left-right flips and setting mask_target_prompts to 'face'.") self.left_right_flip_augmentation = False # always disable lr flips for face mode! diff --git a/trainer/utils/val_prompts.py b/trainer/utils/val_prompts.py index 440a71f..e8442a6 100644 --- a/trainer/utils/val_prompts.py +++ b/trainer/utils/val_prompts.py @@ -2,9 +2,9 @@ val_prompts = {} val_prompts['style'] = [ 'a beautiful mountainous landscape, boulders, fresh water stream, setting sun', - 'the stunning skyline of New York City', + 'the stunning skyline of New York City, setting sun, skyscrapers, wallpaper', 'fruit hanging from a tree, highly detailed texture, soil, rain, drops, photo realistic, surrealism, highly detailed, 8k macrophotography', - 'the Taj Mahal, stunning wallpaper', + 'the Taj Mahal, stunning wallpaper, architecture, ancient, marble, white, intricate, detailed', 'A majestic tree rooted in circuits, leaves shimmering with data streams, stands as a beacon where the digital dawn caresses the fog-laden, binary soil—a symphony of pixels and chlorophyll.', 'A beautiful octopus, with swirling tendrils and a pulsating heart of fiery opal hues, hovers ethereally against a starry void, sculpted through a meticulous flame-working technique.', 'a stunning image of an aston martin sportscar',