feature: `aimg model-list` command lists included models

pull/276/head
Bryce 1 year ago committed by Bryce Drennan
parent e3b23584ed
commit d14c8f98f4

@ -380,8 +380,20 @@ docker run -it --gpus all -v $HOME/.cache/huggingface:/root/.cache/huggingface -
## ChangeLog
**10.2.0**
- feature: input raw control images (a pose, canny map, depth map, etc) directly using `--control-image-raw`
This is opposed to current behavior of extracting the control signal from an input image via `--control-image`
- feature: `aimg model-list` command lists included models
- feature: system memory added to `aimg system-info` command
- fix: add missing metadata attributes to generated images
- fix: image composition step was producing unnecessarily blurry images
- refactor: split `aimg` cli code into multiple files
- docs: pypi docs now link properly to github automatically
**10.1.0**
- feature: 🎉 ControlNet integration! Control the structure of generated images.
- feature: `aimg colorize` attempts to use controlnet to colorize images
- feature: `--caption-text` command adds text at the bottom left of an image
**10.0.1**
- fix: `edit` was broken

@ -68,3 +68,22 @@ def system_info():
for k, v in get_debug_info().items():
k += ":"
click.secho(f"{k: <30} {v}")
@aimg.command("model-list")
def model_list_cmd():
"""Print list of available models."""
from imaginairy import config
print(f"{'ALIAS': <10} {'NAME': <18} {'DESCRIPTION'}")
for model_config in config.MODEL_CONFIGS:
print(
f"{model_config.alias: <10} {model_config.short_name: <18} {model_config.description}"
)
print("\nCONTROL MODES:")
print(f"{'ALIAS': <10} {'NAME': <18} {'CONTROL TYPE'}")
for control_mode in config.CONTROLNET_CONFIGS:
print(
f"{control_mode.alias: <10} {control_mode.short_name: <18} {control_mode.control_type}"
)

@ -17,6 +17,7 @@ SPLITMEM_ENABLED = False
@dataclass
class ModelConfig:
description: str
short_name: str
config_path: str
weights_url: str
@ -31,6 +32,7 @@ midas_url = "https://github.com/intel-isl/DPT/releases/download/1_0/dpt_hybrid-m
MODEL_CONFIGS = [
ModelConfig(
description="Stable Diffusion 1.4",
short_name="SD-1.4",
config_path="configs/stable-diffusion-v1.yaml",
weights_url="https://huggingface.co/bstddev/sd-v1-4/resolve/77221977fa8de8ab8f36fac0374c120bd5b53287/sd-v1-4.ckpt",
@ -38,6 +40,7 @@ MODEL_CONFIGS = [
alias="sd14",
),
ModelConfig(
description="Stable Diffusion 1.5",
short_name="SD-1.5",
config_path="configs/stable-diffusion-v1.yaml",
weights_url="https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/889b629140e71758e1e0006e355c331a5744b4bf/v1-5-pruned-emaonly.ckpt",
@ -46,6 +49,7 @@ MODEL_CONFIGS = [
alias="sd15",
),
ModelConfig(
description="Stable Diffusion 1.5 - Inpainting",
short_name="SD-1.5-inpaint",
config_path="configs/stable-diffusion-v1-inpaint.yaml",
weights_url="https://huggingface.co/julienacquaviva/inpainting/resolve/2155ff7fe38b55f4c0d99c2f1ab9b561f8311ca7/sd-v1-5-inpainting.ckpt",
@ -53,6 +57,7 @@ MODEL_CONFIGS = [
alias="sd15in",
),
ModelConfig(
description="Stable Diffusion 2.0 - bad at making people",
short_name="SD-2.0",
config_path="configs/stable-diffusion-v2-inference.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2-base/resolve/main/512-base-ema.ckpt",
@ -60,6 +65,7 @@ MODEL_CONFIGS = [
alias="sd20",
),
ModelConfig(
description="Stable Diffusion 2.0 - Inpainting",
short_name="SD-2.0-inpaint",
config_path="configs/stable-diffusion-v2-inpainting-inference.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2-inpainting/resolve/main/512-inpainting-ema.ckpt",
@ -67,6 +73,23 @@ MODEL_CONFIGS = [
alias="sd20in",
),
ModelConfig(
description="Stable Diffusion 2.0 v - 768x768 - bad at making people",
short_name="SD-2.0-v",
config_path="configs/stable-diffusion-v2-inference-v.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2/resolve/main/768-v-ema.ckpt",
default_image_size=768,
alias="sd20v",
),
ModelConfig(
description="Stable Diffusion 2.0 - Depth",
short_name="SD-2.0-depth",
config_path="configs/stable-diffusion-v2-midas-inference.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2-depth/resolve/main/512-depth-ema.ckpt",
default_image_size=512,
alias="sd20dep",
),
ModelConfig(
description="Stable Diffusion 2.1",
short_name="SD-2.1",
config_path="configs/stable-diffusion-v2-inference.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.ckpt",
@ -74,6 +97,7 @@ MODEL_CONFIGS = [
alias="sd21",
),
ModelConfig(
description="Stable Diffusion 2.1 - Inpainting",
short_name="SD-2.1-inpaint",
config_path="configs/stable-diffusion-v2-inpainting-inference.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2-inpainting/resolve/main/512-inpainting-ema.ckpt",
@ -81,6 +105,7 @@ MODEL_CONFIGS = [
alias="sd21in",
),
ModelConfig(
description="Stable Diffusion 2.1 v - 768x768",
short_name="SD-2.1-v",
config_path="configs/stable-diffusion-v2-inference-v.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.ckpt",
@ -89,20 +114,7 @@ MODEL_CONFIGS = [
alias="sd21v",
),
ModelConfig(
short_name="SD-2.0-v",
config_path="configs/stable-diffusion-v2-inference-v.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2/resolve/main/768-v-ema.ckpt",
default_image_size=768,
alias="sd20v",
),
ModelConfig(
short_name="SD-2.0-depth",
config_path="configs/stable-diffusion-v2-midas-inference.yaml",
weights_url="https://huggingface.co/stabilityai/stable-diffusion-2-depth/resolve/main/512-depth-ema.ckpt",
default_image_size=512,
alias="sd20dep",
),
ModelConfig(
description="Instruct Pix2Pix - Photo Editing",
short_name="instruct-pix2pix",
config_path="configs/instruct-pix2pix.yaml",
weights_url="https://huggingface.co/imaginairy/instruct-pix2pix/resolve/ea0009b3d0d4888f410a40bd06d69516d0b5a577/instruct-pix2pix-00-22000-pruned.ckpt",
@ -111,6 +123,7 @@ MODEL_CONFIGS = [
alias="edit",
),
ModelConfig(
description="OpenJourney V1",
short_name="openjourney-v1",
config_path="configs/stable-diffusion-v1.yaml",
weights_url="https://huggingface.co/prompthero/openjourney/resolve/7428477dad893424c92f6ea1cc29d45f6d1448c1/mdjrny-v4.safetensors",
@ -119,6 +132,7 @@ MODEL_CONFIGS = [
alias="oj1",
),
ModelConfig(
description="OpenJourney V2",
short_name="openjourney-v2",
config_path="configs/stable-diffusion-v1.yaml",
weights_url="https://huggingface.co/prompthero/openjourney-v2/resolve/47257274a40e93dab7fbc0cd2cfd5f5704cfeb60/openjourney-v2.ckpt",

Loading…
Cancel
Save