Foundation models
Model deployment is for the results of your fine-tuning runs. If you want to use foundation models — e.g. vanilla Stable Diffusion instead of your own fine-tuned version — you do not need to deploy the model yourself.
Instead, import foundation models from the baseten.models
subpackage to directly invoke already-deployed models.
Quickstart
Please refer to the individual model docs for more advanced usage of models. At a high level, you can interact with models like this:
Stable Diffusion
from baseten.models import StableDiffusionPipeline
sd = StableDiffusionPipeline()
image, url = sd("dog running on grass")
# To see the image
image.save("my-image.png")
More: Stable Diffusion model reference.
Whisper
from baseten.models import Whisper
whisper = Whisper()
transcribed = whisper("https://cdn.baseten.co/docs/production/Gettysburg.mp3")
More: Whisper model reference.
FLAN-T5
from baseten.models import FlanT5
flan = FlanT5()
generated = flan("Could Albert Einstein have attended the super bowl?")
More: FLAN-T5 model reference.