paragekbote/flux-fast-lora-hotswap-img2img

An optimized Flux.1-dev Img2Img setup delivering blazing-fast inference, memory efficiency and dynamic LoRA hotswapping.

Public
18 runs

Run time and cost

This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

FLUX.1-dev LoRA Hotswap (Img2Img)

This setup uses torch.compile, BitsAndBytes, and PEFT LoRA to package the Flux.1 [dev] model, enabling fast image-to-image generation with LoRA adapter hotswapping via trigger words, along with quantization for efficiency.


Features

  • Optimized Performance: torch.compile acceleration for faster inference.
  • Dynamic LoRA Switching: Instantly swap between multiple styles using trigger words.
  • Memory Efficient: BitsAndBytes quantization reduces VRAM usage.
  • Multi-Style Transformations: Two LoRAs preloaded for immediate style transfer.

Available Styles

Enhanced Image Preferences

  • Trigger: ["Cinematic", "Photographic", "Anime", "Manga", "Digital art", "Pixel art", "Fantasy art", "Neonpunk", "3D Model", "Painting", "Animation", "Illustration"]
  • LoRA: data-is-better-together/open-image-preferences-v1-flux-dev-lora
  • Description: Applies refined stylistic preferences learned from curated data to your input image.

Ghibsky Illustration


Model Details

  • Base Model: black-forest-labs/FLUX.1-dev
  • Optimization: PyTorch 2.0 compilation + BitsAndBytes quantization with LoRA hot-swapping.
  • Memory Usage: Reduced significantly via quantization.

Performance

  • Speed: Up to 2× faster processing with torch.compile.
  • Memory: ~40% VRAM savings from quantization.
  • Quality: Preserves FLUX.1-dev fidelity while restyling inputs.
  • Flexibility: Supports on-the-fly LoRA switching without reloading.

Usage Tips

  • Provide a clear input image (photo, sketch, concept art, or render).
  • Add trigger words alongside your descriptive prompt to activate LoRA styles.
  • Control the balance between input preservation and transformation using the strength parameter (0.2–0.8).
  • Works optimally at native FLUX.1-dev resolutions (1024×1024).
  • Quantization enables efficient inference on consumer GPUs.

Note: Some GPU usage may persist after generation. Since LoRA hot-swapping is still evolving, occasional errors may occur. Please report issues if encountered.


Use Cases

  • Transforming sketches or line art into polished illustrations.
  • Stylizing photos into anime, cinematic, or fantasy aesthetics.
  • Rapid experimentation with hybrid aesthetics by combining trigger words.
  • Visual prototyping across multiple art styles without retraining.