File size: 1,597 Bytes
ce994e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Tools
- [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
- [sd-mecha](https://github.com/ljleb/sd-mecha)
- [sd-mecha for Comfyui](https://github.com/ljleb/comfy-mecha)
- [Concept Sliders](https://github.com/rohitgandikota/sliders)

# Checkpoints
- [NoobAI-XL (NAI-XL) V-Pred-1.0-Version](https://civitai.com/models/833294?modelVersionId=1190596)
- [NoobAI-XL (NAI-XL) Epsilon-pred 1.0-version](https://civitai.com/models/833294?modelVersionId=1022833)
- [illustrious_pencil-XL-v2.0.0](https://huggingface.co/bluepen5805/illustrious_pencil-XL)

# Recipe

1. Merge using `sd-mecha for ComfyUI`. ( below sd-mecha format recipe )
```
model "sdxl\illustrious_pencil-XL-v2.0.0.safetensors" "sdxl" "base"
model "sdxl\noobaiXLNAIXL_vPred10Version.safetensors" "sdxl" "base"
model "sdxl\noobaiXLNAIXL_epsilonPred10Version.safetensors" "sdxl" "base"
merge "train_difference" &0 &1 &2 alpha=1.05
merge "clamped_add_opposite" &3 &0 &2 alpha=0.45
merge "add_cosine_a" &4 &1 alpha=1.0
merge "slerp" &3 &5 alpha=0.65
merge "clamped_add_opposite" &6 &1 &2 alpha=1.0
merge "add_cosine_a" &3 &7 alpha=1.0
dict sdxl_txt_default=0.0 sdxl_txt2_default=0.0 sdxl_unet_default=1.0
merge "weighted_sum" &3 &8 alpha=&9
```

2. Add `v_pred` and `ztsnr` keys.

```python
BASE_MODEL_NAME = "noob_v_pencil-XL-1.0"

tensors = {}
with safe_open(BASE_MODEL_NAME + "-base.safetensors", framework="pt", device="cpu") as f:
    for key in f.keys():
        tensors[key] = f.get_tensor(key)

tensors["v_pred"] = torch.tensor([0.0])
tensors["ztsnr"] = torch.tensor([0.0])

save_file(tensors, BASE_MODEL_NAME + ".safetensors")
```