[Config] Remove diffusion_batch_size and use max_num_seqs instead. (#6484)
Signed-off-by: LyxWxj <yuxuanlou621@foxmail.com> Signed-off-by: Yuxuan Rho <104440472+LyxWxj@users.noreply.github.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
8e26dce1f4
commit
7992c2213e
16 files changed
+36
-95
No files matched your search
@@ -48,7 +48,6 @@ class InlineStageDiffusionClient(StageClientBase):
|
||||
model: str,
|
||||
od_config: OmniDiffusionConfig,
|
||||
metadata: StageMetadata,
|
||||
batch_size: int = 1,
|
||||
) -> None:
|
||||
self.model = model
|
||||
self.od_config = od_config
|
||||
@@ -63,7 +62,6 @@ class InlineStageDiffusionClient(StageClientBase):
|
||||
self.prompt_transform_func = None
|
||||
self.prompt_expand_func = None
|
||||
self.engine_input_source = metadata.engine_input_source
|
||||
self.batch_size = batch_size
|
||||
|
||||
self._enrich_config()
|
||||
self._engine = DiffusionEngine.make_engine(self.od_config)
|
||||
@@ -79,10 +77,10 @@ class InlineStageDiffusionClient(StageClientBase):
|
||||
self._engine.executor.register_failure_callback(self._mark_engine_dead)
|
||||
|
||||
logger.info(
|
||||
"[InlineStageDiffusionClient] stage-%s [rep-%s] initialized inline (batch_size=%d)",
|
||||
"[InlineStageDiffusionClient] stage-%s [rep-%s] initialized inline (max_num_seqs=%d)",
|
||||
self.stage_id,
|
||||
self.replica_id,
|
||||
self.batch_size,
|
||||
self.od_config.max_num_seqs,
|
||||
)
|
||||
|
||||
def _enrich_config(self) -> None:
|
||||
|
||||
@@ -49,14 +49,13 @@ def create_diffusion_client(
|
||||
od_config: OmniDiffusionConfig,
|
||||
metadata: StageMetadata,
|
||||
stage_init_timeout: int,
|
||||
batch_size: int = 1,
|
||||
use_inline: bool = False,
|
||||
) -> Any:
|
||||
"""Factory to create either an inline or out-of-process diffusion client."""
|
||||
if use_inline:
|
||||
from vllm_omni.diffusion.inline_stage_diffusion_client import InlineStageDiffusionClient
|
||||
|
||||
return InlineStageDiffusionClient(model, od_config, metadata, batch_size=batch_size)
|
||||
return InlineStageDiffusionClient(model, od_config, metadata)
|
||||
proc_manager = StageDiffusionProcManager(
|
||||
model=model,
|
||||
od_config=od_config,
|
||||
@@ -67,7 +66,6 @@ def create_diffusion_client(
|
||||
request_address=proc_manager.addresses.inputs[0],
|
||||
response_address=proc_manager.addresses.outputs[0],
|
||||
proc_manager=proc_manager,
|
||||
batch_size=batch_size,
|
||||
)
|
||||
|
||||
|
||||
@@ -91,14 +89,12 @@ class StageDiffusionClient(StageClientBase):
|
||||
response_address: str,
|
||||
*,
|
||||
proc_manager: StageDiffusionProcManager | None = None,
|
||||
batch_size: int = 1,
|
||||
) -> None:
|
||||
self._initialize_client(
|
||||
metadata,
|
||||
request_address,
|
||||
response_address,
|
||||
proc_manager=proc_manager,
|
||||
batch_size=batch_size,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@@ -109,7 +105,6 @@ class StageDiffusionClient(StageClientBase):
|
||||
response_address: str,
|
||||
*,
|
||||
proc_manager: StageDiffusionProcManager | None = None,
|
||||
batch_size: int = 1,
|
||||
) -> StageDiffusionClient:
|
||||
"""Create a client for an already-running diffusion subprocess."""
|
||||
return cls(
|
||||
@@ -117,7 +112,6 @@ class StageDiffusionClient(StageClientBase):
|
||||
request_address,
|
||||
response_address,
|
||||
proc_manager=proc_manager,
|
||||
batch_size=batch_size,
|
||||
)
|
||||
|
||||
def _initialize_client(
|
||||
@@ -127,7 +121,6 @@ class StageDiffusionClient(StageClientBase):
|
||||
response_address: str,
|
||||
*,
|
||||
proc_manager: StageDiffusionProcManager | None = None,
|
||||
batch_size: int,
|
||||
) -> None:
|
||||
self._set_stage_metadata(metadata)
|
||||
self._proc_manager = proc_manager
|
||||
@@ -144,11 +137,10 @@ class StageDiffusionClient(StageClientBase):
|
||||
self._start_proc_monitor()
|
||||
|
||||
logger.info(
|
||||
"[StageDiffusionClient] stage-%s [rep-%s] initialized (owns_process=%s, batch_size=%d)",
|
||||
"[StageDiffusionClient] stage-%s [rep-%s] initialized (owns_process=%s)",
|
||||
self.stage_id,
|
||||
self.replica_id,
|
||||
self._proc_manager is not None,
|
||||
batch_size,
|
||||
)
|
||||
|
||||
def _set_stage_metadata(self, metadata: StageMetadata) -> None:
|
||||
|
||||
Reference in new issue
Block a user