Instructions to use nivas25/rekh-sanganeri-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nivas25/rekh-sanganeri-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("nivas25/rekh-sanganeri-lora") 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, authentic handmade block print imperfections, traditional Rajasthani textile" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
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:
- Scraping: Collected thousands of images of Indian textiles.
- 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.
- 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..."
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..."
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..."
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"
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"
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
- -
Model tree for nivas25/rekh-sanganeri-lora
Base model
black-forest-labs/FLUX.1-dev


















