fix sd21 conversion in colab

This commit is contained in:
Victor Hall 2023-02-08 20:39:36 -05:00
parent 0eb5a0c0e5
commit 51025b56c9
1 changed files with 3 additions and 1 deletions

View File

@ -192,6 +192,7 @@
"\n", "\n",
"img_size = 512\n", "img_size = 512\n",
"upscale_attention = False\n", "upscale_attention = False\n",
"prediction_type = \"epsilon\"\n",
"if model_type == \"SD1x\":\n", "if model_type == \"SD1x\":\n",
" inference_yaml = \"v1-inference.yaml\"\n", " inference_yaml = \"v1-inference.yaml\"\n",
"elif model_type == \"SD2_512_base\":\n", "elif model_type == \"SD2_512_base\":\n",
@ -199,6 +200,7 @@
" inference_yaml = \"v2-inference.yaml\"\n", " inference_yaml = \"v2-inference.yaml\"\n",
"elif model_type == \"SD21\":\n", "elif model_type == \"SD21\":\n",
" upscale_attention = True\n", " upscale_attention = True\n",
" prediction_type = \"v_prediction\"\n",
" inference_yaml = \"v2-inference-v.yaml\"\n", " inference_yaml = \"v2-inference-v.yaml\"\n",
" img_size = 768\n", " img_size = 768\n",
"\n", "\n",
@ -209,7 +211,7 @@
"--original_config_file {inference_yaml} \\\n", "--original_config_file {inference_yaml} \\\n",
"--image_size {img_size} \\\n", "--image_size {img_size} \\\n",
"--checkpoint_path {base_path} \\\n", "--checkpoint_path {base_path} \\\n",
"--prediction_type epsilon \\\n", "--prediction_type {prediction_type} \\\n",
"--upcast_attn False \\\n", "--upcast_attn False \\\n",
"--dump_path {save_name}" "--dump_path {save_name}"
] ]