How to make yourself in the fashionable neuron Flux (the easy way without SMS and registration)

LoRa could be trained through Civitai.com, Fal.ai, replicate.com. There was also an offline method, but it was quite hemorrhagic, with a lot of shamanism. I recently found a simple way through a thing called FluxGym, everything takes about 10 minutes.

Briefly, the default pipeline will be as follows: download the shell for neurons, set up Forge and FluxGym inside, launch FluxGym and train LoRA with your photos, combine all this, profit.

You will need a computer. My conditions for training LoRA are very favorable with the 3090, but I need at least 12 Gb of VRAM and about 30 gigs of storage for everything. Also prepare at least 10 pictures on which we will practice.

I assume that Flux itself is already installed. I have it in the Forge shell, installed separately earlier. But if suddenly not, then now I’ll show you what to do. The rest can ignore this point.

Step 1.

We need Pinokio is a shell for installing all sorts of neural network things. It is convenient for those who need to do everything in one click and not have to worry about paths, terminals, separate installation of everything, etc. But for those who haven’t given up on these shells, I’ll also give further advice. The shell also works as a browser, so after launching the necessary services, the admin panel will open directly in this software.

So, install it, select the folder where everything will be installed. Open Pinokio and go to Discover.

Step 2.
If you already have Forge with flux, then skip this step.

If you don’t have Flux installed, then enter the name of the Forge shell in the search, click Download, then click Install. It will download all the dependencies, Python, if not there, everything you need. This will all run in a separate venv, so if you already have Python, there shouldn’t be any conflicts. Once installed, the Forge admin panel will open, click “Stop” in the right panel. Then we'll play.

Step 3.

In the search we are looking for FluxGym. Clicks Download, then Install. It can download dependencies and ignore the presence of Python at the system level. Everything will be put in a folder in a separate environment.
If you don’t need all this duplication, then gitclone FluxGym separately here.

Step 4.

At this stage we have Forge (without Flux yet), FluxGym. We launch FluxGym through Pinokio. A window opens. At this point you need to prepare the pictures.

Here are the requirements for pictures. If you are training a person/character, then in a set of pictures you need different angles and poses. Preferably, different emotions on the face/muzzle. If you need to transfer a style, then it is advisable to prepare the highest quality pictures available with different frame compositions. You don’t need hundreds of pictures; 10–20 pictures are enough for a character. To transfer style, it’s better to have more – 40–50.

Fill in the name “The Name of your LoRA” – any, in Latin, preferably together.

Trigger word – we also come up with some kind of non-standard name; this, as the name suggests, will “call” your dataset in the prompt.

Base model – it is better to choose flux-dev, it will also work with the lighter version of Flux Schnell.

VRAM – choose what best suits your config.

Next, I left the “Repeat trains per image” and “Max Train Epochs” parameters as they are. They say that you need to increase these parameters if LoRA turns out to be buggy.

In Sample Image Prompts you can insert a Trigger word and some kind of prompt, and then, as additional training progresses, samples of generations will be issued, just to see how the AI ​​training is going. I left it blank.

Loading pictures. Previews with the trigger word will appear at the bottom. Now we need to describe all this – what is happening in each of the pictures. You can trust the description of the built-in feature. To do this, click “Add AI captions with Florence-2”. It will think for a couple of minutes and give birth to descriptions. They need to be looked through and edited if some nonsense suddenly appears there.

That’s it, click “Start Training” and wait. I finished it in a couple of hours. Trains for about 40 minutes on 10 pictures. More pictures means more time.

Step 5.

When everything is finished, LoRA will be in the folder pinokio\api\fluxgym.git\outputs

There will be a folder with the name of your ENT, inside there are several files. You need a name.safetensors, without numbers like 000 004/000 008. This file must be copied to the LoRA folder in Forge (something like models\Lora).

Step 6.

If you already have Flux in any of the shells, then that’s it, load LoRA and use it. If not, then if you have Forge installed separately, then in models\Stable‑diffusion you need download and install Flux.

If you only have Pinokio, you can download the Flux model through it. If there is enough video memory, then any one can be selected (DEV‑fp8). If the iron is weak, then GGUF – https://huggingface.co/lllyasviel/FLUX.1-dev‑gguf

Read in detail here: https://github.com/lllyasviel/stable-diffusion-webui-forge/discussions/1050

If nothing is downloaded and configured with Fluxthen be sure to go through the recommended settings, download and put vae in models\VAE, put clip-l and t5 in models\text_encoder.

Launch Forge, select flux1-dev (or the one that suits your hardware) in Checkpoint. We set recommended items in VAE/text encoder.

That's it, now we go to the LoRA tab and, if everything was done correctly, our custom LoRA will be there. We poke at it, it is added to the prompt. We also include a trigger word in the prompt. If, for example, the generated character is not similar enough to what you trained on, you can increase the weight, the strength of the LoRA influence on the generation – increase the number 1 in the name of the LoRA gradually: 1.1, 1.2, 1.3 until the result is satisfactory.

It was useful – plus karma)

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *