Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -229,10 +229,13 @@ def generate_image(prompt, style_name, seed, num_inference_steps, guidance_scale
|
|
| 229 |
return None, f"Error: {str(e)}"
|
| 230 |
|
| 231 |
def get_default_seed(style_name):
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
|
|
|
|
|
|
|
|
|
| 236 |
|
| 237 |
# ... (omitted)
|
| 238 |
|
|
|
|
| 229 |
return None, f"Error: {str(e)}"
|
| 230 |
|
| 231 |
def get_default_seed(style_name):
|
| 232 |
+
try:
|
| 233 |
+
if isinstance(style_name, str) and style_name in STYLES:
|
| 234 |
+
return float(STYLES[style_name]["default_seed"])
|
| 235 |
+
except Exception:
|
| 236 |
+
pass
|
| 237 |
+
return float(42)
|
| 238 |
+
|
| 239 |
|
| 240 |
# ... (omitted)
|
| 241 |
|