惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
小众软件
小众软件
博客园 - 【当耐特】
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
H
Help Net Security
博客园_首页
P
Proofpoint News Feed
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
N
Netflix TechBlog - Medium
爱范儿
爱范儿
MyScale Blog
MyScale Blog
Blog — PlanetScale
Blog — PlanetScale
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News

Replicate's blog

How to make remarkable videos with Seedance 2.0 – Replicate blog How to prompt Seedream 5.0 – Replicate blog Recraft V4: image generation with design taste – Replicate blog Run Isaac 0.1 on Replicate – Replicate blog Run FLUX.2 on Replicate – Replicate blog How to prompt Nano Banana Pro – Replicate blog Retro Diffusion's pixel art models are now on Replicate – Replicate blog Replicate is joining Cloudflare – Replicate blog Extract text from documents and images with Datalab Marker and OCR – Replicate blog How to prompt Veo 3.1 – Replicate blog IBM's Granite 4.0 is now on Replicate – Replicate blog Which image editing model should I use? – Replicate blog Introducing our new search API – Replicate blog Torch compile caching for inference speed – Replicate blog Announcing Replicate's remote MCP server – Replicate blog How to prompt Veo 3 with images – Replicate blog Open source video is back – Replicate blog Generate consistent characters – Replicate blog Bria is now on Replicate – Replicate blog How we optimized FLUX.1 Kontext [dev] – Replicate blog Compare AI video models – Replicate blog The FLUX.1 Kontext hackathon – Replicate blog How to prompt Veo 3 for the best results – Replicate blog Get the most from Google Veo 3 – Replicate blog FLUX.1 Kontext from the community – Replicate blog Use FLUX.1 Kontext to edit images with words – Replicate blog Generate incredible images with Google's Imagen 4 – Replicate blog Run OpenAI’s latest models on Replicate – Replicate blog NVIDIA H100 GPUs are here – Replicate blog Run 30,000+ LoRAs on Hugging Face with Replicate – Replicate blog
Push a custom version of Stable Diffusion 3 – Replicate blog
2024-06-14 · via Replicate's blog

When the first version of Stable Diffusion appeared back in August 2022, there was an explosion of innovation around it. In a matter of days after its release, the open-source community created lots of compelling derivatives, like the material diffusion models which generated tiling images, the inpainting models that gave you an AI paintbrush, and animation models that could interpolate between prompts.

Fast forward nearly two years, and Stable Diffusion 3 (SD3) just came out this week. People are hyped about the capabilities of this new model, and we expect to see a lot of the same open-source innovation we saw in Stable Diffusion’s early days.

In this post, we’ll show you how to get your own custom version of Stable Diffusion 3 running on Replicate.

Prerequisites

To follow this guide, you’ll need:

  • Git You’ll need Git to clone the cog-stable-diffusion-3 repository.
  • Docker. You’ll be using the Cog command-line tool to build and push your model. Cog uses Docker to create a container for your model. You’ll need to install and start Docker before you can run Cog. You can confirm Docker is running by typing docker info in your terminal.
  • An account on Replicate.

Step 0: Create your model on Replicate

Start off by creating a page for your model on Replicate. Visit replicate.com/create and you’ll see a form to create the model.

Create the model under your personal account, or in an organization if you want to share access to the model with your team. Choose the username or organization from top left corner of the screen.

Choose a name for your model, set the hardware to “GPU A40 Small”, and click Create.

Your model will be private by default, but you can make it public at any time, even after you create it.

Step 1: Install Cog

Next, you’ll use Cog to package SD3 and push it to Replicate. Cog is an open-source tool that makes it easy to put a machine learning model in a Docker container.

Run the following command to install Cog:

Step 2: Clone the SD3 repository

Next, use Git to clone the cog-stable-diffusion-3 repository:

This repo contains an implementation of SD3 that uses the popular Diffusers Python library.

Step 3: Push to Replicate

Now it’s time to push your model to Replicate:

The owner name and model name must match the values you set when you created the model above.

Note: You can also set the image property in your cog.yaml file. This allows you to run cog push without specifying the image, and also makes your model page on Replicate more discoverable for folks reading your model’s source code.

Step 4: Iterate

You should now have your own custom version of SD3 running on Replicate! You can run in on the Replicate website or via the API.

Now it’s time to start experimenting with the model to customize it to your needs. Here are some ideas:

Happy hacking!