Skip to content

Commit

Permalink
Remove faulty adapter skip check in InvertibleAdaptersMixin (#634)
Browse files Browse the repository at this point in the history
Fixes #633.
  • Loading branch information
calpt authored Jan 9, 2024
1 parent 2e2f302 commit bca1ead
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/adapters/model_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ def _get_active_setup(self):
adapter_setup = self.adapters_config.active_setup
else:
adapter_setup = None
skip_adapters = adapter_setup is None or (
self.adapters_config.skip_layers is not None and self.layer_idx in self.adapters_config.skip_layers
)
if not skip_adapters and (len(adapter_setup.flatten()) > 0):
if adapter_setup is not None and (len(adapter_setup.flatten()) > 0):
return adapter_setup
else:
return None
Expand Down

0 comments on commit bca1ead

Please sign in to comment.