mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-23 21:00:16 +08:00
Add node to use different prompts for clip_l and qwen25_7b
This commit is contained in:
parent
4acd51abab
commit
910c47abc8
@ -105,12 +105,37 @@ class NormalizeVideoLatentFrames(io.ComfyNode):
|
|||||||
return io.NodeOutput(s)
|
return io.NodeOutput(s)
|
||||||
|
|
||||||
|
|
||||||
|
class CLIPTextEncodeKandinsky5(io.ComfyNode):
|
||||||
|
@classmethod
|
||||||
|
def define_schema(cls):
|
||||||
|
return io.Schema(
|
||||||
|
node_id="CLIPTextEncodeKandinsky5",
|
||||||
|
category="advanced/conditioning/kandinsky5",
|
||||||
|
inputs=[
|
||||||
|
io.Clip.Input("clip"),
|
||||||
|
io.String.Input("clip_l", multiline=True, dynamic_prompts=True),
|
||||||
|
io.String.Input("qwen25_7b", multiline=True, dynamic_prompts=True),
|
||||||
|
],
|
||||||
|
outputs=[
|
||||||
|
io.Conditioning.Output(),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def execute(cls, clip, clip_l, qwen25_7b) -> io.NodeOutput:
|
||||||
|
tokens = clip.tokenize(clip_l)
|
||||||
|
tokens["qwen25_7b"] = clip.tokenize(qwen25_7b)["qwen25_7b"]
|
||||||
|
|
||||||
|
return io.NodeOutput(clip.encode_from_tokens_scheduled(tokens))
|
||||||
|
|
||||||
|
|
||||||
class Kandinsky5Extension(ComfyExtension):
|
class Kandinsky5Extension(ComfyExtension):
|
||||||
@override
|
@override
|
||||||
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
||||||
return [
|
return [
|
||||||
Kandinsky5ImageToVideo,
|
Kandinsky5ImageToVideo,
|
||||||
NormalizeVideoLatentFrames
|
NormalizeVideoLatentFrames,
|
||||||
|
CLIPTextEncodeKandinsky5,
|
||||||
]
|
]
|
||||||
|
|
||||||
async def comfy_entrypoint() -> Kandinsky5Extension:
|
async def comfy_entrypoint() -> Kandinsky5Extension:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user