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

Function get_objects_from_module

src/diffusers/utils/import_utils.py:939–957  ·  view source on GitHub ↗

Returns a dict of object names and values in a module, while skipping private/internal objects Args: 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

937
938
939def get_objects_from_module(module):
940 """
941 Returns a dict of object names and values in a module, while skipping private/internal objects
942
943 Args:
944 module (ModuleType):
945 Module to extract the objects from.
946
947 Returns:
948 dict: Dictionary of object names and corresponding values
949 """
950
951 objects = {}
952 for name in dir(module):
953 if name.startswith("_"):
954 continue
955 objects[name] = getattr(module, name)
956
957 return objects
958
959
960class 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…