mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-20 23:42:36 +08:00
Merge 76fe91c906 into 138571da95
This commit is contained in:
commit
267f3f1539
@ -425,6 +425,12 @@ class CLIP:
|
|||||||
return self.patcher.get_key_patches()
|
return self.patcher.get_key_patches()
|
||||||
|
|
||||||
def generate(self, tokens, do_sample=True, max_length=256, temperature=1.0, top_k=50, top_p=0.95, min_p=0.0, repetition_penalty=1.0, seed=None, presence_penalty=0.0):
|
def generate(self, tokens, do_sample=True, max_length=256, temperature=1.0, top_k=50, top_p=0.95, min_p=0.0, repetition_penalty=1.0, seed=None, presence_penalty=0.0):
|
||||||
|
if not hasattr(self.cond_stage_model, 'generate'):
|
||||||
|
raise RuntimeError(
|
||||||
|
f"The loaded model ({type(self.cond_stage_model).__name__}) does not support text generation. "
|
||||||
|
"The TextGenerate node requires a language model (LLM) such as Qwen, LLaMA, or Gemma, "
|
||||||
|
"not a CLIP text encoder. Please load the correct model type."
|
||||||
|
)
|
||||||
self.cond_stage_model.reset_clip_options()
|
self.cond_stage_model.reset_clip_options()
|
||||||
|
|
||||||
self.load_model(tokens)
|
self.load_model(tokens)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user