[diffusion] chore: further improve model searching logic (#14484)

This commit is contained in:
Mick
2025-12-05 15:04:55 +08:00
committed by GitHub
parent b76e303e6a
commit beec8eed6a
2 changed files with 16 additions and 7 deletions

View File

@@ -120,7 +120,8 @@ class ComponentLoader(ABC):
self.device = device
def should_offload(self, server_args, model_config: ModelConfig | None = None):
raise NotImplementedError()
# offload by default
return True
def target_device(self, should_offload):
if should_offload: