Skip to content

Commit e7f7486

Browse files
Fix issue with weight attachments in build_model
1 parent be683e4 commit e7f7486

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

bioimageio/core/build_spec/build_model.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,7 @@ def _get_weights(original_weight_source, weight_type, source, root, **kwargs):
8080
else:
8181
source_hash = None
8282

83-
if "weight_attachments" in kwargs:
84-
attachments = {"attachments": ["weight_attachments"]}
85-
else:
86-
attachments = {}
87-
83+
attachments = {"attachments": kwargs["weight_attachments"]} if "weight_attachments" in kwargs else {}
8884
weight_types = model_spec.raw_nodes.WeightsFormat
8985
weight_source = _ensure_local_or_url(original_weight_source, root)
9086

0 commit comments

Comments
 (0)