F L U X.1 dev Lo R A One Click Creative Template

Shakker-Labs

FLUX.1-DEV-LoRA-One-Click-Creative-Template

Introduction

The FLUX.1-DEV-LoRA-One-Click-Creative-Template is a text-to-image model developed by Shakker Labs, specifically designed for creative photo generation. It utilizes a LoRA (Low-Rank Adaptation) trained on the FLUX.1-dev framework, allowing for efficient image synthesis based on prompts.

Architecture

This model leverages the diffusers library and is optimized for text-to-image applications using the stable-diffusion architecture. It employs safetensors for improved performance and security during the model's operation. The model generates images by combining real photos with cartoon elements to summarize the given input.

Training

The model was trained by Nvwa_model_studio, focusing on the unique blending of real and cartoon images based on specific prompts. The training process involved creating a pipeline to handle the specific task of generating images with a central cartoon image surrounded by four real photos.

Guide: Running Locally

To run the model locally, follow these steps:

  1. Install Necessary Libraries: Ensure you have Python installed, then install the diffusers library and PyTorch.

    pip install diffusers torch
    
  2. Load the Model: Use the following Python code to load and run the model:

    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-One-Click-Creative-Template", weight_name="FLUX-dev-lora-One-Click-Creative-Template.safetensors")
    pipe.fuse_lora(lora_scale=1.0)
    pipe.to("cuda")
    
    prompt = "A young girl, red hair, blue dress. The background is 4 real photos, and in the middle is a cartoon picture summarizing the real photos."
    image = pipe(prompt, num_inference_steps=24, guidance_scale=3.5, width=960, height=1280).images[0]
    image.save(f"example.png")
    
  3. Use Cloud GPUs: For optimal performance, it is recommended to run this model on a cloud GPU service such as Google Colab, AWS, or Azure. This ensures sufficient computational resources are available for generating high-quality images.

License

This model is released under the flux-1-dev-non-commercial-license. For more details, please refer to the license link. Users are required to adhere to the non-commercial terms specified in the license agreement.

More Related APIs in Text To Image