MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / warning_advice

Function warning_advice

diffusers/src/diffusers/utils/logging.py:268–276  ·  view source on GitHub ↗

This method is identical to `logger.warning()`, but if env var DIFFUSERS_NO_ADVISORY_WARNINGS=1 is set, this warning will not be printed

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

266
267
268def warning_advice(self, *args, **kwargs) -> None:
269 """
270 This method is identical to `logger.warning()`, but if env var DIFFUSERS_NO_ADVISORY_WARNINGS=1 is set, this
271 warning will not be printed
272 """
273 no_advisory_warnings = os.getenv("DIFFUSERS_NO_ADVISORY_WARNINGS", False)
274 if no_advisory_warnings:
275 return
276 self.warning(*args, **kwargs)
277
278
279logging.Logger.warning_advice = warning_advice

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected