F L U X.1 dev Lo R A add details

Shakker-Labs

Introduction

FLUX.1-DEV-LORA-ADD-DETAILS is a LoRA model trained on FLUX.1-dev, designed to enhance realism and detail in image generation, particularly focusing on achieving natural skin tones. It is developed by Dote and hosted by Shakker Labs.

Architecture

The model utilizes LoRA (Low-Rank Adaptation) techniques to fine-tune the FLUX.1-dev base model. It is compatible with the Diffusers library and relies on the FLUX.1-dev architecture to perform text-to-image transformations.

Training

The model was trained with a focus on enhancing detailed realism in generated images. It does not require specific trigger words, and the recommended scale for operations is 1.0, although negative scales can also be used.

Guide: Running Locally

To run the model locally, follow these steps:

  1. Install Required Libraries: Ensure you have torch and diffusers libraries installed.
  2. Load the Model: Use the FluxPipeline from the Diffusers library to load the pre-trained FLUX.1-dev model and apply LoRA weights.
  3. Set Device: Move the pipeline to a CUDA device for accelerated computation.
  4. Define a Prompt: Input your desired prompt for image generation.
  5. Generate Image: Execute the pipeline with specified parameters to generate and save the image.

Example code snippet:

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-blended-realistic-illustration", weight_name="FLUX.1-dev-LoRA-add-details.safetensors")
pipe.fuse_lora(lora_scale=1.0)
pipe.to("cuda")

prompt = "A beautiful woman, flim rendering"

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

Cloud GPUs: It's recommended to use cloud GPU services like AWS, GCP, or Azure for efficient processing.

License

The model is released under the flux-1-dev-non-commercial-license. For more details, refer to the license link.

More Related APIs in Text To Image