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

推荐订阅源

IT之家
IT之家
Last Week in AI
Last Week in AI
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
宝玉的分享
宝玉的分享
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 司徒正美
罗磊的独立博客
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
小众软件
小众软件
Jina AI
Jina AI

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
FLUX fine-tunes are now fast – Replicate blog
2024-11-26 · via Replicate's blog

Posted November 26, 2024 by

You can fine-tune FLUX on Replicate with your own data. We’ve made running fine-tunes on Replicate much faster, and the optimizations are open-source.

This builds upon our work from last month, where we made the FLUX base models much faster.

Running a fine-tune is now the same speed as the base model:

In addition, the first time you run a fine-tune, it’ll take a bit of time to load the model. That’s usually about 2.5 seconds. Once it’s been loaded, we will attempt to route your requests to an instance that already has it loaded, and it will run as fast as the base model.

To enable all optimizations, pass go_fast=true to your prediction. If you omit the go_fast option, it will still be twice as fast as it was before, with no effect on output quality.

All models will get these optimizations automatically, both existing and future.

Load LoRAs from other places

If you’re not using Replicate to fine-tune models, we’ve also added support to load LoRAs from Hugging Face, Civitai, and arbitrary HTTP URLs.

Just pass a Hugging Face, Civitai, or HTTP URL to the lora_weights input in these new LoRA versions of FLUX:

How did we do it?

Most of the models on Replicate are contributed by our community, but we maintain the FLUX models in collaboration with Black Forest Labs.

We optimized the base models by using Alex Redden’s flux-fp8-api as a starting point, optimized it with torch.compile and then used fast CuDNN attention kernels in the nightly Torch builds. For more details, take a look at our blog post about optimizing the base models.

Fine-tunes on Replicate are represented as LoRAs. We quantize the LoRA as fp8, then merge the weights into the base model. We also automatically increase the lora_scale input by 1.5x when go_fast=true, because we’ve found that produces better output. You might want to play around with this too.

The quantization in flux-fp8-api slightly changes the output, but we have found it has little impact on the quality.

We want to be open with you about how we’re optimizing the models. It’s notoriously hard to compare output between models and providers, and it’s often unclear whether providers are doing things that impact the quality of the model. We’re just going to tell you how we did it and let you disable any optimizations.

Open-source should be fast too

Open-source models are often slow out of the box. Model providers then optimize these models to make them fast and release them behind proprietary APIs, without contributing the improvements back to the community.

We want to change that. We think open-source should be fast too.

We’re open-sourcing all the improvements we make to FLUX. Read more on our blog post about making the base models fast.

It’s going to get faster

This makes running fine-tuned models faster, but there is still work to be done to make the training process fast. Some major improvements to that are coming up next.

There are also new techniques coming out all the time to make models faster, and by collaborating with the community you can be sure they’re going to be on Replicate as fast as possible. Stay tuned.

Follow us on X to keep up to speed.