B-LoRA  by yardenfren1996

Image stylization via implicit style-content separation

created 1 year ago
382 stars

Top 75.9% on sourcepulse

GitHubView on GitHub
Project Summary

B-LoRA enables implicit style-content separation for single input images, targeting researchers and practitioners in image stylization. It disentangles style and content using Stable Diffusion XL and LoRA, facilitating tasks like style transfer and consistent style generation.

How It Works

B-LoRA leverages Stable Diffusion XL (SDXL) and Low-Rank Adaptation (LoRA) to implicitly separate style and content from a single input image. This disentanglement is achieved by training specialized LoRA adapters that capture either the style or content characteristics, allowing for flexible recombination in downstream tasks.

Quick Start & Requirements

  • Install via pip install -r requirements.txt after cloning the repository.
  • Prerequisites: Python 3.11.6+, PyTorch 2.1.1+.
  • Training requires accelerate and specific SDXL base models.
  • Inference uses python inference.py.
  • See official documentation for detailed usage and Windows-specific notes.

Highlighted Details

  • Enables image stylization based on reference style images.
  • Supports text-based image stylization.
  • Facilitates consistent style generation across multiple images.
  • Offers control over adapter strength via content_alpha and style_alpha.

Maintenance & Community

  • The project is associated with research from the authors listed in the citation.
  • Contact authors via email or GitHub issues for questions.

Licensing & Compatibility

  • Licensed under the MIT License.
  • Permissive for commercial use and integration with closed-source projects.

Limitations & Caveats

The provided training script notes issues with newer diffusers and PEFT versions, recommending the use of older versions (diffusers 0.25.0, no PEFT) for optimal training convergence.

Health Check
Last commit

8 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
14 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.