vram management fix
This commit is contained in:
@@ -75,6 +75,9 @@ def enable_vram_management_recursively(model: torch.nn.Module, module_map: dict,
|
||||
for name, module in model.named_children():
|
||||
for source_module, target_module in module_map.items():
|
||||
if isinstance(module, source_module):
|
||||
if "rope_embedder" in name or "patch_embedding" in name:
|
||||
continue
|
||||
|
||||
num_param = sum(p.numel() for p in module.parameters())
|
||||
if max_num_param is not None and total_num_param + num_param > max_num_param:
|
||||
module_config_ = overflow_module_config
|
||||
|
||||
Reference in New Issue
Block a user