Stable Diffusion 3 Large
ServerlessImageImg2Img
ServerlessImageImg2Img
The most capable text-to-image model produced by stability.ai, with greatly improved performance in multi-subject prompts, image quality, and spelling abilities. The Stable Diffusion 3 API is provided by Stability and the model is powered by Fireworks. Unlike other models on the Fireworks playground, you'll need a Stability API key to use this model. To use the API directly, visit https://platform.stability.ai/docs/api-reference#tag/Generate/paths/~1v2beta~1stable-image~1generate~1sd3/post
Stable Diffusion 3 Largeis available via partnership with Stability AI, in which Fireworks powers the underlying API. You must use a Stability API key and will be billed by Stability for usage, instead of Fireworks. See the API code example below or see the Stability API docs for full details.
Generate an image response for the given prompt.
import requests response = requests.post( f"https://api.stability.ai/v2beta/stable-image/generate/sd3", headers={ "authorization": f"Bearer sk-<STABILITY_API_KEY>", "accept": "image/*" }, files={"none": ''}, data={ mode="text-to-image", aspect_ratio="1:1", output_format="png", model="sd3", }, ) if response.status_code == 200: with open("./<DEFAULT_IMAGE_NAME>.png", 'wb') as file: file.write(response.content) else: raise Exception(str(response.json()))