--- license: other license_name: krea-2-community-license license_link: https://huggingface.co/krea/Krea-2-Raw/blob/main/LICENSE.pdf base_model: krea/krea-2-raw pipeline_tag: image-to-image tags: - image-editing - image-to-image - lora - controlnet - canny - krea - comfyui --- # Nynxz's Krea 2 Edit (NK2E) A set of in-context LoRAs for Krea 2. The edit LoRAs take a source image and a text instruction (like "give her pink hair" or "add sunglasses") and edit the image. A separate canny control LoRA takes an edge map and generates an image that follows it. > [!WARNING] > Experimental and unofficial. Results are rough and inconsistent, and vary a lot by > edit type. Not affiliated with or endorsed by Krea. ## Demo Try it in your browser — no install required — on the Hugging Face Space: [![Open in Spaces](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-md.svg)](https://huggingface.co/spaces/nynxz/nk2e-krea2-editor) **→ https://huggingface.co/spaces/nynxz/nk2e-krea2-editor** ## Links - Live demo (Space): https://huggingface.co/spaces/nynxz/nk2e-krea2-editor - ComfyUI Node Pack: https://github.com/Nynxz/ComfyUI-NK2E - Training Toolkit: https://github.com/Nynxz/NK2E ## Use (ComfyUI) 1. Download a LoRA from `comfy/v0.3/` (recommended) into your ComfyUI `models/loras/`. 2. Install the node pack (link above) and load its example workflow. Strength around 0.7 is a good start. The reference is the source image (or, for the canny LoRA, an edge map). ## Versions | Version | File | Rank | Steps | Training data | Notes | |---|---|---|---|---|---| | v0.3 | comfy/v0.3/NK2E-v0.3.safetensors | 64 | 24k | v0.1 mix + UltraEdit + HQ-Edit (~72k pairs) | recommended (newest) | | v0.2 | comfy/v0.2/NK2E-v0.2.safetensors | 64 | 12k | same ~72k mix | continued from v0.1 | | v0.1 | comfy/v0.1/NK2E-v0.1.safetensors | 64 | 8k | MagicBrush + OmniEdit + InstructPix2Pix (~37k) | first release | | canny v0.1 | comfy/canny_v0.1/NK2E-canny-v0.1.safetensors | 32 | 12k | 8k COCO canny pairs | control LoRA (see below) | See CHANGELOG.md for history. ## What it does well (and not) - Good at: keeping identity and composition, localized edits (hair, accessories, objects), and global style or lighting changes. - Weaker at: recolouring a whole large region, and scene or structure changes (swapping a background, adding a person, re-posing). It is not a mask or inpaint model; identity is preserved without a mask. ## Canny control (experimental) `comfy/canny_v0.1/` is a separate control LoRA (ControlNet-style, in-context). Feed a **canny edge map** as the reference instead of a source image: structure comes from the edges, content from the text prompt. Same node setup as editing. It follows the outline but is softer than a pixel-locked ControlNet. Depth and pose are planned, same recipe. ## Specialist LoRAs `comfy/loras/` holds narrow, single-purpose edit LoRAs trained on top of the generalist. Each responds to one **trigger instruction** rather than general edits, and loads with the same node setup. Because they are low-rank and concept-specific, they usually want a higher strength (start near 1.0). | Specialist | File | Base | Trigger | |---|---|---|---| | Invisible Man | comfy/loras/NK2E-InvisibleMan-v0.1.safetensors | v0.3 | `make person invisible` | See comfy/loras/README.md for details and triggers. ## Training a specialist on top `comfy/` holds ComfyUI-format weights for inference; `train/` holds native-format weights for training. Point the toolkit's `base_lora` at `train/v0.3/NK2E-v0.3-train.safetensors` (the latest generalist native) to train a narrow specialist on top — this is how the specialists in `comfy/loras/` were made. See the training toolkit (link above). ## License Krea 2 Community License (see LICENSE and NOTICE); commercial use only under $1M/yr revenue. Not an official Krea project.