Add an optional preparation node that calls the verified native latent helper and returns both the prepared context and its exact shared target LATENT. Consume raw downscale metadata, preserve mask and foreign packet values, and bind provenance to the original packet, model, format and helper state. Keep existing consumer identity checks and the original seven node interfaces. Reject spatial resizing after an owned grounded wrapper has primed its VAE cache. Disabled preparation returns the original context and target unchanged. All 201 tests and required compile checks pass. Exact native caller/helper fixtures pass on Python 3.11 and 3.13; serving-host acceptance remains pending.
74 lines
3.6 KiB
Python
74 lines
3.6 KiB
Python
"""ComfyUI Krea Reference custom nodes.
|
|
|
|
This package registers the Krea 2 V9 and V10 reference-stack nodes and
|
|
the Concept Slider V1 nodes.
|
|
"""
|
|
|
|
from .kg_krea_v9 import KGKrea2ImageGuideCardV9, KGTextEncodeKreaImageReferencesV9
|
|
from .kg_krea_v10 import KGKrea2ImageGuideCardV10, KGTextEncodeKreaImageReferencesV10
|
|
from .kg_krea_slider import KGKrea2ConceptSliderCardV1, KGKrea2ConceptSliderStackV1
|
|
|
|
WEB_DIRECTORY = "./web"
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
"KGKrea2ImageGuideCardV9": KGKrea2ImageGuideCardV9,
|
|
"KGTextEncodeKreaImageReferencesV9": KGTextEncodeKreaImageReferencesV9,
|
|
"KGKrea2ImageGuideCardV10": KGKrea2ImageGuideCardV10,
|
|
"KGTextEncodeKreaImageReferencesV10": KGTextEncodeKreaImageReferencesV10,
|
|
"KGKrea2ConceptSliderCardV1": KGKrea2ConceptSliderCardV1,
|
|
"KGKrea2ConceptSliderStackV1": KGKrea2ConceptSliderStackV1,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"KGKrea2ImageGuideCardV9": "KG Krea 2 Image Guide Card V9",
|
|
"KGTextEncodeKreaImageReferencesV9": "KG Krea 2 Reference Stack Encoder V9",
|
|
"KGKrea2ImageGuideCardV10": "KG Krea 2 Image Guide Card V10",
|
|
"KGTextEncodeKreaImageReferencesV10": "KG Krea 2 Reference Stack Encoder V10",
|
|
"KGKrea2ConceptSliderCardV1": "KG Krea 2 Concept Slider Card V1",
|
|
"KGKrea2ConceptSliderStackV1": "KG Krea 2 Concept Slider Stack V1",
|
|
}
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|
|
|
|
from .kg_krea_v11 import KGKrea2ImageGuideCardV11, KGTextEncodeKreaImageReferencesV11, KGKrea2ConceptSliderCardV11, KGKrea2ConceptSliderStackV11
|
|
|
|
NODE_CLASS_MAPPINGS.update({
|
|
"KGKrea2ImageGuideCardV11": KGKrea2ImageGuideCardV11,
|
|
"KGTextEncodeKreaImageReferencesV11": KGTextEncodeKreaImageReferencesV11,
|
|
"KGKrea2ConceptSliderCardV11": KGKrea2ConceptSliderCardV11,
|
|
"KGKrea2ConceptSliderStackV11": KGKrea2ConceptSliderStackV11,
|
|
})
|
|
NODE_DISPLAY_NAME_MAPPINGS.update({
|
|
"KGKrea2ImageGuideCardV11": "KG Krea 2 Image Guide Card V11",
|
|
"KGTextEncodeKreaImageReferencesV11": "KG Krea 2 Reference Stack Encoder V11",
|
|
"KGKrea2ConceptSliderCardV11": "KG Krea 2 Concept Slider Card V11",
|
|
"KGKrea2ConceptSliderStackV11": "KG Krea 2 Concept Slider Stack V11",
|
|
})
|
|
|
|
from .kg_krea_v12 import (
|
|
KGKrea2PrepareNativeContextV12, KGKrea2NativeAxisV12, KGKrea2CombinedNativeStudiesV12,
|
|
KGKrea2NativePhaseGuiderV12, KGKrea2PrepareOwnedGroundedContextV12, KGKrea2RemoveOwnedReferenceV12,
|
|
KGKrea2NativeEnhancerV12, KGKrea2PrepareNativeTargetV12,
|
|
)
|
|
|
|
NODE_CLASS_MAPPINGS.update({
|
|
"KGKrea2PrepareNativeContextV12": KGKrea2PrepareNativeContextV12,
|
|
"KGKrea2NativeAxisV12": KGKrea2NativeAxisV12,
|
|
"KGKrea2CombinedNativeStudiesV12": KGKrea2CombinedNativeStudiesV12,
|
|
"KGKrea2NativePhaseGuiderV12": KGKrea2NativePhaseGuiderV12,
|
|
"KGKrea2PrepareOwnedGroundedContextV12": KGKrea2PrepareOwnedGroundedContextV12,
|
|
"KGKrea2RemoveOwnedReferenceV12": KGKrea2RemoveOwnedReferenceV12,
|
|
"KGKrea2NativeEnhancerV12": KGKrea2NativeEnhancerV12,
|
|
"KGKrea2PrepareNativeTargetV12": KGKrea2PrepareNativeTargetV12,
|
|
})
|
|
NODE_DISPLAY_NAME_MAPPINGS.update({
|
|
"KGKrea2PrepareNativeContextV12": "KG Krea 2 Prepare Native Context V12",
|
|
"KGKrea2NativeAxisV12": "KG Krea 2 Native Axis V12",
|
|
"KGKrea2CombinedNativeStudiesV12": "KG Krea 2 Combined Native Studies V12",
|
|
"KGKrea2NativePhaseGuiderV12": "KG Krea 2 Native Phase Guider V12",
|
|
"KGKrea2PrepareOwnedGroundedContextV12": "KG Krea 2 Prepare Owned Grounded Context V12",
|
|
"KGKrea2RemoveOwnedReferenceV12": "KG Krea 2 Remove Owned Reference V12",
|
|
"KGKrea2NativeEnhancerV12": "KG Krea 2 Native Enhancer V12",
|
|
"KGKrea2PrepareNativeTargetV12": "KG Krea 2 Prepare Native Target V12",
|
|
})
|