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

Function get_supported_pipeline_table

diffusers/utils/update_metadata.py:46–72  ·  view source on GitHub ↗

Generates a dictionary containing the supported auto classes for each pipeline type, using the content of the auto modules.

()

Source from the content-addressed store, hash-verified

44
45
46def get_supported_pipeline_table() -> dict:
47 """
48 Generates a dictionary containing the supported auto classes for each pipeline type,
49 using the content of the auto modules.
50 """
51 # All supported pipelines for automatic mapping.
52 all_supported_pipeline_classes = [
53 (class_name.__name__, "text-to-image", "AutoPipelineForText2Image")
54 for _, class_name in AUTO_TEXT2IMAGE_PIPELINES_MAPPING.items()
55 ]
56 all_supported_pipeline_classes += [
57 (class_name.__name__, "image-to-image", "AutoPipelineForImage2Image")
58 for _, class_name in AUTO_IMAGE2IMAGE_PIPELINES_MAPPING.items()
59 ]
60 all_supported_pipeline_classes += [
61 (class_name.__name__, "image-to-image", "AutoPipelineForInpainting")
62 for _, class_name in AUTO_INPAINT_PIPELINES_MAPPING.items()
63 ]
64 all_supported_pipeline_classes = list(set(all_supported_pipeline_classes))
65 all_supported_pipeline_classes.sort(key=lambda x: x[0])
66
67 data = {}
68 data["pipeline_class"] = [sample[0] for sample in all_supported_pipeline_classes]
69 data["pipeline_tag"] = [sample[1] for sample in all_supported_pipeline_classes]
70 data["auto_class"] = [sample[2] for sample in all_supported_pipeline_classes]
71
72 return data
73
74
75def update_metadata(commit_sha: str):

Callers 1

update_metadataFunction · 0.85

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected