Skip to content

Commit

Permalink
style edits
Browse files Browse the repository at this point in the history
Reviewers, please correct any inaccuracies I might introduced inadvertently. Thank you.
  • Loading branch information
angelinalg authored Oct 10, 2024
1 parent cc4d8fb commit bb023a4
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions templates/serve-stable-diffusion/README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Serving a Stable Diffusion Model with Ray Serve\n",
"# Serving a Stable Diffusion model with Ray Serve\n",
"\n",
"**⏱️ Time to complete**: 5 min (15 on GCP)\n",
"\n",
"This template shows you how to:\n",
"1. Develop and run a Ray Serve application running the SDXL diffusion model.\n",
"2. Send test requests to the application running locally.\n",
"3. Deploy the application to production as a service.\n",
"4. Send requests to the application running in production as a service."
"1. Develop and run a Ray Serve app running the SDXL diffusion model.\n",
"2. Send test requests to the app running locally.\n",
"3. Deploy the app to production as a service.\n",
"4. Send requests to the app running in production as a service."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 1: Install python dependencies\n",
"## Step 1: Install Python dependencies\n",
"\n",
"The application requires a few extra Python dependencies. Install them using `pip` and they'll be saved in the workspace and picked up when deploying to production."
"The app requires a few extra Python dependencies. Install them using `pip` and Anyscale saves them in the workspace and picks them up when deploying to production."
]
},
{
Expand All @@ -38,12 +38,12 @@
"metadata": {},
"source": [
"## Step 2: Run the model locally\n",
"- Run the command below in a VSCode terminal (Ctrl-`).\n",
"- The model will be available at http://localhost:8000.\n",
"- The command will block and print logs for the application.\n",
"- Run the command below in a VS Code terminal (Ctrl-`).\n",
"- The model is available at http://localhost:8000.\n",
"- The command blocks and prints logs for the app.\n",
"\n",
"```bash\n",
"# Run the following in a VSCode terminal because it's a blocking command.\n",
"# Run the following in a VS Code terminal because it's a blocking command.\n",
"$ serve run main:stable_diffusion_app\n",
"```"
]
Expand All @@ -56,7 +56,7 @@
"\n",
"The `generate_image` function sends an HTTP request to the model and saves the response as a local image.\n",
"\n",
"As the request to generate the image runs, logs will be printed to the terminal that is running `serve run`."
"As the request to generate the image runs, Anyscale prints logs to the terminal that's running `serve run`."
]
},
{
Expand Down Expand Up @@ -102,9 +102,9 @@
"\n",
"Deploy the model to production using the `anyscale service deploy` command.\n",
"\n",
"This creates a long-running [service](https://docs.anyscale.com/services/get-started) with a stable endpoint to query the application.\n",
"This command creates a long-running [service](https://docs.anyscale.com/services/get-started) with a stable endpoint to query the app.\n",
"\n",
"Local files and dependencies installed in the workspace are automatically included when the service is deployed."
"Local files and dependencies that you install in the workspace are automatically included when the service is deployed."
]
},
{
Expand All @@ -126,7 +126,7 @@
"1. Update the `HOST` to the service endpoint.\n",
"2. Add the authorization token as a header in the HTTP request.\n",
"\n",
"Both of these values are printed when you run `anyscale service deploy`. You can also find them on the service page. For example, if the output looks like:\n",
"Anyscale prints both of these values you run `anyscale service deploy`. You can also find them on the service page. For example, if the output looks like:\n",
"```bash\n",
"(anyscale +4.0s) You can query the service endpoint using the curl request below:\n",
"(anyscale +4.0s) curl -H 'Authorization: Bearer 26hTWi2kZwEz0Tdi1_CKRep4NLXbuuaSTDb3WMXK9DM' https://stable_diffusion_app-4rq8m.cld-ltw6mi8dxaebc3yf.s.anyscaleuserdata-staging.com\n",
Expand Down Expand Up @@ -183,10 +183,10 @@
"## Summary\n",
"\n",
"This notebook:\n",
"- Developed and ran a model serving application locally.\n",
"- Sent a test request to the application locally.\n",
"- Deployed the application to production as a service.\n",
"- Sent another test request to the application running as a service."
"- Developed and ran a model serving app locally.\n",
"- Sent a test request to the app locally.\n",
"- Deployed the app to production as a service.\n",
"- Sent another test request to the app running as a service."
]
},
{
Expand Down

0 comments on commit bb023a4

Please sign in to comment.