Flux tutorials, Flux Quick Generate Image Painting Workflow Share

Recently, AI video modeling has been shared a lot, and graphical modeling has been shared a little less, and we haven't shared flux for a long time, so let's share flux today!

Today we're going to continue with flux acceleration techniques. We've covered a number of flux-accelerated graph acceleration techniques before, from Lora acceleration to torch.compile, and more recently TeaCache and WaveSpeed, to name a few.

With these acceleration techniques, flux can run locally with 4090, and it can already do 10s out of the map.

However, it is clear that the open source community is still not satisfied with this speed, and launched nunchaku, in the premise of not losing the quality of the flux map, hard to flux's speed continues to be compressed by a large part of the speed, to achieve 3s of the speed of the map. Thinking back to the speed of flux when it first came out, it really feels like a dream!

nunchaku has been out for a while, I think there are a lot of friends have been used, but there should be some friends still do not know, just take advantage of the recent nunchaku updated version 2.0, let's share a wave.

This update introduces the First-Block Cache acceleration module, which makes mapping faster and provides multi-Lora and ControlNet support.

Okay, without further ado, let’s get started.

First, let's look at the simplest flux of the text of the map operation, 1024 * 1024 resolution 25 steps, the speed of the map is basically maintained at 3s, which in the past completely unimaginable ah!

312757cej00sufmm70020d000u000c0p

And the quality of the output is still online, on the left is nunchaku accelerated, on the right is the effect of flux natively without acceleration.

e90362e9j00sufmme001nd000u000dtp

The workflow is as follows:

d1c7eb97j00sufmn3001td000u000c6p

Let's look at this node, model_path is mainly used to switch between models, you can switch between flux-dev, flux-schnell and flux-fill.

cache_threshold is the acceleration node, the bigger the value, the faster the acceleration, we recommend using 0.12, if you feel that the quality of the image is reduced, you can reduce this value. If you think the quality of the image will decrease, you can reduce this value. Setting it to 0 is also possible, nunchaku itself is fast enough, without using this acceleration node, the image can be kept at 5s.

The other parameters will be fine by default, but remember to turn on the i2f_mode switch if we have a 20-series graphics card.

5251b985j00sufmne000hd000bb007kp

Lora using flux can be supported directly without special handling.

63b5eaa1j00sufmnl001wd000u000eyp

The ControlNet model can also be used directly, and the speed is quite fast, the graph can be produced in 10s.

e202f748j00sufmnu002ad000u000g4p

Nunchaku also supports FLUX.1-tools full bucket, here's the flux-fill repaint workflow, which is still fast, 3 seconds.

2b59a24ej00sufmo2001gd000u0008rp

flux-canny:

b2f80adaj00sufmoa001wd000u000axp

flux-depth:

0b0df172j00sufmog0016d000u0008np

Both canny and depth are also 3 seconds, and the most important part of flux, redux, is also working fine, with the same strong 3-second output speed.

542c2dd5j00sufmoo002id000u000j1p

Regardless of the workflow, the acceleration is very noticeable and does not affect the output.

Let's see exactly how to install it. First we need to make sure we have PyTorch >= 2.5, which can be viewed in the comfyui backend after startup.

062f8b73j00sufmov000jd000gc004sp

If the version is smaller than this one, you need to upgrade it. If you are using the Autumn Leaves launcher, you can upgrade the PyTorch version in Advanced Options - Environment Maintenance.

a9b6dda2j00sufmp1000zd000u000aop

Before upgrading, remember to make a backup of your environment, so that if you have problems upgrading, you can switch to the old version. When installing plug-ins that you are not sure will damage your environment, you can also backup your python environment first, just in case!

504842e0j00sufmp9000ed000ak006ap

After upgrading your PyTorch version, you need to install the corresponding version of nunchaku's wheel:

https://modelscope.cn/models/Lmxyy1999/nunchaku/files

Listen to the rain here is PyTorch = 2.5.1, python version is 3.10, Windows version, then choose this version in the red box. According to your own version to select the corresponding wheel to download.

c88a9a1bj00sufmpi001rd000to00hnp

After downloading, you still need to install it directly. You can put the installer file directly into our python folder, mainly for convenience, but you can put it in any other folder as well.

e3ac8302j00sufmpw000td000gv00a6p

Then type cmd in the directory field of the folder, hit enter to open the Windows command prompt tool, type the following command and hit enter to install the environment:

python.exe -m pip install “nunchaku-0.2.0%2Btorch2.5-cp310-cp310-win_amd64.whl”

Installation files to their own downloaded file shall prevail, their own copy of the file name to replace the file name within double quotes listen to the rain oh!

0b20312cj00sufmq2001rd000m300cdp

Next wait for the installation to complete on it, to here the pre-preparation work is completed.

Next we also need to install the plugin:ComfyUI-nunchaku, just install it directly from the comfyui manager.

Plugin address:https://github.com/mit-han-lab/ComfyUI-nunchaku

You also need to download the corresponding model, model listening to rain at the end of the article in the net disk, the need for small partners to take.

Then we can have fun! The pictures come out really fast! And the main thing is that the results are not discounted really well!

Okay, that’s all for today’s sharing. If you are interested, go and try it!

The model as well as the workflows are on the netbook, so help yourself if you need them:

https://pan.quark.cn/s/5ef5c8ddef77

statement:The content of the source of public various media platforms, if the inclusion of the content violates your rights and interests, please contact the mailbox, this site will be the first time to deal with.
Encyclopedia

Why aren't the AI videos you make catching fire? Are you making videos with these problems

2025-4-9 11:47:20

TutorialEncyclopedia

Make a free pop-up healing country cottage small yard nostalgia video with AI, strip by strip

2025-4-9 12:07:14

Zenium
Search