Add context nodes with documentation
Implement context management system: - base_context.py: foundational context node - context.py: standard context handling - context_passthrough.py: pass-through node - even_larger_context.py: maximum context capacity - large_context_flux.py: Flux-specific large context - large_context_sdxl.py: SDXL-specific large context Add markdown documentation for all context nodes
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
from .nodes.context.base_context import TT_BaseContext
|
||||
from .nodes.context.context import TT_Context
|
||||
from .nodes.context.context_passthrough import TT_ContextPassthrough
|
||||
from .nodes.context.even_larger_context import TT_EvenLargerContext
|
||||
from .nodes.context.large_context_flux import TT_LargeContextFlux
|
||||
from .nodes.context.large_context_sdxl import TT_LargeContextSdxl
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
# Context
|
||||
"TT_BaseContext": TT_BaseContext,
|
||||
"TT_Context": TT_Context,
|
||||
"TT_LargeContextFlux": TT_LargeContextFlux,
|
||||
"TT_LargeContextSdxl": TT_LargeContextSdxl,
|
||||
"TT_EvenLargerContext": TT_EvenLargerContext,
|
||||
# Context Passthrough
|
||||
"TT_ContextPassthrough": TT_ContextPassthrough,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
# Context
|
||||
"TT_BaseContext": "TT Base Context",
|
||||
"TT_Context": "TT Context",
|
||||
"TT_LargeContextFlux": "TT FLUX Large Context",
|
||||
"TT_LargeContextSdxl": "TT SDXL Large Context",
|
||||
"TT_EvenLargerContext": "TT Even Larger Context",
|
||||
# Context Passthrough
|
||||
"TT_ContextPassthrough": "TT Context Passthrough",
|
||||
}
|
||||
|
||||
WEB_DIRECTORY = "./web"
|
||||
|
||||
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS', 'WEB_DIRECTORY']
|
||||
@@ -0,0 +1,22 @@
|
||||
from .context_helpers import create_context_schema
|
||||
|
||||
|
||||
class TT_BaseContext:
|
||||
INPUT_TYPES_DICT, RETURN_TYPES, RETURN_NAMES = create_context_schema("base")
|
||||
FUNCTION = "process_context"
|
||||
CATEGORY = "TenserTensor/Context"
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return cls.INPUT_TYPES_DICT
|
||||
|
||||
def process_context(self, workflow_config, model, clip, vae, latent):
|
||||
context = {
|
||||
"workflow_config": workflow_config,
|
||||
"model": model,
|
||||
"clip": clip,
|
||||
"vae": vae,
|
||||
"latent": latent,
|
||||
}
|
||||
|
||||
return (context,)
|
||||
@@ -0,0 +1,16 @@
|
||||
from .context_helpers import (build_return_tuple, create_context_schema, init_context)
|
||||
|
||||
|
||||
class TT_Context:
|
||||
INPUT_TYPES_DICT, RETURN_TYPES, RETURN_NAMES = create_context_schema("standard")
|
||||
FUNCTION = "process_context"
|
||||
CATEGORY = "TenserTensor/Context"
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return cls.INPUT_TYPES_DICT
|
||||
|
||||
def process_context(self, context=None, **kwargs):
|
||||
args = init_context(context, **kwargs)
|
||||
|
||||
return build_return_tuple("standard", args)
|
||||
@@ -0,0 +1,280 @@
|
||||
import comfy.samplers
|
||||
|
||||
CONTEXT_FIELDS = [
|
||||
# input_name, return_name, field_type
|
||||
("context", "CONTEXT", "TT_CONTEXT",),
|
||||
("model", "MODEL", "MODEL",),
|
||||
("clip", "CLIP", "CLIP",),
|
||||
("vae", "VAE", "VAE",),
|
||||
("latent", "LATENT", "LATENT",),
|
||||
("positive", "POSITIVE", "CONDITIONING"),
|
||||
("negative", "NEGATIVE", "CONDITIONING"),
|
||||
("image", "IMAGE", "IMAGE"),
|
||||
("mask", "MASK", "MASK"),
|
||||
("control_net", "CONTROL_NET", "CONTROL_NET"),
|
||||
("workflow_config", "WORKFLOW_CONFIG", "TT_WORKFLOW_CONFIG",),
|
||||
("seed", "SEED", "INT"),
|
||||
("steps", "STEPS", "INT"),
|
||||
("cfg", "CFG", "FLOAT"),
|
||||
("sampler_name", "SAMPLER_NAME", comfy.samplers.KSampler.SAMPLERS),
|
||||
("scheduler", "SCHEDULER", comfy.samplers.KSampler.SCHEDULERS),
|
||||
("guidance", "GUIDANCE", "FLOAT"),
|
||||
("clip_l_positive", "CLIP_L_POSITIVE", "STRING"),
|
||||
("clip_g_positive", "CLIP_L_POSITIVE", "STRING"),
|
||||
("t5xxl_positive", "T5XXL_POSITIVE", "STRING"),
|
||||
("clip_l_negative", "CLIP_L_NEGATIVE", "STRING"),
|
||||
("clip_g_negative", "CLIP_L_NEGATIVE", "STRING"),
|
||||
("t5xxl_negative", "T5XXL_NEGATIVE", "STRING"),
|
||||
("ascore_positive", "ASCORE_POSITIVE", "FLOAT"),
|
||||
("ascore_negative", "ASCORE_NEGATIVE", "FLOAT"),
|
||||
("width", "WIDTH", "INT"),
|
||||
("height", "HEIGHT", "INT"),
|
||||
("target_width", "TARGET_WIDTH", "INT"),
|
||||
("target_height", "TARGET_HEIGHT", "INT"),
|
||||
]
|
||||
|
||||
CONTEXTS = {
|
||||
"base": {
|
||||
"required": (
|
||||
"model",
|
||||
"clip",
|
||||
"vae",
|
||||
"latent",
|
||||
),
|
||||
"optional": (
|
||||
"workflow_config",
|
||||
),
|
||||
"return": (
|
||||
"context",
|
||||
)
|
||||
},
|
||||
"standard": {
|
||||
"optional": (
|
||||
"context",
|
||||
"workflow_config",
|
||||
"model",
|
||||
"clip",
|
||||
"vae",
|
||||
"positive",
|
||||
"negative",
|
||||
"latent",
|
||||
"image",
|
||||
"seed",
|
||||
"steps",
|
||||
"cfg",
|
||||
"sampler_name",
|
||||
"scheduler",
|
||||
)
|
||||
},
|
||||
"big_flux": {
|
||||
"optional": (
|
||||
"context",
|
||||
"workflow_config",
|
||||
"model",
|
||||
"clip",
|
||||
"vae",
|
||||
"positive",
|
||||
"negative",
|
||||
"latent",
|
||||
"image",
|
||||
"seed",
|
||||
"steps",
|
||||
"cfg",
|
||||
"sampler_name",
|
||||
"scheduler",
|
||||
"guidance",
|
||||
"clip_l_positive",
|
||||
"t5xxl_positive",
|
||||
"clip_l_negative",
|
||||
"t5xxl_negative",
|
||||
"width",
|
||||
"height",
|
||||
)
|
||||
},
|
||||
"big_sdxl": {
|
||||
"optional": (
|
||||
"context",
|
||||
"workflow_config",
|
||||
"model",
|
||||
"clip",
|
||||
"vae",
|
||||
"positive",
|
||||
"negative",
|
||||
"latent",
|
||||
"image",
|
||||
"seed",
|
||||
"steps",
|
||||
"cfg",
|
||||
"sampler_name",
|
||||
"scheduler",
|
||||
"guidance",
|
||||
"clip_l_positive",
|
||||
"clip_g_positive",
|
||||
"clip_l_negative",
|
||||
"clip_g_negative",
|
||||
"ascore_positive",
|
||||
"ascore_negative",
|
||||
"width",
|
||||
"width",
|
||||
"width",
|
||||
"height",
|
||||
"target_width",
|
||||
"target_height",
|
||||
)
|
||||
},
|
||||
"huge": {
|
||||
"optional": tuple(f[0] for f in CONTEXT_FIELDS)
|
||||
},
|
||||
"passthrough": {
|
||||
"required": (
|
||||
"context",
|
||||
)
|
||||
},
|
||||
}
|
||||
|
||||
FORCE_INPUT_TYPES = {
|
||||
"INT",
|
||||
"FLOAT",
|
||||
"STRING",
|
||||
"BOOLEAN",
|
||||
}
|
||||
|
||||
WORKFOW_SETTINGS_KEYS = [
|
||||
"seed",
|
||||
"steps",
|
||||
"cfg",
|
||||
"sampler_name",
|
||||
"scheduler",
|
||||
"pos_a_score",
|
||||
"clip_l_positive",
|
||||
"clip_g_positive",
|
||||
"t5xxl_positive",
|
||||
"neg_a_score",
|
||||
"clip_l_negative",
|
||||
"clip_g_negative",
|
||||
"t5xxl_negative",
|
||||
"guidance",
|
||||
"ascore_positive",
|
||||
"ascore_negative",
|
||||
"width",
|
||||
"height",
|
||||
"target_width",
|
||||
"target_height",
|
||||
]
|
||||
|
||||
|
||||
def _get_field_map():
|
||||
return {field[0]: (field[1], field[2]) for field in CONTEXT_FIELDS}
|
||||
|
||||
|
||||
def _get_input_types(field_map, fields):
|
||||
retval = {}
|
||||
for field_name in fields:
|
||||
field_type = field_map[field_name][1]
|
||||
|
||||
if isinstance(field_type, (list, tuple)) or field_type in FORCE_INPUT_TYPES:
|
||||
retval[field_name] = (field_type, {"forceInput": True})
|
||||
else:
|
||||
retval[field_name] = (field_type,)
|
||||
|
||||
return retval
|
||||
|
||||
|
||||
def _get_input_schema(context_name):
|
||||
context_def = CONTEXTS[context_name]
|
||||
field_map = _get_field_map()
|
||||
|
||||
input_types = {
|
||||
"required": _get_input_types(field_map, context_def.get("required", ())),
|
||||
"optional": _get_input_types(field_map, context_def.get("optional", ()))
|
||||
}
|
||||
|
||||
return input_types
|
||||
|
||||
|
||||
def _get_return_fields(context_name):
|
||||
context_def = CONTEXTS[context_name]
|
||||
|
||||
if "return" in context_def:
|
||||
return context_def.get("return", ())
|
||||
else:
|
||||
return context_def.get("required", ()) + context_def.get("optional", ())
|
||||
|
||||
|
||||
def _get_return_schema(context_name):
|
||||
field_map = _get_field_map()
|
||||
return_fields = _get_return_fields(context_name)
|
||||
|
||||
return_types = tuple(field_map[field][1] for field in return_fields)
|
||||
return_names = tuple(field_map[field][0] for field in return_fields)
|
||||
|
||||
return return_types, return_names
|
||||
|
||||
|
||||
def create_context_schema(context_name):
|
||||
input_types = _get_input_schema(context_name)
|
||||
return_types, return_names = _get_return_schema(context_name)
|
||||
|
||||
return input_types, return_types, return_names
|
||||
|
||||
|
||||
def init_context(context, **kwargs):
|
||||
field_map = _get_field_map()
|
||||
retval = {}
|
||||
|
||||
workflow_config = kwargs.get("workflow_config", None)
|
||||
|
||||
if workflow_config is None and context and "workflow_config" in context:
|
||||
workflow_config = context["workflow_config"]
|
||||
|
||||
if workflow_config:
|
||||
for key in WORKFOW_SETTINGS_KEYS:
|
||||
if key in workflow_config:
|
||||
retval[key] = workflow_config[key]
|
||||
|
||||
for idx in field_map:
|
||||
if idx == "context":
|
||||
continue
|
||||
|
||||
if idx in WORKFOW_SETTINGS_KEYS and idx in retval:
|
||||
val = kwargs.get(idx, None)
|
||||
if val is not None:
|
||||
retval[idx] = val
|
||||
continue
|
||||
|
||||
val = kwargs[idx] if idx in kwargs else None
|
||||
if val is not None:
|
||||
retval[idx] = val
|
||||
elif context and idx in context:
|
||||
retval[idx] = context[idx]
|
||||
else:
|
||||
retval[idx] = None
|
||||
|
||||
if any(k in retval for k in WORKFOW_SETTINGS_KEYS):
|
||||
retval["workflow_config"] = {
|
||||
"seed": retval.get("seed"),
|
||||
"steps": retval.get("steps"),
|
||||
"cfg": retval.get("cfg"),
|
||||
"sampler_name": retval.get("sampler_name"),
|
||||
"scheduler": retval.get("scheduler"),
|
||||
"clip_l_positive": retval.get("clip_l_positive"),
|
||||
"clip_g_positive": retval.get("clip_g_positive"),
|
||||
"t5xxl_positive": retval.get("t5xxl_positive"),
|
||||
"clip_l_negative": retval.get("clip_l_negative"),
|
||||
"clip_g_negative": retval.get("clip_g_negative"),
|
||||
"t5xxl_negative": retval.get("t5xxl_negative"),
|
||||
"guidance": retval.get("guidance"),
|
||||
"ascore_positive": retval.get("ascore_positive"),
|
||||
"ascore_negative": retval.get("ascore_negative"),
|
||||
"target_width": retval.get("target_width"),
|
||||
"target_height": retval.get("target_height"),
|
||||
}
|
||||
else:
|
||||
retval["workflow_config"] = workflow_config
|
||||
|
||||
return retval
|
||||
|
||||
|
||||
def build_return_tuple(context_name, args):
|
||||
context_fields = _get_return_fields(context_name)
|
||||
return tuple([args] + [args.get(field) for field in context_fields if field != "context"])
|
||||
@@ -0,0 +1,16 @@
|
||||
from .context_helpers import (build_return_tuple, create_context_schema, init_context)
|
||||
|
||||
|
||||
class TT_ContextPassthrough:
|
||||
INPUT_TYPES_DICT, RETURN_TYPES, RETURN_NAMES = create_context_schema("passthrough")
|
||||
FUNCTION = "process_context"
|
||||
CATEGORY = "TenserTensor/Context"
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return cls.INPUT_TYPES_DICT
|
||||
|
||||
def process_context(self, context=None, **kwargs):
|
||||
args = init_context(context, **kwargs)
|
||||
|
||||
return build_return_tuple("passthrough", args)
|
||||
@@ -0,0 +1,16 @@
|
||||
from .context_helpers import (build_return_tuple, create_context_schema, init_context)
|
||||
|
||||
|
||||
class TT_EvenLargerContext:
|
||||
INPUT_TYPES_DICT, RETURN_TYPES, RETURN_NAMES = create_context_schema("huge")
|
||||
FUNCTION = "process_context"
|
||||
CATEGORY = "TenserTensor/Context"
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return cls.INPUT_TYPES_DICT
|
||||
|
||||
def process_context(self, context=None, **kwargs):
|
||||
args = init_context(context, **kwargs)
|
||||
|
||||
return build_return_tuple("huge", args)
|
||||
@@ -0,0 +1,16 @@
|
||||
from .context_helpers import (build_return_tuple, create_context_schema, init_context)
|
||||
|
||||
|
||||
class TT_LargeContextFlux:
|
||||
INPUT_TYPES_DICT, RETURN_TYPES, RETURN_NAMES = create_context_schema("big_flux")
|
||||
FUNCTION = "process_context"
|
||||
CATEGORY = "TenserTensor/Context"
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return cls.INPUT_TYPES_DICT
|
||||
|
||||
def process_context(self, context=None, **kwargs):
|
||||
args = init_context(context, **kwargs)
|
||||
|
||||
return build_return_tuple("big_flux", args)
|
||||
@@ -0,0 +1,16 @@
|
||||
from .context_helpers import (build_return_tuple, create_context_schema, init_context)
|
||||
|
||||
|
||||
class TT_LargeContextSdxl:
|
||||
INPUT_TYPES_DICT, RETURN_TYPES, RETURN_NAMES = create_context_schema("big_sdxl")
|
||||
FUNCTION = "process_context"
|
||||
CATEGORY = "TenserTensor/Context"
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return cls.INPUT_TYPES_DICT
|
||||
|
||||
def process_context(self, context=None, **kwargs):
|
||||
args = init_context(context, **kwargs)
|
||||
|
||||
return build_return_tuple("big_sdxl", args)
|
||||
@@ -0,0 +1,30 @@
|
||||
## TT Base Context (TT_BaseContext)
|
||||
|
||||
*This description was generated with AI assistance. If you spot any errors, please create an issue on GitHub.*
|
||||
|
||||
Creates a foundational context object by combining essential workflow components.
|
||||
|
||||
### Inputs
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------------|--------------------|----------|---------------------------------|
|
||||
| model | MODEL | Yes | The diffusion model (UNet/DiT) |
|
||||
| clip | CLIP | Yes | CLIP text encoder |
|
||||
| vae | VAE | Yes | VAE for encoding/decoding |
|
||||
| latent | LATENT | Yes | Latent image tensor |
|
||||
| workflow_config | TT_WORKFLOW_CONFIG | No | Workflow configuration settings |
|
||||
|
||||
### Outputs
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------|------------|--------------------------------------------|
|
||||
| CONTEXT | TT_CONTEXT | Dictionary containing all input components |
|
||||
|
||||
### Usage
|
||||
|
||||
Use this node to package your core workflow components into a single context object that can be passed through your
|
||||
workflow and modified by other context nodes.
|
||||
|
||||
---
|
||||
|
||||
[View on GitHub](https://github.com/tenser-tensor/ComfyUI-TenserTensor)
|
||||
@@ -0,0 +1,48 @@
|
||||
## TT Context (TT_Context)
|
||||
|
||||
*This description was generated with AI assistance. If you spot any errors, please create an issue on GitHub.*
|
||||
|
||||
Standard context node that can create a new context or modify an existing one.
|
||||
|
||||
### Inputs
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------------|--------------------|----------|-----------------------------------------------------------|
|
||||
| context | TT_CONTEXT | No | Existing context to modify (if not provided, creates new) |
|
||||
| workflow_config | TT_WORKFLOW_CONFIG | No | Workflow configuration settings |
|
||||
| model | MODEL | No | The diffusion model (UNet/DiT) |
|
||||
| clip | CLIP | No | CLIP text encoder |
|
||||
| vae | VAE | No | VAE for encoding/decoding |
|
||||
| positive | CONDITIONING | No | Positive conditioning |
|
||||
| negative | CONDITIONING | No | Negative conditioning |
|
||||
| latent | LATENT | No | Latent image tensor |
|
||||
| image | IMAGE | No | Image tensor |
|
||||
| seed | INT | No | Random seed |
|
||||
| steps | INT | No | Sampling steps |
|
||||
| cfg | FLOAT | No | Classifier-free guidance scale |
|
||||
| sampler_name | COMBO | No | Sampler name |
|
||||
| scheduler | COMBO | No | Scheduler name |
|
||||
|
||||
### Outputs
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------------|--------------------|-----------------------------|
|
||||
| CONTEXT | TT_CONTEXT | Created or modified context |
|
||||
| WORKFLOW_CONFIG | TT_WORKFLOW_CONFIG | Workflow configuration |
|
||||
| MODEL | MODEL | Diffusion model |
|
||||
| CLIP | CLIP | Text encoder |
|
||||
| VAE | VAE | VAE |
|
||||
| POSITIVE | CONDITIONING | Positive conditioning |
|
||||
| NEGATIVE | CONDITIONING | Negative conditioning |
|
||||
| LATENT | LATENT | Latent tensor |
|
||||
| IMAGE | IMAGE | Image tensor |
|
||||
| SEED | INT | Random seed |
|
||||
| STEPS | INT | Sampling steps |
|
||||
| CFG | FLOAT | CFG scale |
|
||||
| SAMPLER_NAME | COMBO | Sampler name |
|
||||
| SCHEDULER | COMBO | Scheduler name |
|
||||
|
||||
### Usage
|
||||
|
||||
Use this node to create a new context from scratch or modify specific parameters in an existing context. All parameters
|
||||
are optional - provide only what you need to set or change.
|
||||
@@ -0,0 +1,26 @@
|
||||
## TT Context Passthrough (TT_ContextPassthrough)
|
||||
|
||||
*This description was generated with AI assistance. If you spot any errors, please create an issue on GitHub.*
|
||||
|
||||
Pass-through node that forwards context while allowing optional parameter modifications.
|
||||
|
||||
### Inputs
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------------|----------|-------------------------------|
|
||||
| context | TT_CONTEXT | Yes | Input context to pass through |
|
||||
|
||||
### Outputs
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------|------------|---------------------------------------------|
|
||||
| CONTEXT | TT_CONTEXT | Context with optionally modified parameters |
|
||||
|
||||
### Usage
|
||||
|
||||
Use this node to pass context through your workflow while optionally modifying specific parameters without changing the
|
||||
rest of the context.
|
||||
|
||||
---
|
||||
|
||||
[View on GitHub](https://github.com/tenser-tensor/ComfyUI-TenserTensor)
|
||||
@@ -0,0 +1,82 @@
|
||||
## TT Even Larger Context (TT_EvenLargerContext)
|
||||
|
||||
*This description was generated with AI assistance. If you spot any errors, please create an issue on GitHub.*
|
||||
|
||||
Maximum capacity context node supporting all workflow parameters including ControlNet and masking.
|
||||
|
||||
### Inputs
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------------|--------------------|----------|-----------------------------------------------------------|
|
||||
| context | TT_CONTEXT | No | Existing context to modify (if not provided, creates new) |
|
||||
| workflow_config | TT_WORKFLOW_CONFIG | No | Workflow configuration settings |
|
||||
| model | MODEL | No | The diffusion model (UNet/DiT) |
|
||||
| clip | CLIP | No | CLIP text encoder |
|
||||
| vae | VAE | No | VAE for encoding/decoding |
|
||||
| positive | CONDITIONING | No | Positive conditioning |
|
||||
| negative | CONDITIONING | No | Negative conditioning |
|
||||
| latent | LATENT | No | Latent image tensor |
|
||||
| image | IMAGE | No | Image tensor |
|
||||
| mask | MASK | No | Image mask |
|
||||
| control_net | CONTROL_NET | No | ControlNet model |
|
||||
| seed | INT | No | Random seed |
|
||||
| steps | INT | No | Sampling steps |
|
||||
| cfg | FLOAT | No | Classifier-free guidance scale |
|
||||
| sampler_name | SAMPLER | No | Sampler name |
|
||||
| scheduler | SCHEDULER | No | Scheduler name |
|
||||
| guidance | FLOAT | No | Guidance value |
|
||||
| clip_l_positive | STRING | No | CLIP-L positive prompt |
|
||||
| clip_g_positive | STRING | No | CLIP-G positive prompt |
|
||||
| t5xxl_positive | STRING | No | T5-XXL positive prompt |
|
||||
| clip_l_negative | STRING | No | CLIP-L negative prompt |
|
||||
| clip_g_negative | STRING | No | CLIP-G negative prompt |
|
||||
| t5xxl_negative | STRING | No | T5-XXL negative prompt |
|
||||
| ascore_positive | FLOAT | No | Aesthetic score for positive |
|
||||
| ascore_negative | FLOAT | No | Aesthetic score for negative |
|
||||
| width | INT | No | Image width |
|
||||
| height | INT | No | Image height |
|
||||
| target_width | INT | No | Target width for conditioning |
|
||||
| target_height | INT | No | Target height for conditioning |
|
||||
|
||||
### Outputs
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------------|--------------------|-----------------------------|
|
||||
| CONTEXT | TT_CONTEXT | Created or modified context |
|
||||
| WORKFLOW_CONFIG | TT_WORKFLOW_CONFIG | Workflow configuration |
|
||||
| MODEL | MODEL | Diffusion model |
|
||||
| CLIP | CLIP | Text encoder |
|
||||
| VAE | VAE | VAE |
|
||||
| POSITIVE | CONDITIONING | Positive conditioning |
|
||||
| NEGATIVE | CONDITIONING | Negative conditioning |
|
||||
| LATENT | LATENT | Latent tensor |
|
||||
| IMAGE | IMAGE | Image tensor |
|
||||
| MASK | MASK | Image mask |
|
||||
| CONTROL_NET | CONTROL_NET | ControlNet |
|
||||
| SEED | INT | Random seed |
|
||||
| STEPS | INT | Sampling steps |
|
||||
| CFG | FLOAT | CFG scale |
|
||||
| SAMPLER_NAME | SAMPLER | Sampler name |
|
||||
| SCHEDULER | SCHEDULER | Scheduler name |
|
||||
| GUIDANCE | FLOAT | Guidance value |
|
||||
| CLIP_L_POSITIVE | STRING | CLIP-L positive |
|
||||
| CLIP_G_POSITIVE | STRING | CLIP-G positive |
|
||||
| T5XXL_POSITIVE | STRING | T5-XXL positive |
|
||||
| CLIP_L_NEGATIVE | STRING | CLIP-L negative |
|
||||
| CLIP_G_NEGATIVE | STRING | CLIP-G negative |
|
||||
| T5XXL_NEGATIVE | STRING | T5-XXL negative |
|
||||
| ASCORE_POSITIVE | FLOAT | Aesthetic score positive |
|
||||
| ASCORE_NEGATIVE | FLOAT | Aesthetic score negative |
|
||||
| WIDTH | INT | Width |
|
||||
| HEIGHT | INT | Height |
|
||||
| TARGET_WIDTH | INT | Target width |
|
||||
| TARGET_HEIGHT | INT | Target height |
|
||||
|
||||
### Usage
|
||||
|
||||
Use this node when you need comprehensive control over all workflow parameters including ControlNet and masking.
|
||||
Supports both SDXL (CLIP-L/G) and Flux (T5-XXL) conditioning simultaneously.
|
||||
|
||||
---
|
||||
|
||||
[View on GitHub](https://github.com/tenser-tensor/ComfyUI-TenserTensor)
|
||||
@@ -0,0 +1,66 @@
|
||||
## TT FLUX Large Context (TT_LargeContextFlux)
|
||||
|
||||
*This description was generated with AI assistance. If you spot any errors, please create an issue on GitHub.*
|
||||
|
||||
Extended context node for Flux workflows with additional CLIP and T5 conditioning inputs.
|
||||
|
||||
### Inputs
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------------|--------------------|----------|-----------------------------------------------------------|
|
||||
| context | TT_CONTEXT | No | Existing context to modify (if not provided, creates new) |
|
||||
| workflow_config | TT_WORKFLOW_CONFIG | No | Workflow configuration settings |
|
||||
| model | MODEL | No | The diffusion model (UNet/DiT) |
|
||||
| clip | CLIP | No | CLIP text encoder |
|
||||
| vae | VAE | No | VAE for encoding/decoding |
|
||||
| positive | CONDITIONING | No | Positive conditioning |
|
||||
| negative | CONDITIONING | No | Negative conditioning |
|
||||
| latent | LATENT | No | Latent image tensor |
|
||||
| image | IMAGE | No | Image tensor |
|
||||
| seed | INT | No | Random seed |
|
||||
| steps | INT | No | Sampling steps |
|
||||
| cfg | FLOAT | No | Classifier-free guidance scale |
|
||||
| sampler_name | STRING | No | Sampler name |
|
||||
| scheduler | STRING | No | Scheduler name |
|
||||
| guidance | FLOAT | No | Flux guidance value |
|
||||
| clip_l_positive | STRING | No | CLIP-L positive prompt |
|
||||
| t5xxl_positive | STRING | No | T5-XXL positive prompt |
|
||||
| clip_l_negative | STRING | No | CLIP-L negative prompt |
|
||||
| t5xxl_negative | STRING | No | T5-XXL negative prompt |
|
||||
| width | INT | No | Image width |
|
||||
| height | INT | No | Image height |
|
||||
|
||||
### Outputs
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------------|--------------------|-----------------------------|
|
||||
| CONTEXT | TT_CONTEXT | Created or modified context |
|
||||
| WORKFLOW_CONFIG | TT_WORKFLOW_CONFIG | Workflow configuration |
|
||||
| MODEL | MODEL | Diffusion model |
|
||||
| CLIP | CLIP | Text encoder |
|
||||
| VAE | VAE | VAE |
|
||||
| POSITIVE | CONDITIONING | Positive conditioning |
|
||||
| NEGATIVE | CONDITIONING | Negative conditioning |
|
||||
| LATENT | LATENT | Latent tensor |
|
||||
| IMAGE | IMAGE | Image tensor |
|
||||
| SEED | INT | Random seed |
|
||||
| STEPS | INT | Sampling steps |
|
||||
| CFG | FLOAT | CFG scale |
|
||||
| SAMPLER_NAME | STRING | Sampler name |
|
||||
| SCHEDULER | STRING | Scheduler name |
|
||||
| GUIDANCE | FLOAT | Flux guidance |
|
||||
| CLIP_L_POSITIVE | STRING | CLIP-L positive |
|
||||
| T5XXL_POSITIVE | STRING | T5-XXL positive |
|
||||
| CLIP_L_NEGATIVE | STRING | CLIP-L negative |
|
||||
| T5XXL_NEGATIVE | STRING | T5-XXL negative |
|
||||
| WIDTH | INT | Width |
|
||||
| HEIGHT | INT | Height |
|
||||
|
||||
### Usage
|
||||
|
||||
Use this node for Flux workflows when you need fine-grained control over CLIP-L and T5-XXL prompts separately, along
|
||||
with Flux-specific guidance settings.
|
||||
|
||||
---
|
||||
|
||||
[View on GitHub](https://github.com/tenser-tensor/ComfyUI-TenserTensor)
|
||||
@@ -0,0 +1,74 @@
|
||||
## TT SDXL Large Context (TT_LargeContextSdxl)
|
||||
|
||||
*This description was generated with AI assistance. If you spot any errors, please create an issue on GitHub.*
|
||||
|
||||
Extended context node for SDXL workflows with CLIP-L/G conditioning and aesthetic score inputs.
|
||||
|
||||
### Inputs
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------------|--------------------|----------|-----------------------------------------------------------|
|
||||
| context | TT_CONTEXT | No | Existing context to modify (if not provided, creates new) |
|
||||
| workflow_config | TT_WORKFLOW_CONFIG | No | Workflow configuration settings |
|
||||
| model | MODEL | No | The diffusion model (UNet/DiT) |
|
||||
| clip | CLIP | No | CLIP text encoder |
|
||||
| vae | VAE | No | VAE for encoding/decoding |
|
||||
| positive | CONDITIONING | No | Positive conditioning |
|
||||
| negative | CONDITIONING | No | Negative conditioning |
|
||||
| latent | LATENT | No | Latent image tensor |
|
||||
| image | IMAGE | No | Image tensor |
|
||||
| seed | INT | No | Random seed |
|
||||
| steps | INT | No | Sampling steps |
|
||||
| cfg | FLOAT | No | Classifier-free guidance scale |
|
||||
| sampler_name | STRING | No | Sampler name |
|
||||
| scheduler | STRING | No | Scheduler name |
|
||||
| guidance | FLOAT | No | SDXL guidance value |
|
||||
| clip_l_positive | STRING | No | CLIP-L positive prompt |
|
||||
| clip_g_positive | STRING | No | CLIP-G positive prompt |
|
||||
| clip_l_negative | STRING | No | CLIP-L negative prompt |
|
||||
| clip_g_negative | STRING | No | CLIP-G negative prompt |
|
||||
| ascore_positive | FLOAT | No | Aesthetic score for positive |
|
||||
| ascore_negative | FLOAT | No | Aesthetic score for negative |
|
||||
| width | INT | No | Image width |
|
||||
| height | INT | No | Image height |
|
||||
| target_width | INT | No | Target width for conditioning |
|
||||
| target_height | INT | No | Target height for conditioning |
|
||||
|
||||
### Outputs
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-----------------|--------------------|-----------------------------|
|
||||
| CONTEXT | TT_CONTEXT | Created or modified context |
|
||||
| WORKFLOW_CONFIG | TT_WORKFLOW_CONFIG | Workflow configuration |
|
||||
| MODEL | MODEL | Diffusion model |
|
||||
| CLIP | CLIP | Text encoder |
|
||||
| VAE | VAE | VAE |
|
||||
| POSITIVE | CONDITIONING | Positive conditioning |
|
||||
| NEGATIVE | CONDITIONING | Negative conditioning |
|
||||
| LATENT | LATENT | Latent tensor |
|
||||
| IMAGE | IMAGE | Image tensor |
|
||||
| SEED | INT | Random seed |
|
||||
| STEPS | INT | Sampling steps |
|
||||
| CFG | FLOAT | CFG scale |
|
||||
| SAMPLER_NAME | STRING | Sampler name |
|
||||
| SCHEDULER | STRING | Scheduler name |
|
||||
| GUIDANCE | FLOAT | SDXL guidance |
|
||||
| CLIP_L_POSITIVE | STRING | CLIP-L positive |
|
||||
| CLIP_G_POSITIVE | STRING | CLIP-G positive |
|
||||
| CLIP_L_NEGATIVE | STRING | CLIP-L negative |
|
||||
| CLIP_G_NEGATIVE | STRING | CLIP-G negative |
|
||||
| ASCORE_POSITIVE | FLOAT | Aesthetic score positive |
|
||||
| ASCORE_NEGATIVE | FLOAT | Aesthetic score negative |
|
||||
| WIDTH | INT | Width |
|
||||
| HEIGHT | INT | Height |
|
||||
| TARGET_WIDTH | INT | Target width |
|
||||
| TARGET_HEIGHT | INT | Target height |
|
||||
|
||||
### Usage
|
||||
|
||||
Use this node for SDXL workflows when you need separate control over CLIP-L and CLIP-G prompts, aesthetic scores, and
|
||||
target dimensions for conditioning.
|
||||
|
||||
---
|
||||
|
||||
[View on GitHub](https://github.com/tenser-tensor/ComfyUI-TenserTensor)
|
||||
Reference in New Issue
Block a user