🎉 New Year Sale: Get 20% OFF on all plans — Use code NEWYEAR2026.

Upgrade now
Anti-blur Flux Lora - v1.0 thumbnail

ModelsLab/Anti-Blur Flux Lora - V1.0

anti-blur-flux-lora-v1-0
Text to Image Community ModelFree for Premium UsersLLMs.txt

AntiBlur Lora has been significantly improved!

Improvements in new Lora:

  • DoF can be adjusted by Lora's weight.

So a weight of 0 will give a shallow DoF, typical for Flux generations.

A default weight of 1.0 will reduce DoF to a (hopefully) more pleasing image, without significant changes in style and composition. The goal was to get DoF at a weight 1 to be exactly how you'd expect it to be: minor good bokeh here and there, without overkills inherent to Flux (more on that later)

A weight of over 1.0 can be used to make shots with deep DoF. Lora can handle weights up to 3.0 and beyond without significant degradation in quality

  • Stylistically neutral

The dataset was made from hundreds of images created with Flux, so as not to take the style too far from the original model, while small number of real photos were used to keep Flux from degrading in composition (which is what happens when you train AI on it's own pictures)

  • No more Trigger words

Just connect the Lora and it'll do the job

  • Pairs well with Hires. fix

This Lora works well with hiresfix, allowing you to further increase the details and minimize shallow DoF. This was not the case with basic Flux, because by trying to hires. fix a

blurred image with shallow DoF, it'd stil remain blurred with the same DoF effect. You just need the details to start appearing in the image, for hires.fix to improve them further.

  • Much less artifacts

Using Flux-generated images minimizes artifacts. I also trained a lot of models, and made a merge of the best, using tool by anashel (This smoothed out the edges of individual models that led to artifacts. Merging turned out to be especially useful for making model stylistically diverse.)

Why does Lora weight 655mb?

It seemed to me that Lora with basically a deep DoF effect should be small, as it doesn't introduce a new style or concept, it just has to remove shallow DoF.

So I tried different Lora ranks, but as it turned out, information about the backgrounds is everywhere, and the larger the model, the better it gives the result. That's how I settled on the 128th-ranked Lora.

It's possible to isolate Lora's layers, and only use layers with DoF information in them, but as it turned out, information about DoF is scattered throughout the layers. For example, when generating macro shots, DoF is generated from the first layers. Information about backgrounds is really everywhere in the model, and constant shallow DoF is just the way training data looked for Flux. To make matters worse, Flux has a really poor understanding of DoF and blur. So not only it is present in much bigger amount than SD1.5/SDXL, it also provides much worse control over it.

How was this Lora made?

First, I put together a huge dataset with focus stacking techniques and deep DoF, on this I trained a new Lora. Next, using this Lora, I created images for a new dataset.

I've got several hundred variants of the "antiblur" Lora, selected the best ones each with their advantages, and combined them into a one well-balanced model.

What's next?

Since the higher the rank, the better the quality, the obvious way to improve the result would be to train a full finetune (and effectively touch every corner of the latent space, where there is information related to backgrounds), and then extract the Lora.

Another theoretical option is to find the "blur" or "dof" concept/weights in Flux latent space, and make a Lora out of inverted weights. This method wasn't very effective for dof control in SD-based models though.

As of now though I'm happy with the result. The model will remain my best effort for a while

API PlaygroundAPI Documentation

API Endpoint URL

Base URL for all API requests to this endpoint.

https://modelslab.com/api/v6/images/text2img

API Authentication

Authentication requires a valid API key included in the request. Generate and manage your API keys from your developer dashboard. Include the key in the key parameter for all API requests.

Integration Examples

Production-ready code samples for API integration

{
"prompt": "R3alisticF, hauntingly beautiful oriental necromancer, long flowing brown hair, bangs, darkly tanned skin, earrings, bone necklaces, dark eyeshadow, red lips, vibrant, front-laced transparent, filmy silk blouse, cleavage, holding skull, in a sandstone room lit by candles, High Detail, Perfect Composition, high contrast, silhouetted, chiascuro",
"model_id": "fluxdev",
"lora_model": "anti-blur-flux-lora-v1-0",
"width": "1024",
"height": "1024",
"negative_prompt": "(worst quality:2), (low quality:2), (normal quality:2), (jpeg artifacts), (blurry), (duplicate), (morbid), (mutilated), (out of frame), (extra limbs), (bad anatomy), (disfigured), (deformed), (cross-eye), (glitch), (oversaturated), (overexposed), (underexposed), (bad proportions), (bad hands), (bad feet), (cloned face), (long neck), (missing arms), (missing legs), (extra fingers), (fused fingers), (poorly drawn hands), (poorly drawn face), (mutation), (deformed eyes), watermark, text, logo, signature, grainy, tiling, censored, nsfw, ugly, blurry eyes, noisy image, bad lighting, unnatural skin, asymmetry",
"num_inference_steps": "31",
"scheduler": "DPMSolverMultistepScheduler",
"guidance_scale": "7.5",
"enhance_prompt": false,
"key": "YOUR_API_KEY"
}

SDKs

Official SDKs

Production-ready SDKs and client libraries for all major programming languages

API Parameters

Technical specifications for API request parameters.

Field NameParameterTechnical Description
promptpromptprompt help in image generation
Modelmodel_idEnter model_id that can help in image generation
lora Modellora_modelNo description available
Widthwidthwidth of the image
Heightheightheight of the image
Negative Promptnegative_promptNegative prompt help in avoid things that you do not want in image
Stepsnum_inference_stepsNumber of inference steps
SchedulerschedulerSampling scheduler
Guidance Scaleguidance_scaleHow closely to follow the prompt (1-10)
enhance_promptenhance_promptAutomatically enhance the prompt