Building a text-to-image model with Flux Schnell
Model
class and load functionload
function of the Truss, we implement logic involved in
downloading and setting up the model. For this model, we use the
FluxPipeline
class in diffusers
to instantiate our Flux pipeline,
and configure a number of relevant parameters.
See the diffusers docs for details
on all of these parameters.
predict
function contains the actual inference logic. The steps here are:
config.yaml
diffusers
, transformers
, and others.
ffmpeg
and a couple other system
packages.
output_image.jpg
.