F L U X.1 dev Lo R A Autumn Spring Trees

Borcherding

Introduction

The FLUX.1-DEV-LORA-AutumnSpringTrees model is a LoRA fine-tuning designed to enhance the text-to-image generation capabilities of the FLUX.1 [dev] model, specifically focusing on autumn landscapes. It employs a trigger word autumnProxy to activate features related to rich autumnal scenery and foliage.

Architecture

This model is based on the diffusers library and utilizes the FLUX.1 [dev] model. It incorporates LoRA (Low-Rank Adaptation) to augment the model's ability to generate detailed images with vibrant fall colors and natural elements.

Training

The LoRA was trained to improve the base model's depiction of autumn landscapes, emphasizing aspects such as tree structures, leaf textures, and atmospheric conditions. The training leverages the FLUX.1 [dev] model's existing capabilities to add detailed seasonal enhancements.

Guide: Running Locally

  1. Install Dependencies: Ensure you have the diffusers library installed.

    pip install -U diffusers
    
  2. Load the Model: Use the following script to load and apply the LoRA weights:

    import torch
    from diffusers import FluxPipeline
    
    # Load base model
    pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
    pipe.enable_model_cpu_offload()
    
    # Load and apply LoRA weights
    pipe.load_lora_weights("Borcherding/seasonalLandsFluxDev-lora")
    
    # Generate image
    prompt = "autumnProxy A majestic maple tree with vibrant red and orange leaves, golden afternoon light"
    image = pipe(
        prompt,
        height=1024,
        width=1024,
        guidance_scale=3.5,
        num_inference_steps=50,
        max_sequence_length=512,
        generator=torch.Generator("cpu").manual_seed(0)
    ).images[0]
    image.save("autumn-scene.png")
    
    # Unload LoRA weights if needed
    pipe.unload_lora_weights()
    
  3. Optional: Merge LoRA weights with the base model:

    pipe.merge_lora_weights()
    pipe.save_pretrained("seasonal-lands-merged")
    

Cloud GPUs: Consider using cloud-based GPUs, such as those from AWS, Google Cloud, or Azure, for faster image generation and model execution.

License

The FLUX.1-DEV-LORA-AutumnSpringTrees model is released under the Apache-2.0 license. For detailed terms, refer to the base model's licensing agreement.

More Related APIs in Text To Image