Update README.md
Browse files
README.md
CHANGED
|
@@ -1,46 +1,11 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
- **1:1** - 1024x1024 (square, default)
|
| 13 |
-
- **3:4** - 896x1152 (portrait, classic)
|
| 14 |
-
- **9:16** - 768x1344 (portrait, mobile)
|
| 15 |
-
|
| 16 |
-
All dimensions are divisible by 64 for optimal performance with SDXL.
|
| 17 |
-
|
| 18 |
-
## Modified Files
|
| 19 |
-
|
| 20 |
-
### 1. `config.py`
|
| 21 |
-
- Added `ASPECT_RATIOS` dictionary with all aspect ratio options and their dimensions
|
| 22 |
-
- Added `DEFAULT_ASPECT_RATIO` set to "1:1"
|
| 23 |
-
|
| 24 |
-
### 2. `app.py`
|
| 25 |
-
- Added aspect ratio dropdown in the Settings accordion
|
| 26 |
-
- Updated the `process_text` function to accept `aspect_ratio` parameter
|
| 27 |
-
- Updated the inputs list to include the aspect ratio selection
|
| 28 |
-
|
| 29 |
-
### 3. `generator.py`
|
| 30 |
-
- Added `aspect_ratio` parameter to the `predict` method (defaults to "1:1")
|
| 31 |
-
- Extracts width and height from `Config.ASPECT_RATIOS` based on selection
|
| 32 |
-
- Passes width and height to the pipeline for generation
|
| 33 |
-
|
| 34 |
-
### Other Files
|
| 35 |
-
- `model.py`, `requirements.txt`, and `utils.py` remain unchanged
|
| 36 |
-
|
| 37 |
-
## Usage
|
| 38 |
-
|
| 39 |
-
Users can now select their preferred aspect ratio from the dropdown menu in the Settings section before generating pixel art. The dropdown appears above the seed input and shows all 5 available aspect ratios with a helpful description.
|
| 40 |
-
|
| 41 |
-
## Technical Details
|
| 42 |
-
|
| 43 |
-
- All aspect ratios maintain approximately 1MP total pixels
|
| 44 |
-
- Dimensions are optimized for SDXL (divisible by 64)
|
| 45 |
-
- The aspect ratio is displayed in the console logs during generation
|
| 46 |
-
- Default fallback is 1:1 (1024x1024) if an invalid ratio is provided
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Pixel Art
|
| 3 |
+
emoji: 🐠
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: pink
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 5.49.1
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: true
|
| 10 |
+
license: mit
|
| 11 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|