"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

April 08, 2024

Anyscale Endpoints discussion

Step #1 - Anyscale signup



Step #2 - Notebook for Deploying Diffusion models



Step #3 - Deploying Service Command



Step #4 - Service Deployment


Code Example - 


import requests
# Service specific config
base_url = "https://stable-diffusion-service.anyscaleuserdata.com"
token = "ABC"
# Requests config
path = "/imagine"
full_url = f"{base_url}{path}"
headers = {"Authorization": f"Bearer {token}"}
prompt = "BMW X1 with chrome box grill with a tall SUV Look"
image_size = 640
resp = requests.get(full_url, headers=headers,params={"prompt": prompt, "img_size": image_size})
image = resp.content
filename = "image.png"
with open(filename, "wb") as f:
f.write(image)
from IPython.display import Image
Image(filename=filename)

Keep Exploring!!!

No comments: