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

Function _get_default_logging_level

src/diffusers/utils/logging.py:70–83  ·  view source on GitHub ↗

If DIFFUSERS_VERBOSITY env var is set to one of the valid choices return that as the new default level. If it is not - fall back to `_default_log_level`

()

Source from the content-addressed store, hash-verified

68
69
70def _get_default_logging_level() -> int:
71 """
72 If DIFFUSERS_VERBOSITY env var is set to one of the valid choices return that as the new default level. If it is
73 not - fall back to `_default_log_level`
74 """
75 env_level_str = os.getenv("DIFFUSERS_VERBOSITY", None)
76 if env_level_str:
77 if env_level_str in log_levels:
78 return log_levels[env_level_str]
79 else:
80 logging.getLogger().warning(
81 f"Unknown option DIFFUSERS_VERBOSITY={env_level_str}, has to be one of: {', '.join(log_levels.keys())}"
82 )
83 return _default_log_level
84
85
86def _get_library_name() -> str:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…