MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / warning_advice

Function warning_advice

src/diffusers/utils/logging.py:266–274  ·  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

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected