update diffusers to 0.9; add SD2

This commit is contained in:
Qing
2022-12-04 13:41:48 +08:00
parent 15fe87e42d
commit 6a0ffdc96e
7 changed files with 41 additions and 30 deletions

View File

@@ -10,7 +10,7 @@ def parse_args():
parser.add_argument(
"--model",
default="lama",
choices=["lama", "ldm", "zits", "mat", "fcf", "sd1.5", "cv2", "manga"],
choices=["lama", "ldm", "zits", "mat", "fcf", "sd1.5", "cv2", "manga", "sd2"],
)
parser.add_argument(
"--hf_access_token",
@@ -59,7 +59,7 @@ def parse_args():
if imghdr.what(args.input) is None:
parser.error(f"invalid --input: {args.input} is not a valid image file")
if args.model.startswith("sd") and not args.sd_run_local:
if args.model == 'sd1.5' and not args.sd_run_local:
if not args.hf_access_token.startswith("hf_"):
parser.error(
f"sd(stable-diffusion) model requires huggingface access token. Check how to get token from: https://huggingface.co/docs/hub/security-tokens"