primerz commited on
Commit
246928c
·
verified ·
1 Parent(s): 0f0e9c7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -46
README.md CHANGED
@@ -1,46 +1,11 @@
1
- # Pixel Art Generator - Aspect Ratio Update
2
-
3
- ## Changes Made
4
-
5
- I've added aspect ratio selection to your pixel art generator with the following options:
6
-
7
- ### Supported Aspect Ratios
8
- All aspect ratios are capped at approximately 1 megapixel resolution:
9
-
10
- - **16:9** - 1344x768 (landscape, widescreen)
11
- - **4:3** - 1152x896 (landscape, classic)
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
+ ---