[Bugfix] Add Fake VllmConfig on NPU and add slicing/tiling args in Qwen-Image (#145)

Signed-off-by: gcanlin <canlinguosdu@gmail.com>
This commit is contained in:
Canlin Guo authored and GitHub committed 2025-12-01 16:40:01 +00:00
1 parent 98d94e0e3d
commit 7e60c49ce4
6 files changed
+39 -6

No files matched your search

+7
View File
@@ -24,6 +24,13 @@ def initialize_model(
module = importlib.import_module(module_name)
model_class = getattr(module, cls_name)
model = model_class(od_config=od_config, prefix=mod_relname)
# Configure VAE memory optimization settings from config
if hasattr(model.vae, "use_slicing"):
model.vae.use_slicing = od_config.vae_use_slicing
if hasattr(model.vae, "use_tiling"):
model.vae.use_tiling = od_config.vae_use_tiling
return model
else:
raise ValueError(f"Model class {od_config.model_class_name} not found in diffusion model registry.")