Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Open models: Krea 2 Realism and Turbo, Krea 2 Edit and Identity Edit, image to image, inpaint and expand

Adarsh015b4b85e44d
diff --git a/scripts/comfy/hand-built/krea2-edit-general.json b/scripts/comfy/hand-built/krea2-edit-general.json
new file mode 100644
index 00000000..db20722a
--- /dev/null
+++ b/scripts/comfy/hand-built/krea2-edit-general.json
@@ -0,0 +1,253 @@
+{
+ "29": {
+ "class_type": "SaveImage",
+ "inputs": {
+ "images": [
+ "54",
+ 0
+ ],
+ "filename_prefix": "fuobe/krea2-edit-general"
+ },
+ "_meta": {
+ "title": "Save Image"
+ }
+ },
+ "53": {
+ "class_type": "KSampler",
+ "inputs": {
+ "model": [
+ "79",
+ 0
+ ],
+ "positive": [
+ "84",
+ 0
+ ],
+ "negative": [
+ "85",
+ 0
+ ],
+ "latent_image": [
+ "82",
+ 0
+ ],
+ "seed": 0,
+ "steps": 8,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "54": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "53",
+ 0
+ ],
+ "vae": [
+ "57",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "55": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "krea2_turbo_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model (Krea 2 Turbo)"
+ }
+ },
+ "56": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
+ "type": "krea2",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 4B, krea2)"
+ }
+ },
+ "57": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "qwen_image_vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "71": {
+ "class_type": "LoraLoaderModelOnly",
+ "inputs": {
+ "model": [
+ "55",
+ 0
+ ],
+ "lora_name": "krea2_general_edit_v2.safetensors",
+ "strength_model": 1
+ },
+ "_meta": {
+ "title": "Load LoRA (Krea 2 General Edit V2)"
+ }
+ },
+ "72": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "input.png"
+ },
+ "_meta": {
+ "title": "Photo to edit (image)"
+ }
+ },
+ "73": {
+ "class_type": "VAEEncode",
+ "inputs": {
+ "pixels": [
+ "72",
+ 0
+ ],
+ "vae": [
+ "57",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Encode (photo)"
+ }
+ },
+ "79": {
+ "class_type": "Krea2EditModelPatch",
+ "inputs": {
+ "model": [
+ "71",
+ 0
+ ],
+ "source_latent": [
+ "73",
+ 0
+ ],
+ "source_latent_b": [
+ "92",
+ 0
+ ],
+ "vae": [
+ "57",
+ 0
+ ],
+ "source_image": [
+ "72",
+ 0
+ ],
+ "source_image_b": [
+ "90",
+ 0
+ ],
+ "target_latent": [
+ "82",
+ 0
+ ],
+ "ref_boost": 4,
+ "ref_boost_a": 1,
+ "fit_mode": "fit",
+ "ref_position": "aligned (trained)",
+ "ref_position_a": "aligned (trained)"
+ },
+ "_meta": {
+ "title": "Krea2 Edit Model Patch (ref_boost = likeness)"
+ }
+ },
+ "82": {
+ "class_type": "EmptySD3LatentImage",
+ "inputs": {
+ "width": 1024,
+ "height": 1024,
+ "batch_size": 1
+ },
+ "_meta": {
+ "title": "Empty Latent (output size)"
+ }
+ },
+ "84": {
+ "class_type": "Krea2EditGroundedEncode",
+ "inputs": {
+ "clip": [
+ "56",
+ 0
+ ],
+ "prompt": "Change her outfit to a red raincoat.",
+ "image": [
+ "72",
+ 0
+ ],
+ "image_b": [
+ "90",
+ 0
+ ],
+ "grounding_px": 768,
+ "system_prompt": ""
+ },
+ "_meta": {
+ "title": "Instruction (grounded on the photo)"
+ }
+ },
+ "85": {
+ "class_type": "Krea2EditGroundedEncode",
+ "inputs": {
+ "clip": [
+ "56",
+ 0
+ ],
+ "prompt": "",
+ "image": [
+ "72",
+ 0
+ ],
+ "image_b": [
+ "90",
+ 0
+ ],
+ "grounding_px": 768,
+ "system_prompt": ""
+ },
+ "_meta": {
+ "title": "negative (leave empty)"
+ }
+ },
+ "90": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "person.png"
+ },
+ "_meta": {
+ "title": "Person to add (image2, optional)"
+ }
+ },
+ "92": {
+ "class_type": "VAEEncode",
+ "inputs": {
+ "pixels": [
+ "90",
+ 0
+ ],
+ "vae": [
+ "57",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Encode (person)"
+ }
+ }
+}
diff --git a/scripts/comfy/hand-built/krea2-edit-identity.json b/scripts/comfy/hand-built/krea2-edit-identity.json
new file mode 100644
index 00000000..312a9d00
--- /dev/null
+++ b/scripts/comfy/hand-built/krea2-edit-identity.json
@@ -0,0 +1,253 @@
+{
+ "29": {
+ "class_type": "SaveImage",
+ "inputs": {
+ "images": [
+ "54",
+ 0
+ ],
+ "filename_prefix": "fuobe/krea2-edit-identity"
+ },
+ "_meta": {
+ "title": "Save Image"
+ }
+ },
+ "53": {
+ "class_type": "KSampler",
+ "inputs": {
+ "model": [
+ "79",
+ 0
+ ],
+ "positive": [
+ "84",
+ 0
+ ],
+ "negative": [
+ "85",
+ 0
+ ],
+ "latent_image": [
+ "82",
+ 0
+ ],
+ "seed": 0,
+ "steps": 8,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "54": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "53",
+ 0
+ ],
+ "vae": [
+ "57",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "55": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "krea2_turbo_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model (Krea 2 Turbo)"
+ }
+ },
+ "56": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
+ "type": "krea2",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 4B, krea2)"
+ }
+ },
+ "57": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "qwen_image_vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "71": {
+ "class_type": "LoraLoaderModelOnly",
+ "inputs": {
+ "model": [
+ "55",
+ 0
+ ],
+ "lora_name": "krea2_identity_edit_v2.safetensors",
+ "strength_model": 1
+ },
+ "_meta": {
+ "title": "Load LoRA (Krea 2 Identity Edit V2)"
+ }
+ },
+ "72": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "input.png"
+ },
+ "_meta": {
+ "title": "Photo to edit (image)"
+ }
+ },
+ "73": {
+ "class_type": "VAEEncode",
+ "inputs": {
+ "pixels": [
+ "72",
+ 0
+ ],
+ "vae": [
+ "57",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Encode (photo)"
+ }
+ },
+ "79": {
+ "class_type": "Krea2EditModelPatch",
+ "inputs": {
+ "model": [
+ "71",
+ 0
+ ],
+ "source_latent": [
+ "73",
+ 0
+ ],
+ "source_latent_b": [
+ "92",
+ 0
+ ],
+ "vae": [
+ "57",
+ 0
+ ],
+ "source_image": [
+ "72",
+ 0
+ ],
+ "source_image_b": [
+ "90",
+ 0
+ ],
+ "target_latent": [
+ "82",
+ 0
+ ],
+ "ref_boost": 2,
+ "ref_boost_a": 1,
+ "fit_mode": "fit",
+ "ref_position": "aligned (trained)",
+ "ref_position_a": "aligned (trained)"
+ },
+ "_meta": {
+ "title": "Krea2 Edit Model Patch (ref_boost = likeness)"
+ }
+ },
+ "82": {
+ "class_type": "EmptySD3LatentImage",
+ "inputs": {
+ "width": 1024,
+ "height": 1024,
+ "batch_size": 1
+ },
+ "_meta": {
+ "title": "Empty Latent (output size)"
+ }
+ },
+ "84": {
+ "class_type": "Krea2EditGroundedEncode",
+ "inputs": {
+ "clip": [
+ "56",
+ 0
+ ],
+ "prompt": "Change her outfit to a red raincoat.",
+ "image": [
+ "72",
+ 0
+ ],
+ "image_b": [
+ "90",
+ 0
+ ],
+ "grounding_px": 768,
+ "system_prompt": ""
+ },
+ "_meta": {
+ "title": "Instruction (grounded on the photo)"
+ }
+ },
+ "85": {
+ "class_type": "Krea2EditGroundedEncode",
+ "inputs": {
+ "clip": [
+ "56",
+ 0
+ ],
+ "prompt": "",
+ "image": [
+ "72",
+ 0
+ ],
+ "image_b": [
+ "90",
+ 0
+ ],
+ "grounding_px": 768,
+ "system_prompt": ""
+ },
+ "_meta": {
+ "title": "negative (leave empty)"
+ }
+ },
+ "90": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "person.png"
+ },
+ "_meta": {
+ "title": "Person to add (image2, optional)"
+ }
+ },
+ "92": {
+ "class_type": "VAEEncode",
+ "inputs": {
+ "pixels": [
+ "90",
+ 0
+ ],
+ "vae": [
+ "57",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Encode (person)"
+ }
+ }
+}
diff --git a/scripts/comfy/hand-built/krea2-inpaint.json b/scripts/comfy/hand-built/krea2-inpaint.json
new file mode 100644
index 00000000..cae255eb
--- /dev/null
+++ b/scripts/comfy/hand-built/krea2-inpaint.json
@@ -0,0 +1,267 @@
+{
+ "1": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "input.png"
+ },
+ "_meta": {
+ "title": "Photo (image)"
+ }
+ },
+ "2": {
+ "class_type": "LoadImageMask",
+ "inputs": {
+ "image": "mask.png",
+ "channel": "red"
+ },
+ "_meta": {
+ "title": "Load Mask (white = paint here)"
+ }
+ },
+ "3": {
+ "class_type": "GetImageSize",
+ "inputs": {
+ "image": [
+ "1",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Size to black out"
+ }
+ },
+ "4": {
+ "class_type": "EmptyImage",
+ "inputs": {
+ "width": [
+ "3",
+ 0
+ ],
+ "height": [
+ "3",
+ 1
+ ],
+ "batch_size": 1,
+ "color": 0
+ },
+ "_meta": {
+ "title": "Black"
+ }
+ },
+ "5": {
+ "class_type": "ImageCompositeMasked",
+ "inputs": {
+ "destination": [
+ "1",
+ 0
+ ],
+ "source": [
+ "4",
+ 0
+ ],
+ "x": 0,
+ "y": 0,
+ "resize_source": false,
+ "mask": [
+ "2",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Black where the mask is white"
+ }
+ },
+ "6": {
+ "class_type": "ImageScaleToTotalPixels",
+ "inputs": {
+ "image": [
+ "5",
+ 0
+ ],
+ "upscale_method": "lanczos",
+ "megapixels": 1,
+ "resolution_steps": 16
+ },
+ "_meta": {
+ "title": "About 1 MP (the add-on's reference limit), sides on the 16-pixel grid"
+ }
+ },
+ "7": {
+ "class_type": "GetImageSize",
+ "inputs": {
+ "image": [
+ "6",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Output size = the reference"
+ }
+ },
+ "10": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "krea2_turbo_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model (Krea 2 Turbo)"
+ }
+ },
+ "11": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
+ "type": "krea2",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 4B, krea2)"
+ }
+ },
+ "12": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "qwen_image_vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "15": {
+ "class_type": "LoraLoaderModelOnly",
+ "inputs": {
+ "model": [
+ "10",
+ 0
+ ],
+ "lora_name": "krea2_inpaint_edit.safetensors",
+ "strength_model": 1
+ },
+ "_meta": {
+ "title": "Load LoRA (Krea 2 inpaint edit)"
+ }
+ },
+ "16": {
+ "class_type": "Krea2OstrisEditModelPatch",
+ "inputs": {
+ "model": [
+ "15",
+ 0
+ ],
+ "kv_cache": true
+ },
+ "_meta": {
+ "title": "Krea 2 Ostris Edit Model Patch (kv_cache on)"
+ }
+ },
+ "20": {
+ "class_type": "TextEncodeKrea2OstrisEdit",
+ "inputs": {
+ "clip": [
+ "11",
+ 0
+ ],
+ "vae": [
+ "12",
+ 0
+ ],
+ "image1": [
+ "6",
+ 0
+ ],
+ "prompt": "A small wooden boat sailing toward the island."
+ },
+ "_meta": {
+ "title": "What goes in the black area"
+ }
+ },
+ "21": {
+ "class_type": "ConditioningZeroOut",
+ "inputs": {
+ "conditioning": [
+ "20",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Conditioning Zero Out (cfg 1)"
+ }
+ },
+ "22": {
+ "class_type": "EmptyLatentImage",
+ "inputs": {
+ "width": [
+ "7",
+ 0
+ ],
+ "height": [
+ "7",
+ 1
+ ],
+ "batch_size": 1
+ },
+ "_meta": {
+ "title": "Empty Latent Image"
+ }
+ },
+ "23": {
+ "class_type": "KSampler",
+ "inputs": {
+ "model": [
+ "16",
+ 0
+ ],
+ "positive": [
+ "20",
+ 0
+ ],
+ "negative": [
+ "21",
+ 0
+ ],
+ "latent_image": [
+ "22",
+ 0
+ ],
+ "seed": 0,
+ "steps": 8,
+ "cfg": 1,
+ "sampler_name": "euler_ancestral",
+ "scheduler": "simple",
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "24": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "23",
+ 0
+ ],
+ "vae": [
+ "12",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "29": {
+ "class_type": "SaveImage",
+ "inputs": {
+ "images": [
+ "24",
+ 0
+ ],
+ "filename_prefix": "fuobe/krea2-inpaint"
+ },
+ "_meta": {
+ "title": "Save Image"
+ }
+ }
+}
diff --git a/scripts/comfy/hand-built/krea2-outpaint.json b/scripts/comfy/hand-built/krea2-outpaint.json
new file mode 100644
index 00000000..acee1da7
--- /dev/null
+++ b/scripts/comfy/hand-built/krea2-outpaint.json
@@ -0,0 +1,274 @@
+{
+ "1": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "input.png"
+ },
+ "_meta": {
+ "title": "Photo (image)"
+ }
+ },
+ "3": {
+ "class_type": "GetImageSize",
+ "inputs": {
+ "image": [
+ "8",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Size to black out"
+ }
+ },
+ "4": {
+ "class_type": "EmptyImage",
+ "inputs": {
+ "width": [
+ "3",
+ 0
+ ],
+ "height": [
+ "3",
+ 1
+ ],
+ "batch_size": 1,
+ "color": 0
+ },
+ "_meta": {
+ "title": "Black"
+ }
+ },
+ "5": {
+ "class_type": "ImageCompositeMasked",
+ "inputs": {
+ "destination": [
+ "8",
+ 0
+ ],
+ "source": [
+ "4",
+ 0
+ ],
+ "x": 0,
+ "y": 0,
+ "resize_source": false,
+ "mask": [
+ "8",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Black border"
+ }
+ },
+ "6": {
+ "class_type": "ImageScaleToTotalPixels",
+ "inputs": {
+ "image": [
+ "5",
+ 0
+ ],
+ "upscale_method": "lanczos",
+ "megapixels": 1,
+ "resolution_steps": 16
+ },
+ "_meta": {
+ "title": "About 1 MP (the add-on's reference limit), sides on the 16-pixel grid"
+ }
+ },
+ "7": {
+ "class_type": "GetImageSize",
+ "inputs": {
+ "image": [
+ "6",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Output size = the reference"
+ }
+ },
+ "8": {
+ "class_type": "ImagePadForOutpaint",
+ "inputs": {
+ "image": [
+ "1",
+ 0
+ ],
+ "left": 256,
+ "top": 256,
+ "right": 256,
+ "bottom": 256,
+ "feathering": 0
+ },
+ "_meta": {
+ "title": "Grow the canvas (pads in the photo's pixels)"
+ }
+ },
+ "10": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "krea2_turbo_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model (Krea 2 Turbo)"
+ }
+ },
+ "11": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
+ "type": "krea2",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 4B, krea2)"
+ }
+ },
+ "12": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "qwen_image_vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "15": {
+ "class_type": "LoraLoaderModelOnly",
+ "inputs": {
+ "model": [
+ "10",
+ 0
+ ],
+ "lora_name": "krea2_inpaint_edit.safetensors",
+ "strength_model": 1
+ },
+ "_meta": {
+ "title": "Load LoRA (Krea 2 inpaint edit)"
+ }
+ },
+ "16": {
+ "class_type": "Krea2OstrisEditModelPatch",
+ "inputs": {
+ "model": [
+ "15",
+ 0
+ ],
+ "kv_cache": true
+ },
+ "_meta": {
+ "title": "Krea 2 Ostris Edit Model Patch (kv_cache on)"
+ }
+ },
+ "20": {
+ "class_type": "TextEncodeKrea2OstrisEdit",
+ "inputs": {
+ "clip": [
+ "11",
+ 0
+ ],
+ "vae": [
+ "12",
+ 0
+ ],
+ "image1": [
+ "6",
+ 0
+ ],
+ "prompt": "A small wooden boat sailing toward the island."
+ },
+ "_meta": {
+ "title": "What goes in the black area"
+ }
+ },
+ "21": {
+ "class_type": "ConditioningZeroOut",
+ "inputs": {
+ "conditioning": [
+ "20",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Conditioning Zero Out (cfg 1)"
+ }
+ },
+ "22": {
+ "class_type": "EmptyLatentImage",
+ "inputs": {
+ "width": [
+ "7",
+ 0
+ ],
+ "height": [
+ "7",
+ 1
+ ],
+ "batch_size": 1
+ },
+ "_meta": {
+ "title": "Empty Latent Image"
+ }
+ },
+ "23": {
+ "class_type": "KSampler",
+ "inputs": {
+ "model": [
+ "16",
+ 0
+ ],
+ "positive": [
+ "20",
+ 0
+ ],
+ "negative": [
+ "21",
+ 0
+ ],
+ "latent_image": [
+ "22",
+ 0
+ ],
+ "seed": 0,
+ "steps": 8,
+ "cfg": 1,
+ "sampler_name": "euler_ancestral",
+ "scheduler": "simple",
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "24": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "23",
+ 0
+ ],
+ "vae": [
+ "12",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "29": {
+ "class_type": "SaveImage",
+ "inputs": {
+ "images": [
+ "24",
+ 0
+ ],
+ "filename_prefix": "fuobe/krea2-outpaint"
+ },
+ "_meta": {
+ "title": "Save Image"
+ }
+ }
+}
diff --git a/scripts/comfy/hand-built/krea2-realism-t2i.json b/scripts/comfy/hand-built/krea2-realism-t2i.json
new file mode 100644
index 00000000..705fcdcb
--- /dev/null
+++ b/scripts/comfy/hand-built/krea2-realism-t2i.json
@@ -0,0 +1,141 @@
+{
+ "3": {
+ "class_type": "KSampler",
+ "inputs": {
+ "model": [
+ "15",
+ 0
+ ],
+ "positive": [
+ "6",
+ 0
+ ],
+ "negative": [
+ "13",
+ 0
+ ],
+ "latent_image": [
+ "5",
+ 0
+ ],
+ "seed": 0,
+ "steps": 6,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "5": {
+ "class_type": "EmptyLatentImage",
+ "inputs": {
+ "width": 1536,
+ "height": 1536,
+ "batch_size": 1
+ },
+ "_meta": {
+ "title": "Empty Latent Image"
+ }
+ },
+ "6": {
+ "class_type": "CLIPTextEncode",
+ "inputs": {
+ "clip": [
+ "11",
+ 0
+ ],
+ "text": "An editorial photograph of a woman in a camel wool coat on a sunlit city street, late afternoon light, natural skin texture."
+ },
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "8": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "3",
+ 0
+ ],
+ "vae": [
+ "12",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "10": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "krea2_turbo_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model (Krea 2 Turbo)"
+ }
+ },
+ "11": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
+ "type": "krea2",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 4B, krea2)"
+ }
+ },
+ "12": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "qwen_image_vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "13": {
+ "class_type": "ConditioningZeroOut",
+ "inputs": {
+ "conditioning": [
+ "6",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Conditioning Zero Out (cfg 1)"
+ }
+ },
+ "15": {
+ "class_type": "LoraLoaderModelOnly",
+ "inputs": {
+ "model": [
+ "10",
+ 0
+ ],
+ "lora_name": "Krea2-realism-V2.safetensors",
+ "strength_model": 1
+ },
+ "_meta": {
+ "title": "Load LoRA (Krea 2 Realism V2)"
+ }
+ },
+ "29": {
+ "class_type": "SaveImage",
+ "inputs": {
+ "images": [
+ "8",
+ 0
+ ],
+ "filename_prefix": "fuobe/krea2-realism-t2i"
+ },
+ "_meta": {
+ "title": "Save Image"
+ }
+ }
+}
diff --git a/scripts/comfy/hand-built/krea2-turbo-i2i.json b/scripts/comfy/hand-built/krea2-turbo-i2i.json
new file mode 100644
index 00000000..b61dacc4
--- /dev/null
+++ b/scripts/comfy/hand-built/krea2-turbo-i2i.json
@@ -0,0 +1,156 @@
+{
+ "1": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "input.png"
+ },
+ "_meta": {
+ "title": "Picture to redraw (image)"
+ }
+ },
+ "2": {
+ "class_type": "ImageScaleToTotalPixels",
+ "inputs": {
+ "image": [
+ "1",
+ 0
+ ],
+ "upscale_method": "lanczos",
+ "megapixels": 2,
+ "resolution_steps": 16
+ },
+ "_meta": {
+ "title": "About 2 MP (Krea 2's size), sides on the 16-pixel grid"
+ }
+ },
+ "3": {
+ "class_type": "KSampler",
+ "inputs": {
+ "model": [
+ "10",
+ 0
+ ],
+ "positive": [
+ "6",
+ 0
+ ],
+ "negative": [
+ "13",
+ 0
+ ],
+ "latent_image": [
+ "16",
+ 0
+ ],
+ "seed": 0,
+ "steps": 8,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 0.6
+ },
+ "_meta": {
+ "title": "KSampler (denoise = how much the picture changes)"
+ }
+ },
+ "6": {
+ "class_type": "CLIPTextEncode",
+ "inputs": {
+ "clip": [
+ "11",
+ 0
+ ],
+ "text": "The same photo with natural skin texture and soft daylight."
+ },
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "8": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "3",
+ 0
+ ],
+ "vae": [
+ "12",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "10": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "krea2_turbo_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model (Krea 2 Turbo)"
+ }
+ },
+ "11": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
+ "type": "krea2",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 4B, krea2)"
+ }
+ },
+ "12": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "qwen_image_vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "13": {
+ "class_type": "ConditioningZeroOut",
+ "inputs": {
+ "conditioning": [
+ "6",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Conditioning Zero Out (cfg 1)"
+ }
+ },
+ "16": {
+ "class_type": "VAEEncode",
+ "inputs": {
+ "pixels": [
+ "2",
+ 0
+ ],
+ "vae": [
+ "12",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Encode"
+ }
+ },
+ "29": {
+ "class_type": "SaveImage",
+ "inputs": {
+ "images": [
+ "8",
+ 0
+ ],
+ "filename_prefix": "fuobe/krea2-turbo-i2i"
+ },
+ "_meta": {
+ "title": "Save Image"
+ }
+ }
+}
diff --git a/scripts/comfy/hand-built/krea2-turbo-t2i.json b/scripts/comfy/hand-built/krea2-turbo-t2i.json
new file mode 100644
index 00000000..c72276c9
--- /dev/null
+++ b/scripts/comfy/hand-built/krea2-turbo-t2i.json
@@ -0,0 +1,127 @@
+{
+ "3": {
+ "class_type": "KSampler",
+ "inputs": {
+ "model": [
+ "10",
+ 0
+ ],
+ "positive": [
+ "6",
+ 0
+ ],
+ "negative": [
+ "13",
+ 0
+ ],
+ "latent_image": [
+ "5",
+ 0
+ ],
+ "seed": 0,
+ "steps": 8,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "5": {
+ "class_type": "EmptyLatentImage",
+ "inputs": {
+ "width": 1024,
+ "height": 1024,
+ "batch_size": 1
+ },
+ "_meta": {
+ "title": "Empty Latent Image"
+ }
+ },
+ "6": {
+ "class_type": "CLIPTextEncode",
+ "inputs": {
+ "clip": [
+ "11",
+ 0
+ ],
+ "text": "An editorial photograph of a woman in a camel wool coat on a sunlit city street, late afternoon light, natural skin texture."
+ },
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "8": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "3",
+ 0
+ ],
+ "vae": [
+ "12",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "10": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "krea2_turbo_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model (Krea 2 Turbo)"
+ }
+ },
+ "11": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
+ "type": "krea2",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP (Qwen3-VL 4B, krea2)"
+ }
+ },
+ "12": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "qwen_image_vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "13": {
+ "class_type": "ConditioningZeroOut",
+ "inputs": {
+ "conditioning": [
+ "6",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Conditioning Zero Out (cfg 1)"
+ }
+ },
+ "29": {
+ "class_type": "SaveImage",
+ "inputs": {
+ "images": [
+ "8",
+ 0
+ ],
+ "filename_prefix": "fuobe/krea2-turbo-t2i"
+ },
+ "_meta": {
+ "title": "Save Image"
+ }
+ }
+}
diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjs
index 444f1ddb..57e8ed39 100644
--- a/scripts/comfy/library.spec.mjs
+++ b/scripts/comfy/library.spec.mjs
@@ -138,6 +138,10 @@ export const CUSTOM_NODE_REPOS = {
// validation server (entries list them with `packs`); install-comfyui.sh pins both.
h3_character_swap: 'https://github.com/akatz-labs/h3-character-swap-tool/tree/0670e4fdf95adf2262caa4b81afed2a9c4ae4b7b/worker_nodes/h3_character_swap',
'h3-relay': 'https://github.com/akatz-ai/h3-relay/tree/e2a7665b6eb8ea37a88c0de2c9c6b69a8f7c9220',
+ // Krea 2 edits (the owner's SOTA families, 2026-10-31): the Krea 2 Identity Edit nodes, and Ostris' edit nodes that
+ // Krea 2 Inpaint needs (not installed on the validation server: krea2-inpaint / krea2-outpaint list it with `packs`).
+ 'comfyui-krea2edit': 'https://github.com/lbouaraba/comfyui-krea2edit',
+ 'ComfyUI-Krea2-Ostris-Edit': 'https://github.com/ostris/ComfyUI-Krea2-Ostris-Edit',
};
// Node classes of the packs entries list in `packs` (packs the validation server doesn't have installed): the build
@@ -145,6 +149,9 @@ export const CUSTOM_NODE_REPOS = {
export const PACK_CLASSES = {
h3_character_swap: /^H3CharacterSwap/,
'h3-relay': /^(H3Relay|LabsH3)/,
+ // Installed on the validation server, but a ComfyUI with comfyui-workflow-encrypt names that pack as these classes' module.
+ 'comfyui-krea2edit': /^Krea2Edit(ModelPatch|GroundedEncode)$/,
+ 'ComfyUI-Krea2-Ostris-Edit': /^(TextEncodeKrea2OstrisEdit|Krea2OstrisEditModelPatch)$/,
};
// Model download locations for files that the source workflow does not annotate
@@ -217,8 +224,8 @@ export const KNOWN_MODELS = {
'flux-2-klein-4b-fp8.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/black-forest-labs/FLUX.2-klein-4b-fp8/resolve/main/flux-2-klein-4b-fp8.safetensors' },
'flux2-vae.safetensors': { folder: 'vae', url: 'https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors' },
'tryon-klein-4b.safetensors': { folder: 'loras', url: 'https://huggingface.co/xocialize/tryon-FLUX.2-klein-4B-lora/resolve/main/tryon-klein-4b.safetensors' },
- 'krea2_turbo_int8_convrot.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/Comfy-Org/Krea-2/resolve/main/diffusion_models/krea2_turbo_int8_convrot.safetensors' },
- 'qwen3vl_4b_fp8_scaled.safetensors': { folder: 'text_encoders', url: 'https://huggingface.co/Comfy-Org/Krea-2/resolve/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors' },
+ 'krea2_turbo_int8_convrot.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/Comfy-Org/Krea-2/resolve/main/diffusion_models/krea2_turbo_int8_convrot.safetensors', variants: ['krea2_turbo_fp8_scaled.safetensors', 'krea2_turbo_bf16.safetensors'] },
+ 'qwen3vl_4b_fp8_scaled.safetensors': { folder: 'text_encoders', url: 'https://huggingface.co/Comfy-Org/Krea-2/resolve/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors', variants: ['qwen3vl_4b_int8_convrot.safetensors', 'qwen3vl_4b_bf16.safetensors'] },
'krea2_style_reference.safetensors': { folder: 'loras', url: 'https://huggingface.co/Comfy-Org/Krea-2/resolve/main/loras/krea2_style_reference.safetensors' },
'flux1-dev-fp8.safetensors': { folder: 'checkpoints', url: 'https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors' },
'uso-flux1-dit-lora-v1.safetensors': { folder: 'loras', url: 'https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/main/split_files/loras/uso-flux1-dit-lora-v1.safetensors' },
@@ -264,6 +271,12 @@ export const KNOWN_MODELS = {
// round 4 (r4/video-finish): the chunked SeedVR2 graph is hand-built, so its files are named here (same files as the template).
'seedvr2_3b_int8_convrot.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_int8_convrot.safetensors' },
'seedvr2_ema_vae_fp16.safetensors': { folder: 'vae', url: 'https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/vae/seedvr2_ema_vae_fp16.safetensors' },
+ // owner's SOTA families (2026-10-31): Krea 2. The base files are the Comfy-Org/Krea-2 rows above; these are the LoRAs of
+ // the owner's workflows (revisions, sizes and SHA-256 in model-pins.json, from the Hugging Face API).
+ 'Krea2-realism-V2.safetensors': { folder: 'loras', url: 'https://huggingface.co/RudySen/Krea2-realism-V2/resolve/main/Krea2-realism-V2.safetensors' },
+ 'krea2_general_edit_v2.safetensors': { folder: 'loras', url: 'https://huggingface.co/conradlocke/krea2-identity-edit/resolve/main/krea2_general_edit_v2.safetensors' },
+ 'krea2_identity_edit_v2.safetensors': { folder: 'loras', url: 'https://huggingface.co/conradlocke/krea2-identity-edit/resolve/main/krea2_identity_edit_v2.safetensors' },
+ 'krea2_inpaint_edit.safetensors': { folder: 'loras', url: 'https://huggingface.co/Cierpliwy/krea2-inpaint-edit/resolve/main/v1_512/krea2_inpaint_edit.safetensors' },
};
const WAN_NEG_EN =
@@ -2111,6 +2124,138 @@ export const SPEC = [
'The look\'s LoRAs are injected after the UNETLoader (LoraLoaderModelOnly), as on z-image-turbo-t2i. The result keeps the picture\'s shape.',
},
+ // ---- Owner's SOTA image families: Krea 2 (2026-10-31). Every graph runs Krea 2 Turbo (krea2_turbo_int8_convrot), Qwen3-VL 4B
+ // (CLIPLoader type krea2) and the Qwen-Image VAE; Krea's in-graph "Refine prompt" TextGenerate is left out (Fuobe's Enhance does it).
+ {
+ id: 'krea2-realism-t2i',
+ title: 'Krea 2 Realism: Krea 2 Turbo + the Realism V2 LoRA, 6 steps',
+ capability: 't2i',
+ handBuilt: 'hand-built/krea2-realism-t2i.json',
+ bindings: {
+ prompt: [b('6', 'text')], width: [b('5', 'width')], height: [b('5', 'height')], seed: [b('3', 'seed')], steps: [b('3', 'steps')],
+ loraStrength: [b('15', 'strength_model')],
+ },
+ outputs: [{ node: '29', kind: 'image' }],
+ limits: { maxWidth: 2048, maxHeight: 2048, dimensionMultiple: 16 },
+ vramGb: 20,
+ license: 'Krea 2 Community License (free under US$1M yearly revenue; enterprise terms above it); Krea2-realism-V2 LoRA MIT',
+ notes:
+ 'The owner\'s image_krea2_turbo_t2i_int8.json (the official Krea 2 Turbo graph) with LoraLoaderModelOnly Krea2-realism-V2 at 1.0 after the UNET, run as the realism creator says: ' +
+ 'euler / simple, 6 steps (4-8), cfg 1 with ConditioningZeroOut, about 2 MP (1 MP gets noisy), detailed natural-language prose. Removed: the style-LoRA and Refine-prompt switches, ' +
+ 'the ResolutionSelector (explicit width/height, multiple of 16). The preview pipeline rendered these settings with the merged civitai realism checkpoint, which isn\'t on Hugging Face; ' +
+ 'the LoRA on the Comfy-Org Turbo is not rendered yet.',
+ },
+ {
+ id: 'krea2-turbo-t2i',
+ title: 'Krea 2 Turbo Text to Image (8 steps)',
+ capability: 't2i',
+ handBuilt: 'hand-built/krea2-turbo-t2i.json',
+ bindings: { prompt: [b('6', 'text')], width: [b('5', 'width')], height: [b('5', 'height')], seed: [b('3', 'seed')], steps: [b('3', 'steps')] },
+ outputs: [{ node: '29', kind: 'image' }],
+ limits: { maxWidth: 2048, maxHeight: 2048, dimensionMultiple: 16 },
+ vramGb: 20,
+ license: 'Krea 2 Community License (free under US$1M yearly revenue; enterprise terms above it)',
+ notes:
+ 'The owner\'s image_krea2_turbo_t2i_int8.json as saved: euler / simple, 8 steps, cfg 1 with ConditioningZeroOut, 1024x1024 by default. Removed: the style-LoRA and Refine-prompt switches ' +
+ '(the user\'s LoRAs attach after the UNET as on every graph), the ResolutionSelector (explicit width/height, multiple of 16).',
+ },
+ {
+ id: 'krea2-edit-general',
+ title: 'Krea 2 Edit: Krea 2 Turbo + the General Edit V2 LoRA, instruction edits with an optional second photo',
+ capability: 'edit',
+ handBuilt: 'hand-built/krea2-edit-general.json',
+ bindings: {
+ prompt: [b('84', 'prompt')], image: [b('72', 'image')], image2: [b('90', 'image')], width: [b('82', 'width')], height: [b('82', 'height')],
+ seed: [b('53', 'seed')], steps: [b('53', 'steps')],
+ },
+ outputs: [{ node: '29', kind: 'image' }],
+ limits: { maxWidth: 2048, maxHeight: 2048, dimensionMultiple: 16 },
+ vramGb: 20,
+ license:
+ 'Krea 2 Community License (free under US$1M yearly revenue; enterprise terms above it); the Krea 2 General Edit V2 LoRA is NON-COMMERCIAL (commercial use needs a licence from its author)',
+ notes:
+ 'The owner\'s "Krea2 Image Edit.json" (the comfyui-krea2edit graph) with the pack\'s V2 LoRA krea2_general_edit_v2 at 1.0 → Krea2EditModelPatch (the photo VAE-encoded as source_latent, ' +
+ 'the pixel path vae + source_image, target_latent = the KSampler\'s latent, fit_mode fit, ref_boost 4, ref_boost_a 1, both references aligned) → Krea2EditGroundedEncode with the instruction ' +
+ '(grounding_px 768) as the positive and an empty one on the same photo as the negative; EmptySD3LatentImage; KSampler 8 steps (the V2 card; the owner\'s v1.2 graph used 10), cfg 1, euler, simple. ' +
+ 'image2 is the person for "put this person in the scene" (the group the owner ships bypassed): its loader goes when no second photo is given. The output follows image 1 ("auto") or the shape asked for; ' +
+ '1 MP is the sweet spot. Removals need the Raw model at cfg 3 (pack README): Turbo at cfg 1 tends to re-render the subject. Not rendered with the V2 LoRA yet.',
+ },
+ {
+ id: 'krea2-edit-identity',
+ title: 'Krea 2 Identity Edit: Krea 2 Turbo + the Identity Edit V2 LoRA, a person restaged from one photo',
+ capability: 'edit',
+ handBuilt: 'hand-built/krea2-edit-identity.json',
+ bindings: {
+ prompt: [b('84', 'prompt')], image: [b('72', 'image')], image2: [b('90', 'image')], width: [b('82', 'width')], height: [b('82', 'height')],
+ seed: [b('53', 'seed')], steps: [b('53', 'steps')],
+ },
+ outputs: [{ node: '29', kind: 'image' }],
+ limits: { maxWidth: 2048, maxHeight: 2048, dimensionMultiple: 16 },
+ vramGb: 20,
+ license:
+ 'Krea 2 Community License (free under US$1M yearly revenue; enterprise terms above it); the Krea 2 Identity Edit V2 LoRA is NON-COMMERCIAL (commercial use needs a licence from its author)',
+ notes:
+ 'krea2-edit-general\'s graph (the owner\'s "Krea2 Image Edit.json") with krea2_identity_edit_v2 at 1.0, ref_boost 2 and the person aligned (trained): a new place, pose or outfit, the same face. ' +
+ 'For a distinctive face, end the instruction with "Preserve the exact facial identity - distinguishing features: ..." (pack notes). image2 = a second person or the person to put in the scene, ' +
+ 'dropped when not given. 8 steps, cfg 1, euler, simple. Not rendered with the V2 LoRA yet.',
+ },
+ {
+ id: 'krea2-turbo-i2i',
+ title: 'Krea 2 Turbo image to image (your picture redrawn at the strength you pick)',
+ capability: 'edit',
+ handBuilt: 'hand-built/krea2-turbo-i2i.json',
+ bindings: {
+ image: [b('1', 'image')], megapixels: [b('2', 'megapixels')], prompt: [b('6', 'text')], seed: [b('3', 'seed')], steps: [b('3', 'steps')],
+ strength: [b('3', 'denoise')],
+ },
+ outputs: [{ node: '29', kind: 'image' }],
+ limits: { maxWidth: 2048, maxHeight: 2048, dimensionMultiple: 16 },
+ vramGb: 20,
+ license: 'Krea 2 Community License (free under US$1M yearly revenue; enterprise terms above it)',
+ notes:
+ 'The base-latent path of the owner\'s "krea2SFWNSFWUncensoredImageTo_v10 - steps fixed.json", built like z-image-turbo-i2i: the picture scaled to about 2 MP on the 16-pixel grid (the workflow scales to 1.98 MP), ' +
+ 'VAE-encoded, then Krea 2 Turbo\'s sampler (8 steps, cfg 1, euler, simple: the workflow\'s "linear/euler, simple, 8 steps" in core samplers) at denoise = strength (0.6). Not used: its image-to-prompt and ' +
+ 'prompt-enhancer branches, the abliterated text encoder, the NSFW LoRA, the RES4LYF second pass and the SeedVR2 upscaler. The result keeps the picture\'s shape. Not rendered yet.',
+ },
+ {
+ id: 'krea2-inpaint',
+ title: 'Krea 2 Inpaint: the masked area painted by the Krea 2 inpaint-edit LoRA (Ostris edit nodes)',
+ capability: 'inpaint',
+ handBuilt: 'hand-built/krea2-inpaint.json',
+ bindings: { prompt: [b('20', 'prompt')], image: [b('1', 'image')], mask: [b('2', 'image')], seed: [b('23', 'seed')], steps: [b('23', 'steps')] },
+ outputs: [{ node: '29', kind: 'image' }],
+ limits: { maxWidth: 2048, maxHeight: 2048 },
+ packs: ['ComfyUI-Krea2-Ostris-Edit'],
+ vramGb: 20,
+ license: 'Krea 2 Community License (free under US$1M yearly revenue; enterprise terms above it); the inpaint-edit LoRA by Cierpliwy under the same licence; ComfyUI-Krea2-Ostris-Edit MIT',
+ notes:
+ 'The edit stage of Cierpliwy\'s krea2-inpaint-workflows examples (the owner\'s krea2-inpaint-workflows/): Krea 2 Turbo → LoRA krea2_inpaint_edit at 1.0 (the v1 512 file on the owner\'s PC; ' +
+ 'the model card now recommends krea2_inpaint_edit_v2_17500) → Krea2OstrisEditModelPatch with kv_cache on (the card: needed for correct masked editing); TextEncodeKrea2OstrisEdit (clip, vae, image1 = ' +
+ 'the photo with the masked area black) as the positive, ConditioningZeroOut as the negative; EmptyLatentImage at the reference\'s size; KSampler 8 steps, cfg 1, euler_ancestral, simple. ' +
+ 'mask = separate PNG, red channel, white = paint here (the flux1-fill-inpaint convention). The reference is scaled to about 1 MP on the 16-pixel grid (the add-on\'s limit until ostris PR #10); ' +
+ 'the whole picture is redrawn, nothing is pasted back. Needs ComfyUI-Krea2-Ostris-Edit, not installed on the validation server. Not rendered yet.',
+ },
+ {
+ id: 'krea2-outpaint',
+ title: 'Krea 2 Expand: the canvas grown on black and filled by the Krea 2 inpaint-edit LoRA (Ostris edit nodes)',
+ capability: 'outpaint',
+ handBuilt: 'hand-built/krea2-outpaint.json',
+ bindings: {
+ prompt: [b('20', 'prompt')], image: [b('1', 'image')], padLeft: [b('8', 'left')], padTop: [b('8', 'top')], padRight: [b('8', 'right')], padBottom: [b('8', 'bottom')],
+ seed: [b('23', 'seed')], steps: [b('23', 'steps')],
+ },
+ outputs: [{ node: '29', kind: 'image' }],
+ limits: { maxWidth: 2048, maxHeight: 2048, padMultiple: 8 },
+ packs: ['ComfyUI-Krea2-Ostris-Edit'],
+ vramGb: 20,
+ license: 'Krea 2 Community License (free under US$1M yearly revenue; enterprise terms above it); the inpaint-edit LoRA by Cierpliwy under the same licence; ComfyUI-Krea2-Ostris-Edit MIT',
+ notes:
+ 'krea2-inpaint\'s edit stage on a bigger canvas, as in the add-on\'s outpaint_example: the photo on black grown by padLeft/padTop/padRight/padBottom px (ImagePadForOutpaint with feathering 0, ' +
+ 'then black over its mask: a hard edge like the example\'s SolidMask canvas), scaled to about 1 MP, then the same LoRA, patch (kv_cache on) and 8 euler_ancestral steps. Default pads 256 px a side ' +
+ '(the example grows a 512 px picture by a quarter of its side on each). The prompt describes the whole scene. The v1 512 LoRA was trained without outpainting masks (v2 adds them, model card). ' +
+ 'Needs ComfyUI-Krea2-Ostris-Edit. Not rendered yet.',
+ },
+
// ---- Fuobe DoP (Originals O4): LTX-2.3 camera moves, FPV and transitions with LoRAs ------------
{
id: 'ltx23-i2v-lora',
diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.ts
index 7ba5053a..08d8dfaa 100644
--- a/src/lib/catalog/models.ts
+++ b/src/lib/catalog/models.ts
@@ -56,6 +56,101 @@ type OpenSpec = Omit<ModelDef, "engine" | "badges"> & { badges?: ModelDef["badge
const o = (m: OpenSpec): ModelDef => ({ ...m, engine: "open", badges: ["open", ...(m.badges ?? [])] });
const open: ModelDef[] = [
+ // ---- Krea 2 text to image (B-K)
+ o({
+ id: "oss-krea2-realism",
+ name: "Krea 2 Realism",
+ vendor: "Krea",
+ family: "krea",
+ kind: "image",
+ tagline: "Natural skin, light and faces from detailed prose · 20 GB GPU · Krea 2 Community License",
+ badges: ["new", "top"],
+ routes: [comfy("t2i", "krea2-realism-t2i", "Krea 2 Turbo + the Realism V2 LoRA, 6 steps")],
+ options: {
+ aspectRatios: IMG_AR,
+ resolutions: ["1K", "1.5K", "2K"],
+ seed: true,
+ sliders: [{ param: "loraStrength", label: "Realism", min: 0, max: 2, step: 0.05, default: 1 }],
+ },
+ // Krea 2 makes about 2 MP; at 1 MP it gets noisy.
+ defaults: { aspectRatio: "1:1", resolution: "1.5K" },
+ }),
+ o({
+ id: "oss-krea2-turbo",
+ name: "Krea 2 Turbo",
+ vendor: "Krea",
+ family: "krea",
+ kind: "image",
+ tagline: "Krea 2 in 8 steps: photos and illustrations from prose · 20 GB GPU · Krea 2 Community License",
+ badges: ["new", "fast"],
+ routes: [comfy("t2i", "krea2-turbo-t2i", "8 steps")],
+ options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K", "2K"], seed: true },
+ defaults: { aspectRatio: "1:1", resolution: "1K" },
+ }),
+
+ // ---- Krea 2 edits (B-K)
+ o({
+ id: "oss-krea2-edit",
+ name: "Krea 2 Edit",
+ vendor: "Krea",
+ family: "krea",
+ kind: "image",
+ tagline: "Instruction edits that keep the picture: relight, recolour, add, remove, restyle; a second photo puts a person in the scene · 20 GB GPU · non-commercial LoRA",
+ badges: ["new", "top"],
+ routes: [comfy("edit", "krea2-edit-general", "General Edit V2 LoRA, 8 steps; image 2 = a person to put in the scene")],
+ options: {
+ aspectRatios: ["auto", ...IMG_AR],
+ resolutions: ["1K", "1.5K"],
+ maxImages: 2,
+ seed: true,
+ imageLabels: ["photo to edit", "a person to put in it (optional)"],
+ },
+ defaults: { aspectRatio: "auto", resolution: "1K" },
+ }),
+ o({
+ id: "oss-krea2-identity-edit",
+ name: "Krea 2 Identity Edit",
+ vendor: "Krea",
+ family: "krea",
+ kind: "image",
+ tagline: "Restages a person from one photo: new place, pose or outfit, same face · 20 GB GPU · non-commercial LoRA",
+ badges: ["new"],
+ routes: [comfy("edit", "krea2-edit-identity", "Identity Edit V2 LoRA, 8 steps; image 2 = a second person")],
+ options: {
+ aspectRatios: ["auto", ...IMG_AR],
+ resolutions: ["1K", "1.5K"],
+ maxImages: 2,
+ seed: true,
+ imageLabels: ["photo of the person", "a second person (optional)"],
+ },
+ defaults: { aspectRatio: "auto", resolution: "1K" },
+ }),
+ o({
+ id: "oss-krea2-i2i",
+ name: "Krea 2 Turbo · Image to image",
+ vendor: "Krea",
+ family: "krea",
+ kind: "image",
+ tagline: "Your picture redrawn in Krea 2's look at the strength you pick · 20 GB GPU · Krea 2 Community License",
+ badges: ["new"],
+ routes: [comfy("edit", "krea2-turbo-i2i", "about 2 MP, keeps the picture's shape")],
+ options: { maxImages: 1, seed: true, sliders: [{ param: "strength", label: "Change", min: 0.1, max: 1, step: 0.05, default: 0.6 }] },
+ }),
+ o({
+ id: "oss-krea2-inpaint",
+ name: "Krea 2 Inpaint",
+ vendor: "Krea",
+ family: "krea",
+ kind: "image",
+ tagline: "Paints the masked area or extends the canvas · 20 GB GPU · needs the Krea 2 Ostris Edit add-on",
+ badges: ["new"],
+ routes: [
+ comfy("inpaint", "krea2-inpaint", "the masked area made black, then the inpaint-edit LoRA paints it"),
+ comfy("outpaint", "krea2-outpaint", "the canvas grown on black, then the inpaint-edit LoRA fills it"),
+ ],
+ options: { maxImages: 1, seed: true },
+ }),
+
// ---------------- Image
o({
id: "oss-z-image-turbo",
diff --git a/src/lib/comfy.ts b/src/lib/comfy.ts
index 998d69d4..0f98dd24 100644
--- a/src/lib/comfy.ts
+++ b/src/lib/comfy.ts
@@ -641,12 +641,13 @@ export function dropLoadedSound(wf: ComfyWorkflow, loaders: string[], keep: stri
/**
* An optional upload with no file (a side of a multi-view 3D model nobody photographed): the loader goes, with
- * every node downstream of it, up to the inputs of `into` nodes (Pixal3DMultiViewConditioning's "left"), which
- * are dropped. Null when its branch doesn't end in such an input, or reaches an output node in `keep` (then the
- * upload can't simply be left out).
+ * every node downstream of it, up to the inputs of `into` nodes (Pixal3DMultiViewConditioning's "left"; one class
+ * or a set of them), which are dropped. Null when its branch doesn't end in such an input, or reaches an output node
+ * in `keep` (then the upload can't simply be left out).
*/
-export function dropBranch(wf: ComfyWorkflow, loaderId: string, into: string, keep: string[] = []): ComfyWorkflow | null {
+export function dropBranch(wf: ComfyWorkflow, loaderId: string, into: string | ReadonlySet<string>, keep: string[] = []): ComfyWorkflow | null {
if (!wf[loaderId]) return null;
+ const isInto = (cls: string) => (typeof into === "string" ? cls === into : into.has(cls));
const gone = new Set([loaderId]);
const cut: { id: string; input: string }[] = [];
for (const queue = [loaderId]; queue.length; ) {
@@ -654,7 +655,7 @@ export function dropBranch(wf: ComfyWorkflow, loaderId: string, into: string, ke
for (const [cid, n] of Object.entries(wf)) {
for (const [input, v] of Object.entries(n.inputs)) {
if (!isLinkValue(v) || v[0] !== id) continue;
- if (n.class_type === into) cut.push({ id: cid, input });
+ if (isInto(n.class_type)) cut.push({ id: cid, input });
else if (keep.includes(cid)) return null;
else if (!gone.has(cid)) {
gone.add(cid);
diff --git a/src/lib/licences.ts b/src/lib/licences.ts
index 345468a9..12fd4f30 100644
--- a/src/lib/licences.ts
+++ b/src/lib/licences.ts
@@ -437,6 +437,19 @@ export const NODE_PACKS: NodePack[] = [
...GPL,
note: "H3 Relay 2.0 (Sendy Software LLC and contributors); GPL-3.0 code, vendored Context Loop and Spectrum GPL-3.0. Opt-in (H3_RELAY=1): it registers HTTP routes when it loads",
}),
+ // Krea 2's edits (the owner's SOTA image families, 2026-10-31).
+ pack("comfyui-krea2edit", "https://github.com/lbouaraba/comfyui-krea2edit", {
+ name: "Apache-2.0",
+ class: "commercial",
+ url: SPDX("Apache-2.0"),
+ note: "Krea 2 Identity Edit's nodes (Krea 2 Edit and Identity Edit); Apache-2.0 code. The V2 edit LoRAs they run are non-commercial without a licence from their author",
+ }),
+ pack("ComfyUI-Krea2-Ostris-Edit", "https://github.com/ostris/ComfyUI-Krea2-Ostris-Edit", {
+ name: "MIT",
+ class: "commercial",
+ url: SPDX("MIT"),
+ note: "Ostris' Krea 2 edit nodes (Krea 2 Inpaint); MIT code. The inpaint LoRA it runs is under the Krea 2 Community License",
+ }),
];
export const nodePack = (name: string): NodePack | undefined => NODE_PACKS.find((p) => p.name === name);
diff --git a/src/server/providers/comfyui.ts b/src/server/providers/comfyui.ts
index 26407948..59789169 100644
--- a/src/server/providers/comfyui.ts
+++ b/src/server/providers/comfyui.ts
@@ -662,6 +662,13 @@ const SLOT_RULES: Record<string, { reuse?: boolean; required?: string[]; hints?:
"image-to-3d-trellis2-multiview": { hints: { image: "Add a photo of the front" }, views: { sides: ["front", "left", "back", "right"], into: "Pixal3DMultiViewConditioning" } },
};
+/**
+ * Encoders that take their extra references as optional inputs (Qwen-Image 2.1's and FIBO 2's image list, Krea 2 Edit's
+ * person): a reference left out goes with the nodes only it feeds, and the encoder runs on the ones it was given.
+ * Slots drop from the last, so an encoder's numbered inputs never have a gap.
+ */
+const OPTIONAL_REFERENCE_INPUTS: ReadonlySet<string> = new Set(["TextEncodeQwenImage21", "TextEncodeFibo2", "Krea2EditModelPatch", "Krea2EditGroundedEncode"]);
+
/** Uploads that are sides of one object (image = the first side, image2 the second…), and the node they all go into. */
interface ViewSlots {
sides: string[];
@@ -1220,8 +1227,9 @@ export async function prepareWorkflow(endpointTemplate: string, input: GenInput,
values.duration = Math.round((clipLength ?? (Math.max(...tracks) || 600)) * 100) / 100 + 0.5; // the mux trims it to the picture
}
- // Reference images the user left out: dropped from a FLUX.2 reference chain, else the previous image
- // again where that's harmless (style boards, multi-reference edits), else a clear "add …" message.
+ // Reference images the user left out: dropped from a FLUX.2 reference chain or from an encoder that takes them as
+ // optional inputs, else the previous image again where that's harmless (style boards, multi-reference edits), else a
+ // clear "add …" message.
let graph = workflow;
const left: string[] = [...studioLeft];
// A side nobody photographed is left out (its cut-out and crop with it); the front is needed.
@@ -1240,7 +1248,8 @@ export async function prepareWorkflow(endpointTemplate: string, input: GenInput,
for (const [k, prev] of [["image2", "image"], ["image3", "image2"], ["image4", "image3"]] as const) {
if (rules.views || !b[k] || values[k] !== undefined || rules.required?.includes(k) || left.includes(k)) continue;
if (values[prev] === undefined && !left.includes(prev)) continue;
- const bypassed = b[k]!.length === 1 ? bypassReference(graph, b[k]![0].node) : null;
+ const loader = b[k]!.length === 1 ? b[k]![0].node : undefined;
+ const bypassed = loader ? (bypassReference(graph, loader) ?? dropBranch(graph, loader, OPTIONAL_REFERENCE_INPUTS, manifest.outputs.map((o) => o.node))) : null;
if (bypassed) {
graph = bypassed;
left.push(k);
diff --git a/tests/open-krea-2.test.ts b/tests/open-krea-2.test.ts
new file mode 100644
index 00000000..d49ac004
--- /dev/null
+++ b/tests/open-krea-2.test.ts
@@ -0,0 +1,279 @@
+import fs from "node:fs";
+import os from "node:os";
+import path from "node:path";
+import { afterAll, describe, expect, it } from "vitest";
+import type { GenInput, Operation } from "@/lib/catalog/types";
+import type { ComfyWorkflow, Manifest } from "@/lib/comfy";
+
+/**
+ * Krea 2 on the open engine (the owner's SOTA image families, 2026-10-31): Realism and Turbo for text to image, the
+ * General and Identity Edit V2 LoRAs, image to image at a strength, and Inpaint / Expand on Ostris' edit nodes. Each
+ * graph follows the owner's workflow (scripts/comfy/library.spec.mjs notes); the person in Krea 2 Edit is optional.
+ */
+const dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-krea2-"));
+process.env.FUOBE_DATA_DIR = dir;
+process.env.COMFYUI_URL = "http://127.0.0.1:9";
+
+const { prepareWorkflow } = await import("@/server/providers/comfyui");
+const { getModel, getPreset, MODELS } = await import("@/lib/catalog");
+const { planGeneration } = await import("@/lib/catalog/plan");
+const { computeDimensions, dropBranch } = await import("@/lib/comfy");
+const { licenceTerms, NODE_PACKS, workflowLicence } = await import("@/lib/licences");
+const { CUSTOM_NODE_REPOS, KNOWN_MODELS, PACK_CLASSES } = await import("../scripts/comfy/library.spec.mjs");
+
+afterAll(() => fs.rmSync(dir, { recursive: true, force: true }));
+
+const LIBRARY = path.join(process.cwd(), "workflows/comfyui");
+const read = (f: string) => JSON.parse(fs.readFileSync(path.join(LIBRARY, f), "utf8"));
+const manifest = read("manifest.json") as Manifest;
+const entry = (id: string) => manifest.workflows.find((w) => w.id === id)!;
+const handBuilt = (id: string) => JSON.parse(fs.readFileSync(path.join(process.cwd(), "scripts/comfy/hand-built", `${id}.json`), "utf8")) as ComfyWorkflow;
+
+const ROUTES: Record<string, Partial<Record<Operation, string>>> = {
+ "oss-krea2-realism": { t2i: "krea2-realism-t2i" },
+ "oss-krea2-turbo": { t2i: "krea2-turbo-t2i" },
+ "oss-krea2-edit": { edit: "krea2-edit-general" },
+ "oss-krea2-identity-edit": { edit: "krea2-edit-identity" },
+ "oss-krea2-i2i": { edit: "krea2-turbo-i2i" },
+ "oss-krea2-inpaint": { inpaint: "krea2-inpaint", outpaint: "krea2-outpaint" },
+};
+const IDS = Object.values(ROUTES).flatMap((r) => Object.values(r)) as string[];
+
+/** A photo's header size, as the server remembers it for an upload ("auto" keeps its shape). */
+const SIZES: Record<string, { width: number; height: number }> = { "photo.png": { width: 1600, height: 1200 }, "tall.png": { width: 900, height: 1600 } };
+
+async function prepare(id: string, input: GenInput, op: Operation): Promise<ComfyWorkflow> {
+ const { workflow } = await prepareWorkflow(id, { seed: 7, ...input }, { generationId: "g", op, upload: async (_d, _t, name) => `up_${name}`, media: ((name: string) => SIZES[name]) as never });
+ return workflow;
+}
+const plan = (r: Record<string, unknown>) => planGeneration({ feature: "image", ...r } as Parameters<typeof planGeneration>[0], getModel, getPreset);
+
+describe("Krea 2 in the catalog", () => {
+ it.each(Object.entries(ROUTES))("%s routes each operation to its workflow in the library", (id, ops) => {
+ const m = getModel(id)!;
+ expect(m, id).toBeDefined();
+ expect(m).toMatchObject({ engine: "open", vendor: "Krea", family: "krea", kind: "image" });
+ expect(m.badges).toEqual(expect.arrayContaining(["open", "new"]));
+ // Taglines tell people what the GPU and the licence ask of them.
+ expect(m.tagline).toMatch(/20 GB GPU/);
+ expect(Object.fromEntries(m.routes.map((r) => [r.op, r.endpoint]))).toEqual(ops);
+ for (const [op, wid] of Object.entries(ops)) {
+ expect(m.routes.find((r) => r.op === op)!.provider).toBe("comfyui");
+ expect(entry(wid!)?.capability, wid).toBe(op);
+ }
+ });
+
+ it("lists Krea 2 ahead of the older open image models: text to image first, then the edits", () => {
+ const at = (id: string) => MODELS.findIndex((m) => m.id === id);
+ const order = ["oss-krea2-realism", "oss-krea2-turbo", "oss-krea2-edit", "oss-krea2-identity-edit", "oss-krea2-i2i", "oss-krea2-inpaint"].map(at);
+ expect(order.every((n, i) => n >= 0 && (i === 0 || n > order[i - 1]))).toBe(true);
+ for (const old of ["oss-z-image-turbo", "oss-qwen-edit", "oss-flux-fill"]) expect(order[order.length - 1]).toBeLessThan(at(old));
+ expect(getModel("oss-krea2-realism")!.badges).toContain("top");
+ expect(getModel("oss-krea2-edit")!.badges).toContain("top");
+ expect(getModel("oss-krea2-turbo")!.badges).toContain("fast");
+ });
+
+ it("plans text to image, edits, inpaint and expand from what is attached, and asks for what's missing", () => {
+ expect(plan({ modelId: "oss-krea2-realism", prompt: "a woman in a camel coat on a sunlit street" }).op).toBe("t2i");
+ expect(plan({ modelId: "oss-krea2-turbo", prompt: "a lighthouse at dawn" }).op).toBe("t2i");
+ for (const id of ["oss-krea2-edit", "oss-krea2-identity-edit", "oss-krea2-i2i"]) {
+ expect(plan({ modelId: id, prompt: "relight it with warm sunset light", inputs: { images: ["/a.png"] } }).op, id).toBe("edit");
+ expect(() => plan({ modelId: id, prompt: "relight it" }), id).toThrow("Add an image to edit");
+ }
+ expect(plan({ modelId: "oss-krea2-edit", prompt: "put this person at the cafe table", inputs: { images: ["/scene.png", "/person.png"] } }).op).toBe("edit");
+ expect(plan({ modelId: "oss-krea2-inpaint", prompt: "a wooden boat", inputs: { images: ["/a.png"], mask: "/m.png" } }).op).toBe("inpaint");
+ expect(() => plan({ modelId: "oss-krea2-inpaint", prompt: "a wooden boat", inputs: {} })).toThrow(/Add an image/);
+ expect(plan({ modelId: "oss-krea2-inpaint", op: "outpaint", prompt: "the rest of the beach", inputs: { images: ["/a.png"] } }).op).toBe("outpaint");
+ });
+
+ it("shows the value each graph runs with on its sliders, and every slider is a binding", () => {
+ for (const [id, ops] of Object.entries(ROUTES)) {
+ for (const s of getModel(id)!.options.sliders ?? []) {
+ for (const wid of Object.values(ops) as string[]) {
+ const t = entry(wid).bindings[s.param]?.[0];
+ expect(t, `${id} ${s.param} → ${wid}`).toBeDefined();
+ expect(handBuilt(wid)[t!.node].inputs[t!.input], `${id} ${s.param}`).toBe(s.default);
+ }
+ }
+ }
+ expect(getModel("oss-krea2-realism")!.options.sliders).toEqual([expect.objectContaining({ param: "loraStrength", label: "Realism", default: 1 })]);
+ expect(getModel("oss-krea2-i2i")!.options.sliders).toEqual([expect.objectContaining({ param: "strength", label: "Change", default: 0.6 })]);
+ });
+});
+
+describe("Krea 2 graphs", () => {
+ it("Realism: the owner's Turbo graph with the Realism V2 LoRA at 1.0, 6 steps, about 2 MP by default", async () => {
+ const m = getModel("oss-krea2-realism")!;
+ expect(m.defaults).toMatchObject({ aspectRatio: "1:1", resolution: "1.5K" });
+ const wf = await prepare("krea2-realism-t2i", { prompt: "a woman in a camel coat", aspectRatio: "16:9", resolution: "1.5K" }, "t2i");
+ expect(wf["6"].inputs.text).toBe("a woman in a camel coat");
+ expect(wf["5"].inputs).toMatchObject({ ...computeDimensions("16:9", "1.5K", {}, 16) });
+ expect(wf["5"].inputs).toMatchObject({ width: 2048, height: 1152 });
+ expect(wf["3"].inputs).toMatchObject({ seed: 7, steps: 6, cfg: 1, sampler_name: "euler", scheduler: "simple", model: ["15", 0], negative: ["13", 0] });
+ expect(wf["15"]).toMatchObject({ class_type: "LoraLoaderModelOnly", inputs: { lora_name: "Krea2-realism-V2.safetensors", strength_model: 1, model: ["10", 0] } });
+ expect(wf["10"].inputs.unet_name).toBe("krea2_turbo_int8_convrot.safetensors");
+ expect(wf["11"].inputs).toMatchObject({ clip_name: "qwen3vl_4b_fp8_scaled.safetensors", type: "krea2" });
+ // The Realism slider reaches the LoRA.
+ const softer = await prepare("krea2-realism-t2i", { prompt: "x", extra: { loraStrength: 0.7 } }, "t2i");
+ expect(softer["15"].inputs.strength_model).toBe(0.7);
+ // Krea's own prompt refiner is left out: Fuobe's Enhance does that.
+ expect(Object.values(wf).map((n) => n.class_type)).not.toContain("TextGenerate");
+ });
+
+ it("Turbo: the owner's graph as saved, 8 steps, no LoRA", async () => {
+ const wf = await prepare("krea2-turbo-t2i", { prompt: "a lighthouse at dawn", aspectRatio: "1:1", resolution: "1K" }, "t2i");
+ expect(wf["5"].inputs).toMatchObject({ width: 1024, height: 1024 });
+ expect(wf["3"].inputs).toMatchObject({ seed: 7, steps: 8, cfg: 1, sampler_name: "euler", scheduler: "simple", model: ["10", 0] });
+ expect(Object.values(wf).some((n) => n.class_type === "LoraLoaderModelOnly")).toBe(false);
+ });
+
+ it("Edit: the photo and a person to put in it, grounded on both, at the photo's shape", async () => {
+ const wf = await prepare("krea2-edit-general", { prompt: "Place this person at the cafe table, holding a coffee.", images: ["photo.png", "person.png"], aspectRatio: "auto", resolution: "1K" }, "edit");
+ expect(wf["72"].inputs.image).toBe("photo.png");
+ expect(wf["90"].inputs.image).toBe("person.png");
+ expect(wf["84"].inputs).toMatchObject({ prompt: "Place this person at the cafe table, holding a coffee.", image: ["72", 0], image_b: ["90", 0], grounding_px: 768 });
+ expect(wf["85"].inputs).toMatchObject({ prompt: "", image: ["72", 0], image_b: ["90", 0] });
+ expect(wf["79"].inputs).toMatchObject({ source_latent: ["73", 0], source_latent_b: ["92", 0], source_image: ["72", 0], source_image_b: ["90", 0], target_latent: ["82", 0], ref_boost: 4, ref_boost_a: 1, fit_mode: "fit" });
+ expect(wf["71"].inputs).toMatchObject({ lora_name: "krea2_general_edit_v2.safetensors", strength_model: 1 });
+ // "auto" keeps the photo's 4:3 at about 1 MP, on the 16-pixel grid.
+ expect(wf["82"].inputs).toMatchObject({ width: 1184, height: 880 });
+ expect(wf["53"].inputs).toMatchObject({ seed: 7, steps: 8, cfg: 1, sampler_name: "euler", scheduler: "simple" });
+ const tall = await prepare("krea2-edit-general", { prompt: "x", images: ["tall.png"], aspectRatio: "auto", resolution: "1K" }, "edit");
+ expect((tall["82"].inputs.width as number) < (tall["82"].inputs.height as number)).toBe(true);
+ });
+
+ it("Edit without a second photo: the person's loader goes and the encoders run on the photo alone", async () => {
+ for (const id of ["krea2-edit-general", "krea2-edit-identity"]) {
+ const wf = await prepare(id, { prompt: "Relight the scene with warm golden hour sunlight.", images: ["photo.png"] }, "edit");
+ expect(wf["90"], id).toBeUndefined();
+ expect(wf["92"], id).toBeUndefined();
+ expect(Object.keys(wf["79"].inputs), id).not.toEqual(expect.arrayContaining(["source_latent_b"]));
+ expect(wf["79"].inputs.source_image_b, id).toBeUndefined();
+ expect(wf["84"].inputs.image_b, id).toBeUndefined();
+ expect(wf["85"].inputs.image_b, id).toBeUndefined();
+ expect(wf["84"].inputs.image, id).toEqual(["72", 0]);
+ // Nothing else points at the removed nodes.
+ const links = Object.values(wf).flatMap((n) => Object.values(n.inputs).filter((v): v is [string, number] => Array.isArray(v)));
+ for (const [from] of links) expect(wf[from], `${id}: link from ${from}`).toBeDefined();
+ }
+ });
+
+ it("Identity Edit: the Identity V2 LoRA with a lighter likeness dial, the person aligned as trained", async () => {
+ const wf = await prepare("krea2-edit-identity", { prompt: "Put her in a red raincoat on a rainy Tokyo street at night.", images: ["photo.png"] }, "edit");
+ expect(wf["71"].inputs.lora_name).toBe("krea2_identity_edit_v2.safetensors");
+ expect(wf["79"].inputs).toMatchObject({ ref_boost: 2, ref_position: "aligned (trained)" });
+ });
+
+ it("Image to image: the picture at about 2 MP, redrawn at the strength picked", async () => {
+ const wf = await prepare("krea2-turbo-i2i", { prompt: "the same photo, golden hour", images: ["photo.png"] }, "edit");
+ expect(wf["1"].inputs.image).toBe("photo.png");
+ expect(wf["2"].inputs).toMatchObject({ megapixels: 2, resolution_steps: 16, image: ["1", 0] });
+ expect(wf["16"].inputs.pixels).toEqual(["2", 0]);
+ expect(wf["3"].inputs).toMatchObject({ denoise: 0.6, steps: 8, cfg: 1, seed: 7, latent_image: ["16", 0] });
+ const light = await prepare("krea2-turbo-i2i", { prompt: "x", images: ["photo.png"], extra: { strength: 0.35 } }, "edit");
+ expect(light["3"].inputs.denoise).toBe(0.35);
+ });
+
+ it("Inpaint: the masked area black (red channel, white = paint), then the inpaint LoRA with the KV cache on", async () => {
+ const wf = await prepare("krea2-inpaint", { prompt: "a small wooden boat", images: ["photo.png"], mask: "mask.png" }, "inpaint");
+ expect(wf["1"].inputs.image).toBe("photo.png");
+ expect(wf["2"]).toMatchObject({ class_type: "LoadImageMask", inputs: { image: "mask.png", channel: "red" } });
+ expect(wf["5"]).toMatchObject({ class_type: "ImageCompositeMasked", inputs: { destination: ["1", 0], source: ["4", 0], mask: ["2", 0] } });
+ expect(wf["4"]).toMatchObject({ class_type: "EmptyImage", inputs: { color: 0, width: ["3", 0], height: ["3", 1] } });
+ expect(wf["6"].inputs).toMatchObject({ image: ["5", 0], megapixels: 1, resolution_steps: 16 });
+ expect(wf["20"]).toMatchObject({ class_type: "TextEncodeKrea2OstrisEdit", inputs: { prompt: "a small wooden boat", image1: ["6", 0], vae: ["12", 0] } });
+ expect(wf["16"]).toMatchObject({ class_type: "Krea2OstrisEditModelPatch", inputs: { kv_cache: true, model: ["15", 0] } });
+ expect(wf["15"].inputs).toMatchObject({ lora_name: "krea2_inpaint_edit.safetensors", strength_model: 1, model: ["10", 0] });
+ expect(wf["22"].inputs).toMatchObject({ width: ["7", 0], height: ["7", 1] });
+ expect(wf["23"].inputs).toMatchObject({ seed: 7, steps: 8, cfg: 1, sampler_name: "euler_ancestral", scheduler: "simple", negative: ["21", 0] });
+ await expect(prepare("krea2-inpaint", { prompt: "a boat", images: ["photo.png"] }, "inpaint")).rejects.toThrow("Paint the area to change");
+ });
+
+ it("Expand: the canvas grown on black by the pads asked for, 256 px a side by default", async () => {
+ const wf = await prepare("krea2-outpaint", { prompt: "the rest of the beach", images: ["photo.png"], extra: { padLeft: 128, padTop: 0, padRight: 128, padBottom: 64 } }, "outpaint");
+ expect(wf["8"]).toMatchObject({ class_type: "ImagePadForOutpaint", inputs: { image: ["1", 0], left: 128, top: 0, right: 128, bottom: 64, feathering: 0 } });
+ expect(wf["5"].inputs).toMatchObject({ destination: ["8", 0], source: ["4", 0], mask: ["8", 1] });
+ expect(wf["3"].inputs.image).toEqual(["8", 0]);
+ expect(entry("krea2-outpaint").defaults).toMatchObject({ padLeft: 256, padTop: 256, padRight: 256, padBottom: 256 });
+ expect(entry("krea2-outpaint").limits).toMatchObject({ padMultiple: 8 });
+ });
+});
+
+describe("optional references (encoders that take extra images as optional inputs)", () => {
+ it("drops a left-out reference from Qwen-Image 2.1, FIBO 2 or Krea 2 encoders, and from nothing else", () => {
+ const wf: ComfyWorkflow = {
+ "1": { class_type: "LoadImage", inputs: { image: "a.png" } },
+ "2": { class_type: "LoadImage", inputs: { image: "b.png" } },
+ "3": { class_type: "ImageScaleToMaxDimension", inputs: { image: ["2", 0], upscale_method: "lanczos", largest_size: 2048 } },
+ "4": { class_type: "TextEncodeQwenImage21", inputs: { prompt: "x", "images.image_1": ["1", 0], "images.image_2": ["3", 0] } },
+ "9": { class_type: "SaveImage", inputs: { images: ["4", 0] } },
+ };
+ const into = new Set(["TextEncodeQwenImage21", "TextEncodeFibo2", "Krea2EditModelPatch", "Krea2EditGroundedEncode"]);
+ const out = dropBranch(wf, "2", into, ["9"])!;
+ expect(Object.keys(out).sort()).toEqual(["1", "4", "9"]);
+ expect(out["4"].inputs).toEqual({ prompt: "x", "images.image_1": ["1", 0] });
+ // A branch that ends anywhere else (an output, another encoder) is not the encoder's to drop.
+ expect(dropBranch(wf, "2", new Set(["TextEncodeQwenImageEditPlus"]), ["9"])).toBeNull();
+ expect(dropBranch(wf, "1", into, ["9"])).not.toBeNull();
+ expect(dropBranch(wf, "2", "TextEncodeQwenImage21", ["9"])).toEqual(out);
+ });
+
+ it("keeps the old rules for other graphs: Qwen-Image-Edit 2511 repeats the photo for a reference left out", async () => {
+ const wf = await prepare("qwen-image-edit-2511-multi", { prompt: "make it night", images: ["photo.png"] }, "edit");
+ expect(wf["83"].inputs.image).toBe("photo.png");
+ });
+});
+
+describe("Krea 2 files, packs and licences", () => {
+ const pins = read("model-pins.json") as Record<string, { revision: string; sizeBytes: number; sha256?: string }>;
+ const packs = read("packs.json") as Record<string, { repo: string; commit: string; registry: { id: string } | null }>;
+ const requirements = read("requirements.json");
+
+ it("pins every file of every Krea 2 graph to a revision, a size and a SHA-256 from Hugging Face", () => {
+ for (const id of IDS) {
+ for (const m of entry(id).models) {
+ const pin = pins[m.url!];
+ expect(pin, `${id} ${m.file}`).toBeDefined();
+ expect(pin.revision, m.file).toMatch(/^[0-9a-f]{40}$/);
+ expect(pin.sha256, m.file).toMatch(/^[0-9a-f]{64}$/);
+ expect(new URL(m.url!).host).toBe("huggingface.co");
+ }
+ }
+ expect(pins["https://huggingface.co/conradlocke/krea2-identity-edit/resolve/main/krea2_general_edit_v2.safetensors"]).toEqual({
+ revision: "f33b26291c640e8ec50b0da420bfee3c9a660daa",
+ sizeBytes: 1828285656,
+ sha256: "fb5315477444c8df6dea2ad347a852bd90e97ab0f9109f4100a39714a7a09356",
+ });
+ });
+
+ it("names the Krea 2 Turbo and text encoder files the ComfyUI may hold in another precision", () => {
+ expect(KNOWN_MODELS["krea2_turbo_int8_convrot.safetensors"].variants).toEqual(["krea2_turbo_fp8_scaled.safetensors", "krea2_turbo_bf16.safetensors"]);
+ expect(KNOWN_MODELS["qwen3vl_4b_fp8_scaled.safetensors"].variants).toEqual(["qwen3vl_4b_int8_convrot.safetensors", "qwen3vl_4b_bf16.safetensors"]);
+ });
+
+ it("needs the Krea 2 Identity Edit nodes for the edits, and Ostris' edit nodes for Inpaint and Expand", () => {
+ for (const id of ["krea2-edit-general", "krea2-edit-identity"]) {
+ expect(entry(id).customNodes.map((c) => c.name), id).toEqual(["comfyui-krea2edit"]);
+ expect(requirements.workflows[id].packs, id).toEqual({ "comfyui-krea2edit": ["Krea2EditGroundedEncode", "Krea2EditModelPatch"] });
+ }
+ for (const id of ["krea2-inpaint", "krea2-outpaint"]) {
+ expect(entry(id).customNodes.map((c) => c.name), id).toEqual(["ComfyUI-Krea2-Ostris-Edit"]);
+ expect(requirements.workflows[id].packs, id).toEqual({ "ComfyUI-Krea2-Ostris-Edit": ["Krea2OstrisEditModelPatch", "TextEncodeKrea2OstrisEdit"] });
+ }
+ for (const id of ["krea2-realism-t2i", "krea2-turbo-t2i", "krea2-turbo-i2i"]) expect(entry(id).customNodes, id).toEqual([]);
+ expect(packs["comfyui-krea2edit"]).toMatchObject({ repo: CUSTOM_NODE_REPOS["comfyui-krea2edit"], commit: "13ef60f20828949becada815d3cbc371eb5ccaab" });
+ expect(packs["ComfyUI-Krea2-Ostris-Edit"]).toMatchObject({ repo: CUSTOM_NODE_REPOS["ComfyUI-Krea2-Ostris-Edit"], commit: "7756566160c4a1b24bb1bd9f0ff3ced1a83d7547", registry: { id: "comfyui-krea2-ostris-edit" } });
+ expect(PACK_CLASSES["comfyui-krea2edit"].test("Krea2EditModelPatch")).toBe(true);
+ expect(PACK_CLASSES["ComfyUI-Krea2-Ostris-Edit"].test("TextEncodeKrea2OstrisEdit")).toBe(true);
+ });
+
+ it("records the licences as information: the V2 edit LoRAs are non-commercial, the rest the Krea 2 Community License", () => {
+ for (const id of ["krea2-edit-general", "krea2-edit-identity"]) expect(licenceTerms(workflowLicence(entry(id))).flags, id).toContain("non-commercial");
+ for (const id of ["krea2-realism-t2i", "krea2-turbo-t2i", "krea2-turbo-i2i", "krea2-inpaint", "krea2-outpaint"]) {
+ expect(licenceTerms(workflowLicence(entry(id))).flags, id).toEqual(["conditions"]);
+ }
+ expect(getModel("oss-krea2-edit")!.tagline).toMatch(/non-commercial/);
+ expect(NODE_PACKS.find((p) => p.name === "comfyui-krea2edit")!.licence.name).toBe("Apache-2.0");
+ expect(NODE_PACKS.find((p) => p.name === "ComfyUI-Krea2-Ostris-Edit")!.licence.name).toBe("MIT");
+ });
+});
diff --git a/workflows/comfyui/model-pins.json b/workflows/comfyui/model-pins.json
index 8639fe51..595d90af 100644
--- a/workflows/comfyui/model-pins.json
+++ b/workflows/comfyui/model-pins.json
@@ -9,6 +9,11 @@
"sizeBytes": 2760814880,
"sha256": "011487390b8020baf22a9d543930c90d74a4809b7241bee6b0622777b17b413b"
},
+ "https://huggingface.co/Cierpliwy/krea2-inpaint-edit/resolve/main/v1_512/krea2_inpaint_edit.safetensors": {
+ "revision": "30b1c7cf9eab338239c4a50ea331218f4e0ce2d1",
+ "sizeBytes": 457111984,
+ "sha256": "4c09533fdd243200e7afad92f1ed1a92dacd39c53fe64412f938ae093c82a26b"
+ },
"https://huggingface.co/Comfy-Org/Bernini-R/resolve/main/diffusion_models/wan2.2_bernini_r_high_noise_fp8_scaled.safetensors": {
"revision": "f7fd9812e54095d0c511d5e7429e6d8f6acc381a",
"sizeBytes": 15574833216,
@@ -654,6 +659,11 @@
"sizeBytes": 995765578,
"sha256": "3160fabf8edf0bc4dd8de40353a180813b111ce586b655ad54af9a7b8c6736de"
},
+ "https://huggingface.co/RudySen/Krea2-realism-V2/resolve/main/Krea2-realism-V2.safetensors": {
+ "revision": "ad6f07e426303e7087d215362dbc057b0073dca3",
+ "sizeBytes": 1562410344,
+ "sha256": "fb0048ce3340adc2842ccfcc1a9a61a9773b6628b01ae5a2e139ca9c679e715d"
+ },
"https://huggingface.co/VAST-AI/TripoSplat/resolve/main/clip_vision/dino_v3_vit_h.safetensors": {
"revision": "56a96e603204ec410c4da60c13ea4fa09a2169a9",
"sizeBytes": 1681247696,
@@ -719,6 +729,16 @@
"sizeBytes": 5157348688,
"sha256": "a498f0485dc9536735258018417c3fd7758dc3bccc0a645feaa472b34955557a"
},
+ "https://huggingface.co/conradlocke/krea2-identity-edit/resolve/main/krea2_general_edit_v2.safetensors": {
+ "revision": "f33b26291c640e8ec50b0da420bfee3c9a660daa",
+ "sizeBytes": 1828285656,
+ "sha256": "fb5315477444c8df6dea2ad347a852bd90e97ab0f9109f4100a39714a7a09356"
+ },
+ "https://huggingface.co/conradlocke/krea2-identity-edit/resolve/main/krea2_identity_edit_v2.safetensors": {
+ "revision": "f33b26291c640e8ec50b0da420bfee3c9a660daa",
+ "sizeBytes": 1828285728,
+ "sha256": "c53843f9451963a6cb3c22dc4975205056b93a6575fb9347dd2bc6e055ef9877"
+ },
"https://huggingface.co/datasets/Gourieff/ReActor/resolve/main/models/facerestore_models/GFPGANv1.4.pth": {
"revision": "079e0e459cd4261bbcba8c71d47df54a4ded7642",
"sizeBytes": 348632874,
diff --git a/workflows/comfyui/packs.json b/workflows/comfyui/packs.json
index dd3cd662..c69e2208 100644
--- a/workflows/comfyui/packs.json
+++ b/workflows/comfyui/packs.json
@@ -35,6 +35,15 @@
"subdir": null,
"folders": []
},
+ "ComfyUI-Krea2-Ostris-Edit": {
+ "repo": "https://github.com/ostris/ComfyUI-Krea2-Ostris-Edit",
+ "commit": "7756566160c4a1b24bb1bd9f0ff3ced1a83d7547",
+ "registry": { "id": "comfyui-krea2-ostris-edit", "version": "" },
+ "requirementsTxt": false,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
"ComfyUI-LatentSyncWrapper": {
"repo": "https://github.com/ShmuelRonen/ComfyUI-LatentSyncWrapper",
"commit": "360d5283d7276aee68b4237b1387e594e4ce640e",
@@ -152,6 +161,15 @@
"subdir": null,
"folders": []
},
+ "comfyui-krea2edit": {
+ "repo": "https://github.com/lbouaraba/comfyui-krea2edit",
+ "commit": "13ef60f20828949becada815d3cbc371eb5ccaab",
+ "registry": { "id": "comfyui-krea2edit", "version": "" },
+ "requirementsTxt": false,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
"h3-relay": {
"repo": "https://github.com/akatz-ai/h3-relay",
"commit": "e2a7665b6eb8ea37a88c0de2c9c6b69a8f7c9220",