MCPcopy Index your code
hub / github.com/huggingface/diffusers / check_min_version

Function check_min_version

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

Source from the content-addressed store, hash-verified

162
163
164def check_min_version(min_version):
165 if version.parse(__version__) < version.parse(min_version):
166 if "dev" in min_version:
167 error_message = (
168 "This example requires a source install from HuggingFace diffusers (see "
169 "`https://huggingface.co/docs/diffusers/installation#install-from-source`),"
170 )
171 else:
172 error_message = f"This example requires a minimum version of {min_version},"
173 error_message += f" but the version found is {__version__}.\n"
174 raise ImportError(error_message)

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…