Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/peft/tuners/tuners_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,8 +1444,6 @@ def _move_adapter_to_device_of_base_layer(self, adapter_name: str, device: Optio
# no break encountered: could not determine the device
return

meta = torch.device("meta")

# loop through all potential adapter layers and move them to the device of the base layer; be careful to only
# move this specific adapter to the device, as the other adapters could be on different devices
# see #1639
Expand All @@ -1455,8 +1453,6 @@ def _move_adapter_to_device_of_base_layer(self, adapter_name: str, device: Optio
continue
if adapter_name not in adapter_layer:
continue
if any(p.device == meta for p in adapter_layer.parameters()):
continue

# TODO: weight is not necessarily defined here, leading to a NameError, fix that
if weight.dtype.is_floating_point or weight.dtype.is_complex:
Expand Down