Spaces:
Runtime error
Runtime error
fix seed type err
Browse files
app.py
CHANGED
@@ -44,12 +44,18 @@ def infer(
|
|
44 |
seed=42,
|
45 |
randomize_seed=False,
|
46 |
guidance_scale=7.0,
|
47 |
-
num_inference_steps=
|
48 |
negative_prompt="watermark, ugly, deformed, noisy, blurry, low contrast",
|
49 |
progress=gr.Progress(track_tqdm=True),
|
50 |
):
|
51 |
if randomize_seed:
|
52 |
seed = random.randint(0, MAX_SEED)
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
images = run_pipeline(
|
54 |
pipe,
|
55 |
num_views=NUM_VIEWS,
|
|
|
44 |
seed=42,
|
45 |
randomize_seed=False,
|
46 |
guidance_scale=7.0,
|
47 |
+
num_inference_steps=30,
|
48 |
negative_prompt="watermark, ugly, deformed, noisy, blurry, low contrast",
|
49 |
progress=gr.Progress(track_tqdm=True),
|
50 |
):
|
51 |
if randomize_seed:
|
52 |
seed = random.randint(0, MAX_SEED)
|
53 |
+
if isinstance(seed, str):
|
54 |
+
try:
|
55 |
+
seed = int(seed.strip())
|
56 |
+
except ValueError:
|
57 |
+
seed = 42
|
58 |
+
|
59 |
images = run_pipeline(
|
60 |
pipe,
|
61 |
num_views=NUM_VIEWS,
|