add batching failure spam logs

This commit is contained in:
Concedo 2026-05-16 23:21:01 +08:00
parent 9203b6a051
commit 47d5772fbe

View file

@ -2288,29 +2288,31 @@ def continuous_batching_python_eligible(genparams, api_format):
return False
model_path = str(getattr(args, "model_param", "") or "").lower()
if model_path and not model_path.endswith(".gguf"):
utfprint("Batching disabled due to file format",2)
return False
if not getattr(args, "noshift", False) or getattr(args, "smartcontext", False) or getattr(args, "draftmodel", "") or getattr(args, "enableguidance", False):
utfprint("Batching disabled due to loaded settings",2)
return False
if genparams.get("negative_prompt") or genparams.get("images") or genparams.get("audio"):
utfprint("Batching disabled due to media",0)
utfprint("Batching disabled due to media",2)
return False
if genparams.get("grammar") or genparams.get("grammar_retain_state") or genparams.get("banned_tokens") or genparams.get("banned_strings"):
utfprint("Batching disabled due to grammar or bans",0)
utfprint("Batching disabled due to grammar or bans",2)
return False
if tryparsefloat(genparams.get("dry_multiplier", 0), 0) or tryparseint(genparams.get("mirostat", 0), 0) or tryparsefloat(genparams.get("xtc_probability", 0), 0) or tryparsefloat(genparams.get("nsigma", 0), 0):
utfprint("Batching disabled due to samplers set 1",0)
utfprint("Batching disabled due to samplers set 1",2)
return False
if tryparsefloat(genparams.get("smoothing_factor", 0), 0) or tryparsefloat(genparams.get("adaptive_target", -1), -1) > 0 or genparams.get("using_openai_tools", False):
utfprint("Batching disabled due to samplers set 2",0)
utfprint("Batching disabled due to samplers set 2",2)
return False
if tryparsefloat(genparams.get("top_a", 0), 0) or tryparsefloat(genparams.get("tfs", 1), 1) != 1 or tryparsefloat(genparams.get("dynatemp_range", 0), 0):
utfprint("Batching disabled due to samplers set 3",0)
utfprint("Batching disabled due to samplers set 3",2)
return False
if genparams.get("sampler_order") and genparams.get("sampler_order") != [6, 0, 1, 3, 4, 2, 5]:
utfprint("Batching disabled due to sampler order",0)
utfprint("Batching disabled due to sampler order",2)
return False
if genparams.get("reasoning_effort"):
utfprint("Batching disabled due to reasoning",0)
utfprint("Batching disabled due to reasoning",2)
return False
return True