ComfyChair-Kompatibilität: Prompt über ReplicateTextEncode-Passthrough leiten

ComfyChairs Import-Mapping akzeptiert als Positive-Prompt-Quelle nur Nodes,
deren class_type CLIPTextEncode/*TextEncode*/*Prompt* enthält. Die generierten
Replicate_*-Nodes fallen durch → 'Fehlende Pflichtfelder: Positiver Prompt'.
Neuer Passthrough-Node ReplicateTextEncode + alle Templates umverdrahtet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019D2FYwPstKRfT5kh9M2kMS
This commit is contained in:
Pharma-Lobby
2026-07-12 18:45:50 +00:00
co-authored by Claude Fable 5
parent b307fc93a3
commit 0e50c34472
9 changed files with 115 additions and 15 deletions
Binary file not shown.
+30 -2
View File
@@ -215,6 +215,28 @@ def _make_node(model_def: dict):
return ReplicateModelNode
class ReplicateTextEncode:
"""Prompt-Passthrough (Text rein → Text raus).
Client-Apps wie ComfyChair erkennen den positiven Prompt nur an Nodes,
deren class_type 'TextEncode' oder 'Prompt' enthält — die generierten
Replicate_*-Nodes fallen durch diesen Filter. Prompt daher über diesen
Node in den prompt-Input des Modell-Nodes leiten.
"""
CATEGORY = CATEGORY_ROOT
FUNCTION = "run"
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("text",)
@classmethod
def INPUT_TYPES(cls):
return {"required": {"text": ("STRING", {"multiline": True, "default": ""})}}
def run(self, text):
return (text,)
class ReplicateCustom:
"""Beliebiges Replicate-Modell per ID aufrufen — der Escape-Hatch."""
@@ -261,8 +283,14 @@ def _load_catalog() -> dict:
return json.load(fh)
NODE_CLASS_MAPPINGS = {"ReplicateCustom": ReplicateCustom}
NODE_DISPLAY_NAME_MAPPINGS = {"ReplicateCustom": "Replicate Custom (beliebige Modell-ID)"}
NODE_CLASS_MAPPINGS = {
"ReplicateCustom": ReplicateCustom,
"ReplicateTextEncode": ReplicateTextEncode,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"ReplicateCustom": "Replicate Custom (beliebige Modell-ID)",
"ReplicateTextEncode": "Prompt (Replicate Select)",
}
for _model in _load_catalog()["models"]:
_cls = _make_node(_model)
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-replicate-select"
description = "Kuratierte Replicate-Modelle als ComfyUI-Nodes (Bild, Video, Upscale, TTS, Lipsync) + Custom-Node für beliebige Modell-IDs."
version = "0.2.0"
version = "0.2.1"
dependencies = ["replicate>=1.0.7"]
[tool.comfy]
+14 -2
View File
@@ -6,6 +6,15 @@
"seed": 0
},
"nodes": {
"0": {
"class_type": "ReplicateTextEncode",
"inputs": {
"text": "{{positive_prompt}}"
},
"_meta": {
"title": "Positive Prompt"
}
},
"1": {
"class_type": "LoadImage",
"inputs": {
@@ -18,7 +27,10 @@
"2": {
"class_type": "Replicate_lightricks_ltx_2_distilled",
"inputs": {
"prompt": "{{positive_prompt}}",
"prompt": [
"0",
0
],
"image": [
"1",
0
@@ -31,4 +43,4 @@
}
}
}
}
}
+14 -2
View File
@@ -6,6 +6,15 @@
"seed": 0
},
"nodes": {
"0": {
"class_type": "ReplicateTextEncode",
"inputs": {
"text": "{{positive_prompt}}"
},
"_meta": {
"title": "Positive Prompt"
}
},
"1": {
"class_type": "LoadImage",
"inputs": {
@@ -22,7 +31,10 @@
"1",
0
],
"prompt": "{{positive_prompt}}",
"prompt": [
"0",
0
],
"aspect_ratio": "{{aspect_ratio}}",
"seed": "{{seed}}"
},
@@ -44,4 +56,4 @@
}
}
}
}
}
+14 -2
View File
@@ -8,6 +8,15 @@
"seed": 0
},
"nodes": {
"0": {
"class_type": "ReplicateTextEncode",
"inputs": {
"text": "{{positive_prompt}}"
},
"_meta": {
"title": "Positive Prompt"
}
},
"1": {
"class_type": "LoadImage",
"inputs": {
@@ -20,7 +29,10 @@
"2": {
"class_type": "Replicate_wan_video_wan_2_2_i2v_fast",
"inputs": {
"prompt": "{{positive_prompt}}",
"prompt": [
"0",
0
],
"image": [
"1",
0
@@ -35,4 +47,4 @@
}
}
}
}
}
+14 -2
View File
@@ -9,10 +9,22 @@
"seed": 0
},
"nodes": {
"0": {
"class_type": "ReplicateTextEncode",
"inputs": {
"text": "{{positive_prompt}}"
},
"_meta": {
"title": "Positive Prompt"
}
},
"1": {
"class_type": "Replicate_wan_video_wan_2_2_t2v_fast",
"inputs": {
"prompt": "{{positive_prompt}}",
"prompt": [
"0",
0
],
"aspect_ratio": "{{aspect_ratio}}",
"resolution": "{{resolution}}",
"num_frames": "{{num_frames}}",
@@ -24,4 +36,4 @@
}
}
}
}
}
+14 -2
View File
@@ -8,10 +8,22 @@
"seed": 0
},
"nodes": {
"0": {
"class_type": "ReplicateTextEncode",
"inputs": {
"text": "{{positive_prompt}}"
},
"_meta": {
"title": "Positive Prompt"
}
},
"1": {
"class_type": "Replicate_prunaai_z_image_turbo",
"inputs": {
"prompt": "{{positive_prompt}}",
"prompt": [
"0",
0
],
"width": "{{width}}",
"height": "{{height}}",
"num_inference_steps": "{{steps}}",
@@ -35,4 +47,4 @@
}
}
}
}
}
+14 -2
View File
@@ -7,6 +7,15 @@
"seed": 0
},
"nodes": {
"0": {
"class_type": "ReplicateTextEncode",
"inputs": {
"text": "{{positive_prompt}}"
},
"_meta": {
"title": "Positive Prompt"
}
},
"1": {
"class_type": "LoadImage",
"inputs": {
@@ -19,7 +28,10 @@
"2": {
"class_type": "Replicate_prunaai_z_image_turbo_img2img",
"inputs": {
"prompt": "{{positive_prompt}}",
"prompt": [
"0",
0
],
"image": [
"1",
0
@@ -46,4 +58,4 @@
}
}
}
}
}