File size: 1,934 Bytes
dd5c280 f438a0a dd5c280 f438a0a dd5c280 f438a0a dd5c280 f438a0a dd5c280 f438a0a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# 📱 UI Generator Prototype – LoRA Fine-Tuned SDXL Model
[](https://huggingface.co/aryanbaghel/ui-generator-prototype)
[]()
[]()
A LoRA fine-tuned [Stable Diffusion XL (SDXL)](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) model designed to generate highly detailed **mobile UI screens** from natural language prompts. This prototype specializes in generating UIs with accurate layout structure, typography, color codes, padding, and spacing.
---
## 🚀 Model Summary
- **Base Model**: `stabilityai/stable-diffusion-xl-base-1.0`
- **LoRA Adapter**: Fine-tuned using [Diffusers](https://github.com/huggingface/diffusers)
- **Domain**: Mobile User Interfaces
- **Dataset**: 900+ captioned UI screenshots
→ [aryanbaghel/ui-caption-padded](https://huggingface.co/datasets/aryanbaghel/ui-caption-padded)
- **Training Goal**: Enhance SDXL’s ability to generate UI screens from structured descriptive prompts.
---
## 🧠 Use Cases
- Prototyping UI design ideas from prompts
- UX/UI design automation
- Visualizing layout sketches for mobile apps
- Creative ideation for product design teams
---
## 📦 How to Use
```python
from diffusers import DiffusionPipeline
import torch
# Load base SDXL model
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
pipe.to("cuda")
# Load LoRA weights
pipe.load_lora_weights("aryanbaghel/ui-generator-prototype")
# Enable LoRA
pipe.fuse_lora()
# Generate a UI screen
prompt = "A mobile UI showing a hotel reservation screen with elegant typography and clean layout"
image = pipe(prompt=prompt).images[0]
image.save("output.png")
print("SUCCESS!") |