[Diffusion] Add native paged KV backend for diffusion workers (#6102)
Signed-off-by: Acerak01-fy <wfy2003324@163.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
c2daa471c3
commit
72ee535fcd
34 files changed
+4595
-71
No files matched your search
@@ -73,7 +73,13 @@ def initialize_diffusion_kv_control_plane(
|
||||
scheduler_kv_cache_config,
|
||||
vllm_config,
|
||||
)
|
||||
executor.set_kv_cache_configs(worker_configs)
|
||||
# Native sizing may auto-fit ``max_model_len=-1`` against the profiled
|
||||
# memory budget. Forward that final value so every Worker sizes its
|
||||
# physical BlockTables from the same bound as the Scheduler.
|
||||
resolved_max_model_len = vllm_config.model_config.max_model_len
|
||||
if type(resolved_max_model_len) is not int or resolved_max_model_len <= 0:
|
||||
raise ValueError("native Diffusion KV sizing must resolve a positive max_model_len")
|
||||
executor.set_kv_cache_configs(worker_configs, resolved_max_model_len)
|
||||
return (
|
||||
scheduler_kv_cache_config,
|
||||
scheduler_block_size,
|
||||
|
||||
Reference in new issue
Block a user