Skip to main content
New

GPT Image 2 + Nano Banana 2 Lite — Both unlimited for Studio subscribers · New: ~4-second generations

Try Nano Banana 2 Lite
FLUX.1-dev-LoRA-AntiBlur
1 / 6
flux-dev

FLUX.1-dev-LoRA-AntiBlur

Trigger Word
None
Recommended Scale
1.50(0.1 - 2.0)

About this LoRA

This is a functional LoRA trained on FLUX.1-dev for deep DoF (Anti-Blur🔥) by Vadim_Fedenko on Shakker AI.

Source

Examples

Introduction

FLUX.1-dev-LoRA-AntiBlur is a functional LoRA (Low-Rank Adaptation) designed to enhance images generated by the FLUX.1-dev base model. Its primary purpose is to create a deep Depth of Field (DoF), effectively reducing the background blur that can occur in AI-generated images. This "Anti-Blur" capability ensures that both the subject and the background details remain sharp and in focus.

Developed by Vadim_Fedenko on the Shakker AI platform, this LoRA is presented as a foundational tool that improves image clarity with minimal degradation of overall quality. It is designed to be compatible with other components, such as ControlNet, making it a versatile addition to your image generation workflow.

How to Use

This LoRA is straightforward to implement and does not require a specific trigger word to activate its effect. For optimal results, apply the LoRA with a recommended scale between 1.0 and 1.5.

Diffusers Implementation

You can integrate this LoRA into your diffusers pipeline with the following Python code. This example loads the base model, applies the Anti-Blur LoRA, and generates an image from a text prompt.

import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("Shakker-Labs/FLUX.1-dev-LoRA-AntiBlur", weight_name="FLUX-dev-lora-AntiBlur.safetensors")
pipe.fuse_lora(lora_scale=1.5)
pipe.to("cuda")

prompt = "a young college student, walking on the street, campus background, photography"

image = pipe(prompt, 
             num_inference_steps=24, 
             guidance_scale=3.5,
             width=768, height=1024,
            ).images[0]
image.save(f"example.png")

Online Inference

For users who prefer a web-based interface, this model is available for online generation at Shakker AI.

Use Cases

The primary use case for this LoRA is to generate images where background clarity is as important as the main subject. It is ideal for prompts that describe complex scenes, detailed environments, or landscapes. By reducing the default blur, it allows for the creation of images with a greater sense of depth and realism.

Example scenarios include:

  • Architectural and Street Photography: Capturing a subject along with the detailed architecture or bustling activity of a city street (e.g., "a young woman, New York City").
  • Environmental Portraits: Placing a person within a detailed natural setting where the background adds to the story (e.g., "happy stunning girl... a beautiful field of flowers, colorful flowers everywhere, hills in the background").
  • Campus or Urban Scenes: Ensuring that background elements like buildings and scenery are sharp and clear (e.g., "a young college student, walking on the street, campus background, photography").

Examples

The model's effectiveness is demonstrated through comparison images provided in its official documentation. These images show a clear reduction in background blur when the LoRA is applied, compared to generations using only the base FLUX.1-dev model. The documentation highlights that this enhancement is achieved with "very little damage to image quality," preserving the original aesthetic while improving sharpness.

The provided examples showcase the LoRA's ability to render both the subject and the environment with high fidelity, resulting in more comprehensive and detailed final images.

FAQ

Q: What is the main function of the FLUX.1-dev-LoRA-AntiBlur model?

A: This LoRA is designed to create a deep Depth of Field (DoF) in images generated with the FLUX.1-dev model. It acts as an "Anti-Blur" tool to reduce background blur and keep the entire scene in focus.

Q: Do I need a trigger word to use this LoRA?

A: No, a trigger word is not required to activate this LoRA's effect.

A: The documentation recommends using a scale of 1.0 to 1.5 when implementing the LoRA in diffusers for the best results.

Q: Can I use this LoRA with other tools like ControlNet?

A: Yes, the documentation states that this LoRA can be used in conjunction with other components, including ControlNet.

Q: Where can I try this model without installing it locally?

A: You can generate images using this model through the online interface provided on the Shakker AI platform.

Technical Details

  • Base Model: This LoRA is trained on and designed for black-forest-labs/FLUX.1-dev.
  • Training Details: The model was trained on the FLUX.1-dev model. Specifics beyond this are not mentioned in the documentation.
  • File Format: The LoRA is provided in the .safetensors format for security and efficiency.
  • Compatibility: It is compatible with the diffusers library for Python-based workflows.
  • License: The model is released under the flux-1-dev-non-commercial-license, which restricts its use to non-commercial purposes.