Rekh Logo

Rekh: Sanganeri Hand-Block Print LoRA for FLUX.1-dev

Project Overview

Rekh is a high-fidelity LoRA (Low-Rank Adaptation) fine-tuned on the FLUX.1-dev base model, designed to accurately generate authentic Sanganeri hand-block prints. Sanganeri printing is a centuries-old traditional textile art from Rajasthan, India, characterized by delicate floral motifs, specific natural dye colors (Syahi, Begar), and intricate black outlines known as rekh.

This model forces the AI to respect the physical laws of hand-block printing, rendering accurate fabric textures, subtle ink bleeds, and slight stamp misalignments, completely eliminating the "digital vector art" aesthetic that base models typically produce.


Novel Contribution: VLM-Based Authenticity Filtering

To ensure absolute authenticity, we developed a highly rigorous dataset curation pipeline:

  1. Scraping: Collected thousands of images of Indian textiles.
  2. VLM Filtering (InternVL3): We used a massive Vision-Language Model to aggressively purge all digital CAD designs, watermarked images, and generic vector patterns. Only photographs of physical, woven cotton textiles with genuine stamp imperfections were kept.
  3. Descriptive Captioning (Florence-2): The final 178 high-quality images were captioned with extreme detail, focusing on dye colors, specific traditional motifs (Keri/Mango, Mor/Peacock, Jali/Trellis), and fabric weave.

Technical Specifications (LoRA v2)

  • Base Model: black-forest-labs/FLUX.1-dev
  • Training Type: LoRA (Rank 32, Alpha 32)
  • Dataset: 178 highly-curated images
  • Training Steps: 3000
  • Learning Rate: 1e-4 (AdamW 8-bit)
  • Precision: bfloat16 (bf16)
  • Hardware: 1x NVIDIA A100 (80GB) on Modal

(Note: We also experimented with a DoRA Rank 64 model, but found that the standard LoRA Rank 32 achieved vastly superior spatial understanding of the dense floral patterns without overfitting our curated dataset.)


Recommended Inference Settings

For the best authentic block-print results:

  • Trigger Phrase: sanganeri hand block print (must be prepended to your prompt)
  • LoRA Weight: 1.0 (The model is highly stable and does not fry at full weight)
  • Guidance Scale: 3.5 (Yields crisp, authentic black rekh outlines. Lower values like 2.0 give a softer, artistic output.)
  • Sampling Steps: 28
  • Sampler: FlowMatch

Usage Example (Diffusers)

import torch
from diffusers import FluxPipeline

# Load the base FLUX.1-dev pipeline
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()

# Load the Rekh Sanganeri LoRA
pipe.load_lora_weights("nivas25/rekh-sanganeri-lora", weight_name="rekh_sanganeri_lora_v2.safetensors")

# Generate!
prompt = "sanganeri hand block print, flowing vines with blue flowers and green leaves on white background, fine rekh outlines, traditional Rajasthani textile"
image = pipe(
    prompt,
    num_inference_steps=28,
    guidance_scale=3.5,
    generator=torch.Generator("cpu").manual_seed(888)
).images[0]

image.save("sanganeri_output.jpg")

Evaluation & Gallery

In our comprehensive "Mega Showdown" benchmarking, Rekh successfully handled extremely complex, out-of-domain prompts while maintaining the rigid aesthetic laws of block printing.

Here is a 5-prompt comparison showing the progression of the models:

1. The Tree of Life

Prompt: "Sanganeri hand block print, magnificent large-scale Tree of Life motif in vivid emerald green and ruby red on a crisp white background, fine black rekh outlines..."

FLUX.1-dev Base LoRA v1 DoRA v1 LoRA v2 (Final)
Base LoRA v1 DoRA v1 LoRA v2

2. Majestic Peacock (Mor)

Prompt: "Sanganeri hand block print, a majestic peacock (Mor) with a fully fanned tail, printed in brilliant sapphire and jade green against a soft cream background..."

FLUX.1-dev Base LoRA v1 DoRA v1 LoRA v2 (Final)
Base LoRA v1 DoRA v1 LoRA v2

3. Miniature Jasmine Packed Layout

Prompt: "Sanganeri hand block print, completely packed layout of overlapping miniature jasmine flowers, deep blue and white on a dark indigo background..."

FLUX.1-dev Base LoRA v1 DoRA v1 LoRA v2 (Final)
Base LoRA v1 DoRA v1 LoRA v2

4. Majestic Tiger in Jungle (Generalization)

Prompt: "Sanganeri hand block print of a majestic tiger prowling in a dense jungle, traditional hand-block print technique, authentic fabric texture"

FLUX.1-dev Base LoRA v1 DoRA v1 LoRA v2 (Final)
Base LoRA v1 DoRA v1 LoRA v2

5. Elegant Saree Fashion (Generalization)

Prompt: "A beautiful woman wearing an elegant Sanganeri block printed cotton saree, flowing fabric, traditional motifs, high quality textile photography"

FLUX.1-dev Base LoRA v1 DoRA v1 LoRA v2 (Final)
Base LoRA v1 DoRA v1 LoRA v2

See our GitHub repository for the full Mega Showdown containing 50 prompts across all categories.


License & Limitations

This model is built on top of FLUX.1-dev, which falls under the FLUX.1 [dev] Non-Commercial License. Consequently, this LoRA inherits those exact same non-commercial restrictions. It is released for academic, research, and artistic exploration.

Disclaimer: This AI model cannot replace the profound craftsmanship of the real artisans in Sanganer, Rajasthan. We encourage everyone to support authentic handmade textiles.

Downloads last month
-
Inference Providers NEW
Examples

Model tree for nivas25/rekh-sanganeri-lora

Adapter
(42663)
this model