Make text generation work with ministral model. (#13395)
Some checks are pending
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Waiting to run
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Waiting to run
Execution Tests / test (macos-latest) (push) Waiting to run
Execution Tests / test (ubuntu-latest) (push) Waiting to run
Execution Tests / test (windows-latest) (push) Waiting to run
Test server launches without errors / test (push) Waiting to run
Unit Tests / test (macos-latest) (push) Waiting to run
Unit Tests / test (ubuntu-latest) (push) Waiting to run
Unit Tests / test (windows-2022) (push) Waiting to run

Needs template before it works properly.
This commit is contained in:
comfyanonymous 2026-04-13 17:43:57 -07:00 committed by GitHub
parent 402ff1cdb7
commit 722bc73319
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,6 +82,7 @@ class Ministral3_3BConfig:
rope_scale = None rope_scale = None
final_norm: bool = True final_norm: bool = True
lm_head: bool = False lm_head: bool = False
stop_tokens = [2]
@dataclass @dataclass
class Qwen25_3BConfig: class Qwen25_3BConfig:
@ -969,7 +970,7 @@ class Mistral3Small24B(BaseLlama, torch.nn.Module):
self.model = Llama2_(config, device=device, dtype=dtype, ops=operations) self.model = Llama2_(config, device=device, dtype=dtype, ops=operations)
self.dtype = dtype self.dtype = dtype
class Ministral3_3B(BaseLlama, torch.nn.Module): class Ministral3_3B(BaseLlama, BaseQwen3, BaseGenerate, torch.nn.Module):
def __init__(self, config_dict, dtype, device, operations): def __init__(self, config_dict, dtype, device, operations):
super().__init__() super().__init__()
config = Ministral3_3BConfig(**config_dict) config = Ministral3_3BConfig(**config_dict)