Skip to content

Commit 9c87b6c

Browse files
fix (#1963)
1 parent 83f8f6f commit 9c87b6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift/tuners/peft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def _create_and_replace_hook2(self, *args, **kwargs):
105105

106106
is_multimodal = getattr(self.model, 'is_multimodal', False)
107107

108-
if is_multimodal and target and (not any(
108+
if is_multimodal and target is not None and (not any(
109109
[name in target.__class__.__name__.lower()
110110
for name in all_supported_names]) and not any([isinstance(target, type) for type in all_supported_types])):
111111
return

0 commit comments

Comments
 (0)