2023-02-24 14:33:07 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2023-07-27 14:54:01 +00:00
|
|
|
"""
|
2023-02-24 14:33:07 +00:00
|
|
|
This script is used at release time to generate a markdown table describing the
|
|
|
|
starter models. This text is then manually copied into 050_INSTALL_MODELS.md.
|
2023-07-27 14:54:01 +00:00
|
|
|
"""
|
2023-02-24 14:33:07 +00:00
|
|
|
|
|
|
|
from omegaconf import OmegaConf
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2023-07-27 14:54:01 +00:00
|
|
|
initial_models_file = Path(__file__).parent / "../invokeai/configs/INITIAL_MODELS.yaml"
|
2023-02-24 14:33:07 +00:00
|
|
|
models = OmegaConf.load(initial_models_file)
|
2023-07-27 14:54:01 +00:00
|
|
|
print("|Model Name | HuggingFace Repo ID | Description | URL |")
|
|
|
|
print("|---------- | ---------- | ----------- | --- |")
|
2023-02-24 14:33:07 +00:00
|
|
|
for model in models:
|
|
|
|
repo_id = models[model].repo_id
|
2023-07-27 14:54:01 +00:00
|
|
|
url = f"https://huggingface.co/{repo_id}"
|
|
|
|
print(f"|{model}|{repo_id}|{models[model].description}|{url} |")
|
2023-02-24 14:33:07 +00:00
|
|
|
|
2023-07-27 14:54:01 +00:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2023-02-24 14:33:07 +00:00
|
|
|
main()
|