mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-07 07:42:32 +08:00
Make Qwen 8B work with TextGenerate node.
This commit is contained in:
parent
404d7b9978
commit
d4e5c07ebb
@ -224,7 +224,7 @@ class Qwen3_8BConfig:
|
|||||||
k_norm = "gemma3"
|
k_norm = "gemma3"
|
||||||
rope_scale = None
|
rope_scale = None
|
||||||
final_norm: bool = True
|
final_norm: bool = True
|
||||||
lm_head: bool = False
|
lm_head: bool = True
|
||||||
stop_tokens = [151643, 151645]
|
stop_tokens = [151643, 151645]
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@ -912,6 +912,9 @@ class BaseGenerate:
|
|||||||
class BaseQwen3:
|
class BaseQwen3:
|
||||||
def logits(self, x):
|
def logits(self, x):
|
||||||
input = x[:, -1:]
|
input = x[:, -1:]
|
||||||
|
if self.model.config.lm_head:
|
||||||
|
return self.model.lm_head(input)
|
||||||
|
|
||||||
module = self.model.embed_tokens
|
module = self.model.embed_tokens
|
||||||
|
|
||||||
offload_stream = None
|
offload_stream = None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user