()
| 70 | |
| 71 | |
| 72 | def get_existing_components(): |
| 73 | pipelines_dir = os.path.join("src", "diffusers", "pipelines") |
| 74 | models_dir = os.path.join("src", "diffusers", "models") |
| 75 | |
| 76 | names = set() |
| 77 | for d in [pipelines_dir, models_dir]: |
| 78 | if os.path.isdir(d): |
| 79 | for entry in os.listdir(d): |
| 80 | if not entry.startswith("_") and not entry.startswith("."): |
| 81 | names.add(entry.replace(".py", "").lower()) |
| 82 | |
| 83 | return names |
| 84 | |
| 85 | |
| 86 | def main(): |