MCPcopy Index your code
hub / github.com/YesianRohn/TextSSR / check_min_version

Function check_min_version

diffusers/src/diffusers/utils/__init__.py:124–134  ·  view source on GitHub ↗
(min_version)

Source from the content-addressed store, hash-verified

122
123
124def check_min_version(min_version):
125 if version.parse(__version__) < version.parse(min_version):
126 if "dev" in min_version:
127 error_message = (
128 "This example requires a source install from HuggingFace diffusers (see "
129 "`https://huggingface.co/docs/diffusers/installation#install-from-source`),"
130 )
131 else:
132 error_message = f"This example requires a minimum version of {min_version},"
133 error_message += f" but the version found is {__version__}.\n"
134 raise ImportError(error_message)

Calls

no outgoing calls

Tested by

no test coverage detected