---
title: "Deploying Hugging Face Models with BentoML: DeepFloyd IF in Action"
description: "DeepFloyd IF, a pixel-space text-to-image model with a T5-XXL text encoder and three cascaded diffusion stages (64px up to 1024px), can be packaged and served with BentoML by saving each stage's model to the BentoML Model Store, wrapping them as separate Runners in a Service, and building a Bento artifact."
url: "https://swe.quest/articles/deploying-hugging-face-models-with-bentoml-deepfloyd-if-in-action-f045cc78dfe6ecea"
canonical: "https://huggingface.co/blog/deploy-deepfloydif-using-bentoml"
source: "Hugging Face"
published: "2023-08-09"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["inference","ml-platform","computer-vision","python"]
---

# Deploying Hugging Face Models with BentoML: DeepFloyd IF in Action

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-08-09, 7 min read, How-to. Original: [https://huggingface.co/blog/deploy-deepfloydif-using-bentoml](https://huggingface.co/blog/deploy-deepfloydif-using-bentoml)

## Summary

DeepFloyd IF, a pixel-space text-to-image model with a T5-XXL text encoder and three cascaded diffusion stages (64px up to 1024px), can be packaged and served with BentoML by saving each stage's model to the BentoML Model Store, wrapping them as separate Runners in a Service, and building a Bento artifact. Because each stage is its own Runner, stages can be pinned to different GPUs (e.g. Stage 1 on one T4, Stages 2 and 3 on another) or scaled independently. Hardware guidance is at least 2x16GB or 1x40GB of VRAM. The resulting ~49 GiB Bento can be served directly, containerized with \`bentoml containerize\`, and deployed to Kubernetes.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- Python virtual environments ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- Hugging Face Hub
- GPU model inference ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))

## Keywords

BentoML, DeepFloyd IF, Hugging Face, Gradio, Yatai, T5-XXL, Diffusers

## Related posts

- [Running IF with 🧨 diffusers on a Free Tier Google Colab](https://swe.quest/articles/running-if-with-diffusers-on-a-free-tier-google-colab-9a5549301a25d556.md): Hugging Face · 2023-04-26 · Medium · 15 min read · Inference & serving, Computer vision, Python, Memory management
  DeepFloyd's IF, a pixel-space text-to-image model built on a T5-XXL text encoder with over 10B parameters, can run on a free-tier Google Colab (13 GB CPU RAM, 15 GB T4 VRAM) by loading its components one at a time with diffusers.
- [Welcome FLUX.3 Image Klein in Diffusers](https://swe.quest/articles/welcome-flux-3-image-klein-in-diffusers-478c83816e6db758.md): Hugging Face · 2026-10-15 · Medium · 16 min read · Computer vision, Inference & serving, Model training, Python
  FLUX.3 Image Klein from Black Forest Labs is supported in Diffusers from launch.
- [Deploy LLMs with Hugging Face Inference Endpoints](https://swe.quest/articles/deploy-llms-with-hugging-face-inference-endpoints-3facefc244b0efa0.md): Hugging Face · 2023-07-04 · Medium · 6 min read · Inference & serving, LLMs, Python, JavaScript
  Falcon 40B Instruct can be deployed to Hugging Face Inference Endpoints through the web UI by choosing a repository, cloud, region and instance.
- [Run ComfyUI workflows for free with Gradio on Hugging Face Spaces](https://swe.quest/articles/run-comfyui-workflows-for-free-with-gradio-on-hugging-face-spaces-4962232981692f52.md): Hugging Face · 2024-01-14 · Medium · 13 min read · Python, Inference & serving, Serverless, Computer vision, Deployment
  A ComfyUI node workflow can be turned into a standalone Gradio app and hosted for free on Hugging Face Spaces' serverless ZeroGPU tier.
- [Hugging Face Text Generation Inference available for AWS Inferentia2](https://swe.quest/articles/hugging-face-text-generation-inference-available-for-aws-inferentia2-4404accc08bd48f1.md): Hugging Face · 2024-02-01 · Medium · 7 min read · Inference & serving, LLMs, Cloud platforms, Python
  Text Generation Inference (TGI) is now generally available on AWS Inferentia2 through Amazon SageMaker, offering an alternative to GPUs for serving open LLMs such as Llama and Mistral.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
