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

Function get_objects_from_module

src/diffusers/utils/import_utils.py:645–662  ·  view source on GitHub ↗

Args: Returns a dict of object names and values in a module, while skipping private/internal objects module (ModuleType): Module to extract the objects from. Returns: dict: Dictionary of object names and corresponding values

(module)

Source from the content-addressed store, hash-verified

643
644
645def get_objects_from_module(module):
646 """
647 Args:
648 Returns a dict of object names and values in a module, while skipping private/internal objects
649 module (ModuleType):
650 Module to extract the objects from.
651
652 Returns:
653 dict: Dictionary of object names and corresponding values
654 """
655
656 objects = {}
657 for name in dir(module):
658 if name.startswith("_"):
659 continue
660 objects[name] = getattr(module, name)
661
662 return objects
663
664
665class OptionalDependencyNotAvailable(BaseException):

Callers 15

__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected