multimodalart HF Staff commited on
Commit
b3205ad
·
verified ·
1 Parent(s): 2ed3187

Revert to original (undo accidental overwrite)

Browse files
Files changed (1) hide show
  1. README.md +29 -22
README.md CHANGED
@@ -1,42 +1,49 @@
1
  ---
2
  title: Krea 2 Identity Edit
3
- emoji: ✏️
4
- colorFrom: pink
5
- colorTo: green
6
  sdk: gradio
7
  sdk_version: 6.20.0
8
  app_file: app.py
9
  pinned: false
10
  hardware: zero-a10g
11
- short_description: Instruction-based identity-preserving photo editing
12
  python_version: "3.10"
13
- startup_duration_timeout: "30m"
 
14
  models:
15
  - krea/Krea-2-Turbo
16
- - ostris/Krea2OstrisEdit
17
  - conradlocke/krea2-identity-edit
18
  ---
19
 
20
- # Krea 2 Identity Edit ✏️
21
 
22
- Instruction-based, **identity-preserving** image editing on [Krea 2 Turbo](https://huggingface.co/krea/Krea-2-Turbo),
23
- using the [Krea2 Identity Edit LoRA](https://huggingface.co/conradlocke/krea2-identity-edit) (v1.1)
24
- served through the [Krea2OstrisEdit](https://huggingface.co/ostris/Krea2OstrisEdit) community pipeline.
 
 
 
 
25
 
26
  ## How it works
27
 
28
- Upload a photo and give a plain-language instruction. The pipeline conditions on your image via
29
- dual conditioning — in-context VAE tokens + image-grounded Qwen3-VL encoding — and the identity-edit
30
- LoRA is trained to consume it, editing what you asked while keeping the face, outfit, and untouched
31
- scene elements fixed.
 
32
 
33
- - **Re-stage a person:** "create a photo of this person at a night market" (same face + outfit, relit)
34
- - **Local edits:** add / remove / replace objects, recolor, outfit changes
35
- - **Restyle:** global style with preserved composition
 
 
 
36
 
37
- ## Notes
 
 
38
 
39
- - The output aspect ratio auto-matches your source photo (training pairs are same-size), targeting ~1MP.
40
- - Recommended: 8–12 steps, CFG 1.0 for most edits; ~20 steps / CFG 3.0 for large removals.
41
- - Single LoRA replaces the pipeline's default style-reference LoRA (both are the edit brain); other
42
- style/character LoRAs can stack on top.
 
1
  ---
2
  title: Krea 2 Identity Edit
3
+ emoji: 🧬
4
+ colorFrom: blue
5
+ colorTo: gray
6
  sdk: gradio
7
  sdk_version: 6.20.0
8
  app_file: app.py
9
  pinned: false
10
  hardware: zero-a10g
 
11
  python_version: "3.10"
12
+ startup_duration_timeout: 45m
13
+ short_description: Identity-preserving instruction image editing on Krea 2
14
  models:
15
  - krea/Krea-2-Turbo
 
16
  - conradlocke/krea2-identity-edit
17
  ---
18
 
19
+ # 🧬 Krea 2 Identity Edit
20
 
21
+ Instruction-based, **identity-preserving** image editing built on
22
+ [Krea 2 Turbo](https://huggingface.co/krea/Krea-2-Turbo) with the community LoRA
23
+ [`conradlocke/krea2-identity-edit`](https://huggingface.co/conradlocke/krea2-identity-edit).
24
+
25
+ Give it an image and a plain-language instruction; it edits while preserving what you
26
+ didn't ask to change — including the person's likeness. Person re-staging, local edits
27
+ (recolor / add / remove / replace), replace-with-reference, and full-image restyles.
28
 
29
  ## How it works
30
 
31
+ Krea 2 is a text-to-image MMDiT; this LoRA turns it into an instruction editor via a
32
+ **dual-conditioning** recipe that stock `Krea2Pipeline` does not provide. This Space
33
+ reproduces the two custom pieces from the reference
34
+ [ComfyUI-Krea2Edit](https://github.com/lbouaraba/comfyui-krea2edit) node pack in plain
35
+ diffusers / PyTorch:
36
 
37
+ - **Grounded encode** — the instruction is encoded *together with the source image*
38
+ through the Qwen3-VL text encoder (image tokens inserted via the grounded chat
39
+ template), tapping the 12 selected decoder layers.
40
+ - **Source patch** — the VAE-encoded source latent is prepended to the transformer
41
+ sequence as clean tokens (RoPE frame index: source = 1, target = 0), so appearance is
42
+ carried in-context and only the target tokens are denoised.
43
 
44
+ Default recipe: Turbo, 8 steps, guidance off (Krea convention). `grounding_px` trades
45
+ edit adherence (lower) against identity/likeness (higher); 768 is balanced, 1024+ for
46
+ people. For removals / large deletions, raise steps and guidance.
47
 
48
+ *An unofficial community fine-tune of Krea 2 Raw — not affiliated with or endorsed by
49
+ Krea.ai, Inc. Weights are distributed under the Krea 2 Community License.*