darkmaniac7 commited on
Commit
a38d43d
Β·
verified Β·
1 Parent(s): dd7a60c

Add files using upload-large-folder tool

Browse files
MD5SUMS ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ d8d69fba0bafdda9cfd561107e28c518 realvisxl-v40-lightning-fp16.safetensors
2
+ d2799fb3cb748982fa1932278179cc88 ip-adapter-plus-face_sdxl_vit-h.safetensors
3
+ ed38a0b229471ee0c1826a6ddb658083 ip_adapter_clip_vision_vith.safetensors
README.md ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: openrail++
3
+ license_name: tokforge-sdxl-ipadapter-bundle
4
+ tags:
5
+ - text-to-image
6
+ - image-to-image
7
+ - stable-diffusion
8
+ - stable-diffusion-xl
9
+ - sdxl
10
+ - ip-adapter
11
+ - realvisxl
12
+ - reference-image
13
+ - identity
14
+ - multi-subject
15
+ - safetensors
16
+ - stable-diffusion-cpp
17
+ - tokforge
18
+ base_model:
19
+ - SG161222/RealVisXL_V4.0_Lightning
20
+ - h94/IP-Adapter
21
+ pipeline_tag: text-to-image
22
+ ---
23
+
24
+ # TokForge β€” SDXL IP-Adapter (Reference Identity) bundle
25
+
26
+ The **highest-fidelity reference-identity** image route for the [TokForge](https://tokforge.ai)
27
+ Android app, and the **clean multi-subject** path. Attach a photo of a person (or two),
28
+ then render **that person** in any scene (*"me as a superhero, unmasked, face visible"*).
29
+ The **plus-face** IP-Adapter transfers the **face only** while the **prompt drives the
30
+ whole scene**. SDXL's stronger plus-face transfer (vs SD1.5) gives sharper single-subject
31
+ identity, and makes the regional-mask **two-subject** path produce two distinct recognizable
32
+ faces.
33
+
34
+ This bundle runs on the on-device [`stable-diffusion.cpp`](https://github.com/leejet/stable-diffusion.cpp)
35
+ engine (TokForge's IP-Adapter port) on **CPU** and **Adreno OpenCL**. Full SDXL is heavier
36
+ than the SD1.5 IP-Adapter tier β€” this is offered on **16 GB-class** phones. For 8 GB phones,
37
+ use the lighter [`darkmaniac7/TokForge-SD15-IPAdapter`](https://huggingface.co/darkmaniac7/TokForge-SD15-IPAdapter)
38
+ tier instead.
39
+
40
+ ## Files
41
+
42
+ | File | Size | License | Contents |
43
+ |------|------|---------|----------|
44
+ | `realvisxl-v40-lightning-fp16.safetensors` | ~6.9 GB | OpenRAIL++ | **RealVisXL V4.0 Lightning** (SDXL photoreal finetune) β€” dual CLIP text encoders + UNet + VAE in one self-contained **f16** sd.cpp safetensors |
45
+ | `ip-adapter-plus-face_sdxl_vit-h.safetensors` | ~848 MB | Apache-2.0 | IP-Adapter **plus-face** SDXL (`h94/IP-Adapter`) β€” 16-token image_proj Resampler + 70 decoupled cross-attn layers (`cross_attention_dim` 2048) |
46
+ | `ip_adapter_clip_vision_vith.safetensors` | ~2.5 GB | MIT | OpenCLIP **ViT-H-14** image encoder (1280 hidden, 32 layers). The plus-face path needs ViT-H, **not** bigG β€” the same encoder the SD1.5 plus-face bundle ships |
47
+
48
+ `manifest.json` and `MD5SUMS` carry the integrity hashes + render defaults.
49
+
50
+ ### Why this base, and why f16 (not Q4)
51
+
52
+ The base is **RealVisXL V4.0 Lightning** β€” the same self-contained SDXL safetensors the
53
+ TokForge "RealVisXL SDXL Quality" tier ships, a strong photoreal SDXL finetune distilled
54
+ for a **few-step** (6-step) Lightning floor. It is kept at **f16** (full precision) so the
55
+ IP-Adapter's decoupled cross-attention and the face Resampler keep **subject quality** high.
56
+ A `q4_0` base measurably weakens the transferred identity, so this bundle deliberately uses f16
57
+ (matching the SD1.5 tier's quality choice).
58
+
59
+ ### Why plus-face + ViT-H (not the base SDXL adapter + bigG)
60
+
61
+ The standard `ip-adapter_sdxl` projects the whole pooled CLIP-**bigG** embedding β†’ it drags the
62
+ reference's *entire scene* through. The **plus-face** variant (`ip-adapter-plus-face_sdxl_vit-h`)
63
+ runs a 16-token Resampler over the **ViT-H** penultimate hidden state β†’ it extracts the **face
64
+ only**, so identity is preserved while the **prompt** controls the scene. Because this adapter is
65
+ the `_vit-h` build (`image_proj.latents` shape `[1, 16, 1280]`), it pairs with the **ViT-H**
66
+ encoder (1280 hidden) β€” **not** the bigG encoder (1664 hidden) the base SDXL adapter uses. The
67
+ TokForge sd.cpp IP-Adapter loader auto-detects plus-face by `image_proj.latents` and the SDXL
68
+ adapter config (2048-dim, 70 layers) by the SDXL base.
69
+
70
+ ## How TokForge uses it
71
+
72
+ In the app (16 GB+ phones): **Image** model picker β†’ download **"SDXL IP-Adapter (Reference
73
+ Identity)"** β†’ attach a face photo as a reference under chat β†’ prompt the scene. The engine is
74
+ invoked as:
75
+
76
+ ```bash
77
+ sd -M img_gen \
78
+ -m realvisxl-v40-lightning-fp16.safetensors \
79
+ -p "as a superhero, unmasked, face visible, detailed face" \
80
+ -n "<strong negative>" \
81
+ --clip_vision ip_adapter_clip_vision_vith.safetensors \
82
+ --ip-adapter ip-adapter-plus-face_sdxl_vit-h.safetensors \
83
+ --ip-adapter-image <your_face.jpg> \
84
+ --ip-adapter-scale 0.75 \
85
+ --cfg-scale 2.0 --sampling-method euler --scheduler discrete \
86
+ --steps 6 -H 1024 -W 1024
87
+ ```
88
+
89
+ ### Recommended render settings
90
+
91
+ | Setting | Value |
92
+ |---------|-------|
93
+ | sampler | `euler` |
94
+ | scheduler | `discrete` |
95
+ | steps | `6` (Lightning few-step floor) |
96
+ | cfg-scale | `2.0` (Lightning low-CFG) |
97
+ | ip-adapter-scale | `0.75` (keeps the scene with strong recognizable identity; lower β‰ˆ more scene freedom, higher β‰ˆ closer to the reference) |
98
+ | resolution | `1024Γ—1024` (SDXL native) |
99
+
100
+ > Plus-face transfers the **face only**, so the rendered face must stay **visible and
101
+ > unobstructed** for a recognizable identity. Keep the face in frame ("unmasked, face visible,
102
+ > detailed face, looking at viewer") β€” the app appends this cue automatically.
103
+
104
+ ## Licenses
105
+
106
+ This is an aggregate of three independently-licensed components β€” each retains its own license:
107
+
108
+ - **RealVisXL V4.0 Lightning base** (`realvisxl-v40-lightning-fp16.safetensors`) β€” **OpenRAIL++** ([SG161222/RealVisXL_V4.0_Lightning](https://huggingface.co/SG161222/RealVisXL_V4.0_Lightning), the SDXL `openrail++` license). Use must comply with the OpenRAIL++ use-based restrictions.
109
+ - **IP-Adapter plus-face (SDXL, ViT-H)** (`ip-adapter-plus-face_sdxl_vit-h.safetensors`) β€” **Apache-2.0** ([h94/IP-Adapter](https://huggingface.co/h94/IP-Adapter)).
110
+ - **OpenCLIP ViT-H-14 image encoder** (`ip_adapter_clip_vision_vith.safetensors`) β€” **MIT** (OpenCLIP / LAION ViT-H-14).
111
+
112
+ > The non-commercial **IP-Adapter-FaceID** / InsightFace path is **NOT** used here β€” only the
113
+ > Apache-2.0 base + plus-face adapters from `h94/IP-Adapter`.
114
+
115
+ ## Provenance
116
+
117
+ - Base: `realvisxl-v40-lightning-fp16.safetensors`, the self-contained sd.cpp SDXL safetensors
118
+ built from `SG161222/RealVisXL_V4.0_Lightning` (the same base the TokForge RealVisXL SDXL tier ships).
119
+ - Adapter + image encoder copied verbatim from `h94/IP-Adapter`
120
+ (`sdxl_models/ip-adapter-plus-face_sdxl_vit-h.safetensors`, `models/image_encoder/model.safetensors`).
ip-adapter-plus-face_sdxl_vit-h.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:677ad8860204f7d0bfba12d29e6c31ded9beefdf3e4bbd102518357d31a292c1
3
+ size 847517512
ip_adapter_clip_vision_vith.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ca9667da1ca9e0b0f75e46bb030f7e011f44f86cbfb8d5a36590fcd7507b030
3
+ size 2528373448
manifest.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "TokForge-SDXL-IPAdapter",
3
+ "family": "sdxl_ipadapter",
4
+ "engine": "stable-diffusion.cpp",
5
+ "base_model": "SG161222/RealVisXL_V4.0_Lightning",
6
+ "adapter": "h94/IP-Adapter β€” ip-adapter-plus-face_sdxl_vit-h (plus-face, SDXL)",
7
+ "image_encoder": "OpenCLIP ViT-H-14 (h94/IP-Adapter image_encoder)",
8
+ "format": "safetensors",
9
+ "precision": "f16",
10
+ "native_resolution": 1024,
11
+ "default_steps": 6,
12
+ "sampler": "euler",
13
+ "scheduler": "discrete",
14
+ "cfg_scale": 2.0,
15
+ "default_ip_adapter_scale": 0.75,
16
+ "cross_attention_dim": 2048,
17
+ "ip_cross_attn_layers": 70,
18
+ "licenses": {
19
+ "base": "openrail++",
20
+ "adapter": "apache-2.0",
21
+ "image_encoder": "mit"
22
+ },
23
+ "files": [
24
+ {"name": "realvisxl-v40-lightning-fp16.safetensors", "size": 6938040286, "md5": "d8d69fba0bafdda9cfd561107e28c518", "role": "diffusion_base", "contents": "RealVisXL V4.0 Lightning SDXL β€” dual CLIP text encoders + SDXL UNet + VAE (single self-contained sd.cpp safetensors)"},
25
+ {"name": "ip-adapter-plus-face_sdxl_vit-h.safetensors", "size": 847517512, "md5": "d2799fb3cb748982fa1932278179cc88", "role": "ip_adapter", "contents": "IP-Adapter plus-face (SDXL, ViT-H): 16-token image_proj Resampler + 70 decoupled cross-attn to_k_ip/to_v_ip layers (cross_attention_dim 2048)"},
26
+ {"name": "ip_adapter_clip_vision_vith.safetensors", "size": 2528373448, "md5": "ed38a0b229471ee0c1826a6ddb658083", "role": "clip_vision", "contents": "OpenCLIP ViT-H-14 image encoder (1280 hidden, 32 layers) β€” the SAME encoder the SD1.5 plus-face bundle uses; plus-face_sdxl_vit-h needs ViT-H, not bigG"}
27
+ ]
28
+ }
realvisxl-v40-lightning-fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ec48b5b0728292d09f7b91dcf644b3f1654d4335e9982711c6a6028f9718da0
3
+ size 6938040286