Instructions to use marwantosolve/archforge-mamluk-cairo-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use marwantosolve/archforge-mamluk-cairo-lora with PEFT:
Task type is invalid.
- Diffusers
How to use marwantosolve/archforge-mamluk-cairo-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("marwantosolve/archforge-mamluk-cairo-lora") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
ArchForge โ Mamluk / Islamic Cairo LoRA
A FLUX.1-dev LoRA adapter for Mamluk and Islamic Egyptian architecture: carved limestone facades, pointed arches, muqarnas vaulting, mashrabiya screens, ablaq striped stonework, domes and minarets of historic Cairo.
Trained as part of ArchForge โ a time-boxed proof of concept, not a production model. Read the limitations below before using it.
Training
| Base model | black-forest-labs/FLUX.1-dev |
| Method | LoRA, transformer attention layers only (to_k, to_q, to_v, to_out.0) |
| Base quantisation | NF4 (bitsandbytes), 4-bit |
| Resolution | 512 |
| Rank / alpha | 8 / 8 |
| Precision | fp16 + GradScaler |
| Optimizer | 8-bit AdamW |
| Learning rate | 0.0001, constant schedule, no warmup |
| Batch / accumulation | 1 / 4 |
| Steps | 400 |
| Hardware | Google Colab free tier, Tesla T4, 16GB |
Dataset
marwantosolve/archforge-mamluk-cairo โ 39 curated 512px images, per-image licence and attribution recorded.
Usage
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained(
"black-forest-labs/FLUX.1-dev",
torch_dtype=torch.float16,
).to("cuda")
pipe.load_lora_weights("marwantosolve/archforge-mamluk-cairo-lora")
image = pipe(
"mamluk_architecture, a historic Islamic courtyard in Cairo, "
"carved limestone facade, pointed arches, architectural photography",
num_inference_steps=20,
guidance_scale=3.5,
height=512,
width=512,
generator=torch.Generator("cpu").manual_seed(0),
).images[0]
image.save("out.png")
The trigger token is mamluk_architecture. It is not required for the style to
appear, but it is what the captions conditioned on.
Limitations
- 39-image dataset, 400 steps. This is a style demonstration, not a robust style model. Expect weak binding and inconsistent results.
- Cairo-weighted and monument-biased. Wikimedia contributors photograph well-documented, tourist-accessible buildings, and the adapter inherits that bias.
- Non-commercial. FLUX.1-dev is released under the FLUX.1-dev Non-Commercial License; this adapter inherits that restriction.
- Documented failure cases โ see the evaluation report linked from https://github.com/marwantosolve/ArchForge. They are recorded deliberately rather than omitted.
- Downloads last month
- -
Model tree for marwantosolve/archforge-mamluk-cairo-lora
Base model
black-forest-labs/FLUX.1-dev