complete rewrite

This commit is contained in:
Haoming
2023-12-08 14:02:02 +08:00
parent 072a05d31e
commit f1fd309c04
14 changed files with 127 additions and 835 deletions
+1
View File
@@ -1 +1,2 @@
*.jpg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
+19 -12
View File
@@ -1,5 +1,4 @@
# ComfyUI Diffusion Color Grading
<h4 align = "right"><i>Beta</i></h4>
This is the ComfyUI port of the joint research between me and <ins>TimothyAlexisVass</ins>.
For more information, check out the original [Extension](https://github.com/Haoming02/sd-webui-diffusion-cg) for **Automatic1111**.
@@ -7,35 +6,43 @@ For more information, check out the original [Extension](https://github.com/Haom
## Nodes
Some example workflows are included~
#### Sampling
- **KSampler (Recenter):** For **SD 1.5**. Use this instead of the normal `KSampler` node to achieve the centering effect.
- **Hook Recenter:** For **SD 1.5**. Hooks the callback to achieve the centering effect.
- Comes with `Effect Strength` slider and `CMYK` color settings
- **KSampler XL (Recenter):** For **SDXL**. Use this instead of the normal `KSampler` node to achieve the centering effect.
- **Hook Recenter XL:** For **SDXL**. Hooks the callback to achieve the centering effect.
- Comes with `Effect Strength` slider and `Lab` color settings
- **Unhook Recenter** (Optional)**:** Unhook the callback to disable the effects completely.
- If used, put near the end of the workflow
- **Normalization:** For **SD 1.5**. Use before the `VAE Decode` node to achieve the normalization effect.
- **NormalizationXL:** For **SDXL**. Use before the `VAE Decode` node to achieve the normalization effect.
#### Latent
- **Normalization:** For **SD 1.5**. Use before the `VAE Decode` to achieve the normalization effect.
- **NormalizationXL:** For **SDXL**. Use before the `VAE Decode` to achieve the normalization effect.
- **Tensor Debug:** *For development only...*
#### Important:
- Toggle `custom_sampler` if you're using the **SamplerCustom** node.
- In a single workflow, you only need to hook the callback once. The simplest way is to add it between the `Positive Prompt` and the `Sampler`.
- Due to how `ComfyUI` works, if you also add **Unhook Recenter**, the effect may not work sometimes unless you also change the prompt.
> ComfyUI doesn't go through a node unless it needs to be updated, so if you unhook the callback and the parameters didn't change *(**eg.** you're only iterating throguh seeds)*, then the callback will not be hooked again. Easiest way to solve this is just adding a space to the positive prompt, or just don't unhook the callback.
## Samples
<p align="center">
<b>SD 1.5</b><br>
<img src="samples\1.5_off.jpg" width=256>
<img src="samples\1.5_on.jpg" width=256>
<img src="samples\1.5_off.jpg" width=384>
<img src="workflows\1.5_on.png" width=384>
<br><code>Off | On</code><br>
</p>
<p align="center">
<b>SDXL</b><br>
<img src="samples\xl_off.jpg" width=384>
<img src="samples\xl_on.jpg" width=384>
<img src="workflows\xl_on.png" width=384>
<br><code>Off | On</code><br>
</p>
## Known Issue
- Doesn't really work with `LCM` Sampler
<hr>
##### Checkpoints Used:
- [UHD-23](https://civitai.com/models/22371/uhd-23)
- [SDXL Base 1.0 w/ 0.9 VAE](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/main)
- [Juggernaut XL](https://civitai.com/models/133005/juggernaut-xl)
+10 -9
View File
@@ -1,20 +1,21 @@
from .normalization import Normalization, NormalizationXL
from .recenter import CKSampler
from .recenter_xl import CKSamplerXL
from .tensor_debug import Debug
from .recenter import HookCallback, HookCallbackXL, UnhookCallback
# from .tensor_debug import Debug
NODE_CLASS_MAPPINGS = {
"Tensor Debug": Debug,
"Normalization": Normalization,
"NormalizationXL": NormalizationXL,
"Center Sampler": CKSampler,
"Center Sampler XL": CKSamplerXL
"Hook Recenter": HookCallback,
"Hook Recenter XL": HookCallbackXL,
"Unhook Recenter": UnhookCallback,
# "Tensor Debug": Debug,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"Tensor Debug": "Tensor Debug",
"Normalization": "Normalization",
"NormalizationXL": "NormalizationXL",
"Center Sampler": "KSampler (Recenter)",
"Center Sampler XL": "KSampler XL (Recenter)"
"Hook Recenter": "Hook Recenter",
"Hook Recenter XL": "Hook Recenter XL",
"Unhook Recenter": "Unhook Recenter",
# "Tensor Debug": "Tensor Debug",
}
+10 -2
View File
@@ -14,14 +14,18 @@ class Normalization:
batches = latent['samples'].size(0)
for b in range(batches):
for c in range(4):
delta = latent['samples'][b][c].mean()
latent['samples'][b][c] -= delta
xmin = abs(float(latent['samples'][b][c].min()))
xmax = abs(float(latent['samples'][b][c].max()))
r = DYNAMIC_RANGE[c] / max(xmin, xmax)
ratio = max(0.95, r)
latent['samples'][b][c] *= ratio
latent['samples'][b][c] += delta
return (latent,)
class NormalizationXL:
@@ -37,12 +41,16 @@ class NormalizationXL:
batches = latent['samples'].size(0)
for b in range(batches):
for c in range(3):
delta = latent['samples'][b][c].mean()
latent['samples'][b][c] -= delta
xmin = abs(float(latent['samples'][b][c].min()))
xmax = abs(float(latent['samples'][b][c].max()))
r = DYNAMIC_RANGE_XL[c] / max(xmin, xmax)
ratio = max(0.95, r)
latent['samples'][b][c] *= ratio
latent['samples'][b][c] += delta
return (latent,)
+77 -48
View File
@@ -1,68 +1,97 @@
import latent_preview
import comfy
import torch
def center_ksampler(LUTs, strength, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent, denoise=1.0, disable_noise=False, start_step=None, last_step=None, force_full_denoise=False):
latent_image = latent["samples"]
ORIGINAL_SAMPLE = comfy.sample.sample
ORIGINAL_SAMPLE_CUSTOM = comfy.sample.sample_custom
if disable_noise:
noise = torch.zeros(latent_image.size(), dtype=latent_image.dtype, layout=latent_image.layout, device="cpu")
else:
batch_inds = latent["batch_index"] if "batch_index" in latent else None
noise = comfy.sample.prepare_noise(latent_image, seed, batch_inds)
noise_mask = None
if "noise_mask" in latent:
noise_mask = latent["noise_mask"]
def hijack(SAMPLE, LUTs:list, strength:float):
original_callback = latent_preview.prepare_callback(model, steps)
def sample_center(*args, **kwargs):
original_callback = kwargs['callback']
def hijack_callback(step, x0, x, total_steps):
def hijack_callback(step, x0, x, total_steps):
batches = x.size(0)
batchSize = x.size(0)
for b in range(batchSize):
for c in range(len(LUTs)):
x[b][c] += (LUTs[c] - x[b][c].mean()) * strength
for b in range(batches):
for c in range(4):
x[b][c] += (LUTs[c] - x[b][c].mean()) * strength
return original_callback(step, x0, x, total_steps)
return original_callback(step, x0, x, total_steps)
kwargs['callback'] = hijack_callback
return SAMPLE(*args, **kwargs)
disable_pbar = not comfy.utils.PROGRESS_BAR_ENABLED
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
denoise=denoise, disable_noise=disable_noise, start_step=start_step, last_step=last_step,
force_full_denoise=force_full_denoise, noise_mask=noise_mask, callback=hijack_callback, disable_pbar=disable_pbar, seed=seed)
return sample_center
out = latent.copy()
out["samples"] = samples
return (out,)
class CKSampler:
class UnhookCallback:
@classmethod
def INPUT_TYPES(s):
return { "required": { "latent": ("LATENT", ) } }
RETURN_TYPES = ("LATENT", )
FUNCTION = "unhook"
CATEGORY = "Diffusion CG"
def unhook(self, latent):
comfy.sample.sample_custom = ORIGINAL_SAMPLE_CUSTOM
comfy.sample.sample = ORIGINAL_SAMPLE
return (latent,)
class HookCallback:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"model": ("MODEL",),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
"steps": ("INT", {"default": 20, "min": 1, "max": 10000}),
"cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
"sampler_name": (comfy.samplers.KSampler.SAMPLERS, ),
"scheduler": (comfy.samplers.KSampler.SCHEDULERS, ),
"positive": ("CONDITIONING", ),
"negative": ("CONDITIONING", ),
"latent_image": ("LATENT", ),
"denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}),
"strength": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.1,
"round": 0.1, "display": "slider"}),
"C": ("FLOAT", {"default": 0.0126, "min": -1.0000, "max": 1.0000, "step": 0.0001, "round": False}),
"M": ("FLOAT", {"default": 0.5152, "min": -1.0000, "max": 1.0000, "step": 0.0001, "round": False}),
"Y": ("FLOAT", {"default": -0.1278, "min": -1.0000, "max": 1.0000, "step": 0.0001, "round": False}),
"K": ("FLOAT", {"default": 0.00, "min": -1.00, "max": 1.00, "step": 0.01, "round": False})
"prompt": ("CONDITIONING",),
"custom_sampler": ("BOOLEAN", {"default": False}),
"strength": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0,
"step": 0.1, "round": 0.1, "display": "slider"}),
"C": ("FLOAT", {"default": 0.01, "min": -1.00, "max": 1.00, "step": 0.01}),
"M": ("FLOAT", {"default": 0.51, "min": -1.00, "max": 1.00, "step": 0.01}),
"Y": ("FLOAT", {"default": -0.12, "min": -1.00, "max": 1.00, "step": 0.01}),
"K": ("FLOAT", {"default": 0.00, "min": -1.00, "max": 1.00, "step": 0.01})
}
}
RETURN_TYPES = ("LATENT",)
FUNCTION = "sample"
CATEGORY = "sampling"
RETURN_TYPES = ("CONDITIONING",)
FUNCTION = "hook"
CATEGORY = "Diffusion CG"
def sample(self, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise, strength, C, M, Y, K):
return center_ksampler([-K, -M, C, Y], strength, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
def hook(self, prompt, custom_sampler, strength, C, M, Y, K):
if custom_sampler:
comfy.sample.sample_custom = hijack(ORIGINAL_SAMPLE_CUSTOM, [-K, -M, C, Y], strength)
else:
comfy.sample.sample = hijack(ORIGINAL_SAMPLE, [-K, -M, C, Y], strength)
return (prompt,)
class HookCallbackXL:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"prompt": ("CONDITIONING",),
"custom_sampler": ("BOOLEAN", {"default": False}),
"strength": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0,
"step": 0.1, "round": 0.1, "display": "slider"}),
"L": ("FLOAT", {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.05}),
"a": ("FLOAT", {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.05}),
"b": ("FLOAT", {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.05})
}
}
RETURN_TYPES = ("CONDITIONING",)
FUNCTION = "hook"
CATEGORY = "Diffusion CG"
def hook(self, prompt, custom_sampler, strength, L, a, b):
if custom_sampler:
comfy.sample.sample_custom = hijack(ORIGINAL_SAMPLE_CUSTOM, [L, -a, b], strength)
else:
comfy.sample.sample = hijack(ORIGINAL_SAMPLE, [L, -a, b], strength)
return (prompt,)
-67
View File
@@ -1,67 +0,0 @@
import latent_preview
import comfy
import torch
def center_ksampler(LUTs, strength, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent, denoise=1.0, disable_noise=False, start_step=None, last_step=None, force_full_denoise=False):
latent_image = latent["samples"]
if disable_noise:
noise = torch.zeros(latent_image.size(), dtype=latent_image.dtype, layout=latent_image.layout, device="cpu")
else:
batch_inds = latent["batch_index"] if "batch_index" in latent else None
noise = comfy.sample.prepare_noise(latent_image, seed, batch_inds)
noise_mask = None
if "noise_mask" in latent:
noise_mask = latent["noise_mask"]
original_callback = latent_preview.prepare_callback(model, steps)
def hijack_callback(step, x0, x, total_steps):
batches = x.size(0)
for b in range(batches):
for c in range(3):
x[b][c] += (LUTs[c] - x[b][c].mean()) * strength
return original_callback(step, x0, x, total_steps)
disable_pbar = not comfy.utils.PROGRESS_BAR_ENABLED
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
denoise=denoise, disable_noise=disable_noise, start_step=start_step, last_step=last_step,
force_full_denoise=force_full_denoise, noise_mask=noise_mask, callback=hijack_callback, disable_pbar=disable_pbar, seed=seed)
out = latent.copy()
out["samples"] = samples
return (out,)
class CKSamplerXL:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"model": ("MODEL",),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
"steps": ("INT", {"default": 20, "min": 1, "max": 10000}),
"cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
"sampler_name": (comfy.samplers.KSampler.SAMPLERS, ),
"scheduler": (comfy.samplers.KSampler.SCHEDULERS, ),
"positive": ("CONDITIONING", ),
"negative": ("CONDITIONING", ),
"latent_image": ("LATENT", ),
"denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}),
"strength": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.1,
"round": 0.1, "display": "slider"}),
"L": ("FLOAT", {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.05, "round": False}),
"a": ("FLOAT", {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.05, "round": False}),
"b": ("FLOAT", {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.05, "round": False})
}
}
RETURN_TYPES = ("LATENT",)
FUNCTION = "sample"
CATEGORY = "sampling"
def sample(self, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise, strength, L, a, b):
return center_ksampler([L, -a, b], strength, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fad5e9d96da59657721e7dd88084f3b5b6b4e3d6273ba81ab977ed7015ee2f10
size 89771
oid sha256:dbbda98d15ded20936bbfee25bb6ec9ea10de7e8762112b06d0478961cb3fa6a
size 292905
-3
View File
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:040a4178d34622c0e444cef12bf0eb7ce429c59ff21a3a102a06d306087e5d71
size 102885
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a94db27e50f9a6bdc0534eae6fdff0dcc1a0b2097cfc5f03043ce0fce3896b43
size 398085
oid sha256:a758c4e20471fbd0e8fd428043fa3dbf10dae951992695b0a50f85770507900c
size 347450
-3
View File
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e4e42dfab9730af1cbc17d217b7b6dce1f0d82bdd4afade7ea92f5aacd17817c
size 438221
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2cefec2b4672d27c2f505e0615d769378d20048f1f58b2c1af33c3487e116979
size 1551287
-423
View File
@@ -1,423 +0,0 @@
{
"last_node_id": 19,
"last_link_id": 38,
"nodes": [
{
"id": 8,
"type": "VAEDecode",
"pos": [
1120,
300
],
"size": {
"0": 200,
"1": 46
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 38
},
{
"name": "vae",
"type": "VAE",
"link": 8
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
10
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 10,
"type": "PreviewImage",
"pos": [
1360,
120
],
"size": {
"0": 480,
"1": 480
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 10
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 5,
"type": "EmptyLatentImage",
"pos": [
440,
460
],
"size": {
"0": 300,
"1": 106
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
32
],
"slot_index": 0
}
],
"title": "Empty Latent",
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
512,
512,
1
]
},
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [
20,
160
],
"size": {
"0": 300,
"1": 98
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
29
],
"slot_index": 0
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
3,
5
],
"slot_index": 1
},
{
"name": "VAE",
"type": "VAE",
"links": [
8
],
"slot_index": 2
}
],
"title": "Checkpoint",
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"UHD-23.safetensors"
]
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
360,
240
],
"size": {
"0": 400,
"1": 150
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 5
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
31
],
"slot_index": 0
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"nsfw, (low quality, worst quality)"
]
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
360,
40
],
"size": {
"0": 400,
"1": 150
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
30
],
"slot_index": 0
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"(high quality, best quality), 1girl, solo, smile, blush, rooftop, sunset"
]
},
{
"id": 18,
"type": "Center Sampler",
"pos": [
780,
60
],
"size": {
"0": 300,
"1": 382
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 29,
"slot_index": 0
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 30,
"slot_index": 1
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 31,
"slot_index": 2
},
{
"name": "latent_image",
"type": "LATENT",
"link": 32,
"slot_index": 3
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
33
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Center Sampler"
},
"widgets_values": [
0,
"fixed",
24,
7.5,
"euler",
"normal",
1,
1,
0.0126,
0.5152,
-0.1278,
0
]
},
{
"id": 19,
"type": "Normalization",
"pos": [
1100,
180
],
"size": {
"0": 200,
"1": 26
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "latent",
"type": "LATENT",
"link": 33
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
38
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Normalization"
}
}
],
"links": [
[
3,
4,
1,
6,
0,
"CLIP"
],
[
5,
4,
1,
7,
0,
"CLIP"
],
[
8,
4,
2,
8,
1,
"VAE"
],
[
10,
8,
0,
10,
0,
"IMAGE"
],
[
29,
4,
0,
18,
0,
"MODEL"
],
[
30,
6,
0,
18,
1,
"CONDITIONING"
],
[
31,
7,
0,
18,
2,
"CONDITIONING"
],
[
32,
5,
0,
18,
3,
"LATENT"
],
[
33,
18,
0,
19,
0,
"LATENT"
],
[
38,
19,
0,
8,
0,
"LATENT"
]
],
"groups": [],
"config": {},
"extra": {},
"version": 0.4
}
-264
View File
@@ -1,264 +0,0 @@
{
"last_node_id": 17,
"last_link_id": 28,
"nodes": [
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [ 20.0, 160.0 ],
"size": {
"0": 300.0,
"1": 80.0
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [ 23 ],
"slot_index": 0
},
{
"name": "CLIP",
"type": "CLIP",
"links": [ 3, 5 ],
"slot_index": 1
},
{
"name": "VAE",
"type": "VAE",
"links": [ 8 ],
"slot_index": 2
}
],
"title": "Checkpoint",
"properties": { "Node name for S&R": "CheckpointLoaderSimple" },
"widgets_values": [ "sd_xl_base_1.0_0.9vae.safetensors" ]
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [ 360.0, 40.0 ],
"size": {
"0": 400.0,
"1": 150.0
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [ 21 ],
"slot_index": 0
}
],
"title": "Positive Prompt",
"properties": { "Node name for S&R": "CLIPTextEncode" },
"widgets_values": [ "photograph of woman in red dress in a luxury garden surrounded with blue, yellow, purple and flowers in many colors, high class, award-winning photography, Portra 400, full format. blue sky, intricate details even to the smallest particle, extreme detail of the environment, sharp portrait, well lit" ]
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [ 360.0, 240.0 ],
"size": {
"0": 400.0,
"1": 150.0
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 5
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [ 22 ],
"slot_index": 0
}
],
"title": "Negative Prompt",
"properties": { "Node name for S&R": "CLIPTextEncode" },
"widgets_values": [ "disfigured, ugly, deformed" ]
},
{
"id": 5,
"type": "EmptyLatentImage",
"pos": [ 440.0, 460.0 ],
"size": {
"0": 300.0,
"1": 100.0
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [ 18 ],
"slot_index": 0
}
],
"title": "Empty Latent",
"properties": { "Node name for S&R": "EmptyLatentImage" },
"widgets_values": [ 1024, 1024, 1 ]
},
{
"id": 16,
"type": "Center Sampler XL",
"pos": [ 780.0, 120.0 ],
"size": {
"0": 300.0,
"1": 340.0
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 23
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 21
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 22
},
{
"name": "latent_image",
"type": "LATENT",
"link": 18
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [ 25 ],
"shape": 3,
"slot_index": 0
}
],
"properties": { "Node name for S&R": "Center Sampler XL" },
"widgets_values": [ 0, "fixed", 24, 7.5, "dpmpp_2m", "karras", 1, 1, 0, 0, 0 ]
},
{
"id": 17,
"type": "NormalizationXL",
"pos": [ 1120.0, 200.0 ],
"size": {
"0": 200.0,
"1": 20.0
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "latent",
"type": "LATENT",
"link": 25
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [ 28 ],
"shape": 3,
"slot_index": 0
}
],
"properties": { "Node name for S&R": "NormalizationXL" }
},
{
"id": 8,
"type": "VAEDecode",
"pos": [ 1120.0, 300.0 ],
"size": {
"0": 200.0,
"1": 40.0
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 28
},
{
"name": "vae",
"type": "VAE",
"link": 8
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [ 10 ],
"slot_index": 0
}
],
"properties": { "Node name for S&R": "VAEDecode" }
},
{
"id": 10,
"type": "PreviewImage",
"pos": [ 1360.0, 120.0 ],
"size": [ 480.0, 480.0 ],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 10
}
],
"properties": { "Node name for S&R": "PreviewImage" }
}
],
"links": [
[ 3, 4, 1, 6, 0, "CLIP" ],
[ 5, 4, 1, 7, 0, "CLIP" ],
[ 8, 4, 2, 8, 1, "VAE" ],
[ 10, 8, 0, 10, 0, "IMAGE" ],
[ 18, 5, 0, 16, 3, "LATENT" ],
[ 21, 6, 0, 16, 1, "CONDITIONING" ],
[ 22, 7, 0, 16, 2, "CONDITIONING" ],
[ 23, 4, 0, 16, 0, "MODEL" ],
[ 25, 16, 0, 17, 0, "LATENT" ],
[ 28, 17, 0, 8, 0, "LATENT" ]
],
"groups": [],
"config": {},
"extra": {},
"version": 0.4
}
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b2a9bd49fed974a6be8f037b18d931d7fafcb663a6b67e496c4222c2fa61b52
size 2006928