Unverified Commit c36f8487 authored by Dhruv Nair's avatar Dhruv Nair Committed by GitHub
Browse files

Type annotation fix (#11597)

* update

* update
parent 54af3ca7
......@@ -1665,6 +1665,8 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
signature_types[k] = (v.annotation,)
elif get_origin(v.annotation) == Union:
signature_types[k] = get_args(v.annotation)
elif get_origin(v.annotation) in [List, Dict, list, dict]:
signature_types[k] = (v.annotation,)
else:
logger.warning(f"cannot get type annotation for Parameter {k} of {cls}.")
return signature_types
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment