Jordan Legg commited on
Commit
670c684
1 Parent(s): 5c4c452

DRY and new description

Browse files
Files changed (1) hide show
  1. app.py +10 -18
app.py CHANGED
@@ -22,7 +22,13 @@ ASPECT_RATIOS = {
22
  "3.00:1 (Experimental Ultra-wide)": 3.00,
23
  "4.00:1 (Polyvision)": 4.00,
24
  "2.55:1 (CinemaScope)": 2.55,
25
- "2.20:1 (Todd-AO)": 2.20
 
 
 
 
 
 
26
  }
27
 
28
  MIN_WIDTH = 512
@@ -44,21 +50,7 @@ for ratio_name, ratio in ASPECT_RATIOS.items():
44
  }
45
 
46
  def validate_aspect_ratio(ratio_name: str) -> float | None:
47
- match ratio_name:
48
- case "2.39:1 (Modern Widescreen)":
49
- return 2.39
50
- case "2.76:1 (Ultra Panavision 70)":
51
- return 2.76
52
- case "3.00:1 (Experimental Ultra-wide)":
53
- return 3.00
54
- case "4.00:1 (Polyvision)":
55
- return 4.00
56
- case "2.55:1 (CinemaScope)":
57
- return 2.55
58
- case "2.20:1 (Todd-AO)":
59
- return 2.20
60
- case _:
61
- return None
62
 
63
  # Replace the single rng instance with a function that creates a fresh generator each time
64
  def get_random_seed() -> int:
@@ -140,8 +132,8 @@ css="""
140
  with gr.Blocks(css=css) as demo:
141
 
142
  with gr.Column(elem_id="col-container"):
143
- gr.Markdown(f"""# CineDiffusion
144
- CineDiffusion is an application for creating very high resolution Cinematic widescreen images based on historical standard cinema widescreen aspect ratios.
145
  """)
146
 
147
  with gr.Row():
 
22
  "3.00:1 (Experimental Ultra-wide)": 3.00,
23
  "4.00:1 (Polyvision)": 4.00,
24
  "2.55:1 (CinemaScope)": 2.55,
25
+ "2.20:1 (Todd-AO)": 2.20,
26
+ "2.00:1 (Univisium)": 2.00,
27
+ "2.35:1 (Anamorphic Scope)": 2.35,
28
+ "2.59:1 (MGM Camera 65)": 2.59,
29
+ "1.75:1 (IMAX Digital)": 1.75,
30
+ "1.43:1 (IMAX 70mm)": 1.43,
31
+ "2.40:1 (Modern Anamorphic)": 2.40
32
  }
33
 
34
  MIN_WIDTH = 512
 
50
  }
51
 
52
  def validate_aspect_ratio(ratio_name: str) -> float | None:
53
+ return ASPECT_RATIOS.get(ratio_name)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  # Replace the single rng instance with a function that creates a fresh generator each time
56
  def get_random_seed() -> int:
 
132
  with gr.Blocks(css=css) as demo:
133
 
134
  with gr.Column(elem_id="col-container"):
135
+ gr.Markdown(f"""# CineDiffusion 🎥
136
+ **CineDiffusion** creates cinema-quality widescreen images at up to **4.2 Megapixels** — *4x higher resolution* than typical AI image generators (1MP). Features authentic cinematic aspect ratios for true widescreen results.
137
  """)
138
 
139
  with gr.Row():