--- license: apache-2.0 language: - ar - en pipeline_tag: text-to-image tags: - pytorch - diffusion - text-to-image - cultural-alignment library_name: diffusers base_model: black-forest-labs/FLUX.1-schnell ---
---
## Getting Started
### Using Diffusers Library
Tested using `diffusers` v0.37.1 and `peft` v0.18.1.
```python
from diffusers import FluxPipeline
import torch
model_name = "black-forest-labs/FLUX.1-schnell"
lora_path = "QCRI/Fanar-2-Oryx-IG"
pipe = FluxPipeline.from_pretrained(model_name, torch_dtype=torch.bfloat16)
pipe.load_lora_weights(lora_path)
prompt = "A falconer at the Falcon Souq in Doha holding a peregrine falcon on a leather glove"
out = pipe(
prompt=prompt,
guidance_scale=0.,
height=1024,
width=1024,
num_inference_steps=4, # Generally between 2 - 6
).images[0]
out.save("image.png")
```
### Prompt Engineering for Cultural Content
**Effective Prompts:**
✅ "Museum of Islamic Art in Doha at sunset, architectural photography"
✅ "A Qatari woman wearing hijab and abaya shopping in Souq Waqif, traditional market atmosphere"
✅ "Traditional Gulf wedding ceremony with guests in cultural attire, celebration scene"
**Generic Prompts (less culturally specific):**
❌ "Woman shopping"
❌ "Wedding ceremony"
❌ "Museum building"
**Tips:**
- Include cultural specifics: clothing items, cultural context
- Specify regional details: "Gulf", "Qatari", "Arabic"
- Add atmospheric details: "modest", "cultural", "ceremonial"
---
## Evaluation
### Cultural Alignment Benchmark
Fanar-2-Oryx-IG was evaluated on a custom benchmark of **1,000 culturally-relevant prompts** covering landmarks, clothing, food, religious settings, ceremonies, and daily life across the Arab world.
**Automated Scoring:** Gemini 2.5 Flash judge with 12 criteria aggregated into 5 dimensions:
1. **Instruction Following**: Prompt adherence and semantic constraint satisfaction
2. **Visual Accuracy**: People accuracy, scene accuracy, visual consistency
3. **Cultural Alignment**: Clothing/modesty correctness, Islamic context, Arabic cultural fidelity
4. **Text Quality**: Correctness and readability of rendered text (English/Arabic)
5. **Perceptual Quality**: Detail richness, sharpness, overall visual quality
### Performance Results
| Model | #Params | Latency | Overall | Instruction Following | Quality | Accuracy | **Cultural Compliance** | Text |
|-------|-------|---------|---------|----------------------|---------|----------|------------------------|------|
| **Fanar-2-Oryx-IG** | 12B | **1.43s** | 83.76 | 78.35 | 93.52 | 85.71 | **85.49** | 43.60 |
| OpenAI ChatGPT | undisclosed (estimated >1T) | 50.76s | **92.56** | **96.94** | **95.87** | **94.92** | 85.15 | **79.35** |
| Alibaba Qwen | 20B | 36.65s | 84.08 | 83.52 | 93.24 | 87.82 | 78.59 | 49.85 |
| Flux-schnell (base) | 12B | **1.43s** | 78.32 | 72.70 | 90.50 | 80.70 | 78.90 | 30.80 |
| Fanar-1-IG | 4B | 3.05s | 75.77 | 74.40 | 80.70 | 80.30 | 76.60 | 31.10 |
**Key Findings:**
- **Best Cultural Compliance** (85.49) among all evaluated models, including commercial systems
- **Second-best Quality** (93.52), behind only OpenAI ChatGPT
- Fastest inference time at 1.43 seconds (35 times faster than OpenAI ChatGPT)
- Significant improvement over base model Flux-schnell (+6.59 cultural, +3.02 quality)
- Strong performance relative to model size and training data scale
### Qualitative Comparison
Visual inspection reveals that Fanar Fanar-2-Oryx-IG consistently generates:
- More culturally appropriate clothing (thobe, ghutra, abaya, hijab)
- Better recognition of regional landmarks and architecture
- Appropriate social contexts and gatherings
- Respectful depictions of religious and ceremonial settings
While larger commercial models may achieve higher overall scores, Fanar-2-Oryx-IG excels specifically in cultural alignment for Arabic and Islamic content.
---
## Intended Use, Ethical Considerations & Limitations
Fanar-2-Oryx-IG is built for:
- **Culturally-appropriate visual content generation** for Arabic and Islamic contexts
- **Marketing and advertising** targeting Arab audiences
- **Educational materials** about Arabic culture, history, and traditions
- **Media production** requiring culturally-sensitive imagery
- **Social media content** respecting local norms and values
- **Cultural preservation** and documentation projects
- **Research** on culturally-aligned image generation
Developers are encouraged to:
- Implement content moderation for production deployments
- Respect cultural sensitivities and local norms
- Provide clear disclaimers about AI-generated content
- Monitor outputs for appropriateness in target contexts
- Consider domain-specific fine-tuning for critical applications
- Add watermarks or disclaimers for AI-generated content
It should not be used to generate **harmful, illegal, misleading, or culturally insensitive content**. While Fanar-2-Oryx-IG demonstrates strong cultural alignment, users should be aware of limitations:
**Potential Issues:**
- May occasionally generate culturally inappropriate content despite training
- Text rendering in images (especially Arabic) remains challenging
- Cannot guarantee perfect adherence to all cultural norms in every generation
- Subject to biases present in training data and base model
**Not Suitable For:**
- Generating realistic images of specific individuals
- Creating misleading or deceptive imagery
- High-stakes decisions requiring perfect cultural accuracy
- Situations where errors could cause significant harm
Kindly refer to our [Terms of Service](https://chat.fanar.qa/terms-of-service) and [Privacy Policy](https://chat.fanar.qa/privacy-policy).
The output generated by this model is not considered a statement of QCRI, HBKU, Qatar Foundation, MCIT, or any other organization or individual.
---
## Fanar Platform
While Fanar-2-27B-Instruct is a powerful standalone model, it is part of the broader **Fanar Platform**—an integrated Arabic-centric multimodal AI ecosystem that provides enhanced capabilities and continuous updates. The platform includes:
**Core Capabilities:**
- **Text Generation**: Multiple conversational models optimized for different tasks
- **Speech (Aura)**: Speech-to-text (short-form and long-form) and text-to-speech synthesis with Arabic dialect support and bilingual Arabic-English capabilities
- **Image Understanding (Oryx-IVU)**: Vision-language model for culturally-grounded image and video understanding including Arabic calligraphy recognition
- **Image Generation (Oryx-IG)**: Culturally-aligned text-to-image generation trained on taxonomy-driven data across 23,000+ cultural search terms
- **Machine Translation (FanarShaheen)**: High-quality bilingual Arabic↔English translation across diverse domains (e.g., news, STEM, and medical)
- **Poetry Generation (Diwan)**: Classical Arabic poetry generation respecting prosodic meters (Buhur) and maintaining diacritization accuracy
**Specialized Systems:**
- **Fanar-Sadiq**: Multi-agent Islamic question-answering system with 9 specialized tools (Fiqh reasoning, Quran/Hadith retrieval, zakat/inheritance calculation, prayer times, and Hijri calendar). Deployed in production on [IslamWeb](https://islamweb.net) and [IslamOnline](https://islamonline.net) platforms.
- **Safety & Moderation**: Fanar-Guard and culturally-informed content filtering trained on 468K annotated Arabic-English safety examples
**Access Points:**
- **[Fanar Chat](https://chat.fanar.qa)**: Web conversational interface integrating all modalities
- **[iOS](https://apps.apple.com/jo/app/fanar-فنار/id6741857943) and [Android](https://play.google.com/store/apps/details?id=com.fanarmobile) apps**: Mobile apps for on-the-go access to the Fanar Platform
- **[Fanar API](https://api.fanar.qa)**: Programmatic access to models and specialized capabilities
The Fanar Platform continuously evolves with model updates, new capabilities, and improved safety mechanisms. For production deployments requiring the latest features, multimodal integration, cross-model orchestration, and ongoing support, we recommend using the [Fanar Platform](https://fanar.qa) rather than the standalone models published here.
---
## Citation
If you use Fanar-2-Oryx-IG or the Fanar 2.0 GenAI platform in your research or applications, please cite:
```bibtex
@misc{fanarteam2026fanar20arabicgenerative,
title={Fanar 2.0: Arabic Generative AI Stack},
author={FANAR TEAM and Ummar Abbas and Mohammad Shahmeer Ahmad and Minhaj Ahmad and Abdulaziz Al-Homaid and Anas Al-Nuaimi and Enes Altinisik and Ehsaneddin Asgari and Sanjay Chawla and Shammur Chowdhury and Fahim Dalvi and Kareem Darwish and Nadir Durrani and Mohamed Elfeky and Ahmed Elmagarmid and Mohamed Eltabakh and Asim Ersoy and Masoomali Fatehkia and Mohammed Qusay Hashim and Majd Hawasly and Mohamed Hefeeda and Mus'ab Husaini and Keivin Isufaj and Soon-Gyo Jung and Houssam Lachemat and Ji Kim Lucas and Abubakr Mohamed and Tasnim Mohiuddin and Basel Mousi and Hamdy Mubarak and Ahmad Musleh and Mourad Ouzzani and Amin Sadeghi and Husrev Taha Sencar and Mohammed Shinoy and Omar Sinan and Yifan Zhang},
year={2026},
eprint={2603.16397},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2603.16397},
}
```
---
## Acknowledgements
This project is from [Qatar Computing Research Institute (QCRI)](https://www.hbku.edu.qa/en/qcri) at [Hamad Bin Khalifa University (HBKU)](https://hbku.edu.qa), a member of Qatar Foundation. We thank our engineers, researchers, and support team for their efforts in advancing Arabic-centric large language models.
Special thanks to the [Ministry of Communications and Information Technology, State of Qatar](https://www.mcit.gov.qa/en/) for their continued support by providing the compute infrastructure needed to develop and serve the platform through the Google Cloud Platform.
---
## License
This model is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).