Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No-code/low-code notebook: fix sd 1.5 dreambooth model deployment section #2892

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -390,8 +390,8 @@
"# @markdown The model deployment step will take ~15 minutes to complete.\n",
"\n",
"# Sets the model_id to gs://{GCS_BUCKET}/dreambooth/output to load the OSS fine-tuned model.\n",
"model_text_to_image, endpoint_text_to_image = deploy_model(\n",
" model_id=f\"gs://{BUCKET_NAME}/dreambooth/output\", task=\"text-to-image\"\n",
"model, endpoint = deploy_model(\n",
" model_id=os.path.join(BUCKET_URI, \"dreambooth/output\"), task=\"text-to-image\"\n",
")"
]
},
Expand All @@ -410,12 +410,12 @@
"\n",
"# @markdown When deployed on one L4 GPU, the average inference time of a request is ~15 seconds.\n",
"\n",
"prompt = \"A serious capybara at work, wearing a suit\" # @param {type: \"string\"}\n",
"prompt = \"a photo of sks dog sitting in a bucket\" # @param {type: \"string\"}\n",
"\n",
"instances = [\n",
" {\"prompt\": prompt},\n",
"]\n",
"response = endpoint_text_to_image.predict(instances=instances)\n",
"response = endpoint.predict(instances=instances)\n",
"images = [base64_to_image(image) for image in response.predictions]\n",
"image_grid(images, rows=1)"
]
Expand Down