Skip to content

Commit 127e9a3

Browse files
committed
up
1 parent 12ceecf commit 127e9a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/diffusers/modular_pipelines/modular_pipeline.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class ModularPipelineBlocks(ConfigMixin, PushToHubMixin):
232232

233233
config_name = "modular_config.json"
234234
model_name = None
235-
_requirements: Union[List[Tuple[str, str], Tuple[str, str]]] = None
235+
_requirements: Union[List[Tuple[str, str]], Tuple[str, str]] = None
236236

237237
@classmethod
238238
def _get_signature_keys(cls, obj):
@@ -275,7 +275,7 @@ def _get_required_inputs(self):
275275
def _get_requirements(self):
276276
if getattr(self, "_requirements", None) is not None:
277277
defined_reqs = self._requirements
278-
if not isinstance(defined_reqs):
278+
if not isinstance(defined_reqs, list):
279279
defined_reqs = [defined_reqs]
280280

281281
final_reqs = []
@@ -290,6 +290,7 @@ def _get_requirements(self):
290290
f"Version for {pkg} was specified to be {specified_ver} whereas the actual version found is {pkg_actual_ver}. Ignore if this is not concerning."
291291
)
292292
final_reqs.append((pkg, specified_ver))
293+
return final_reqs
293294

294295
else:
295296
return None

0 commit comments

Comments
 (0)