Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ def generate_image(
|
|
54 |
negative="low quality",
|
55 |
width=1024,
|
56 |
height=1024,
|
57 |
-
seed: int
|
58 |
nums=1,
|
59 |
scale=1.5,
|
60 |
steps=30,
|
@@ -62,9 +62,7 @@ def generate_image(
|
|
62 |
|
63 |
if seed == -1:
|
64 |
seed = random.randint(0, MAX_SEED)
|
65 |
-
|
66 |
-
seed = float(seed)
|
67 |
-
|
68 |
generator = torch.Generator().manual_seed(seed)
|
69 |
|
70 |
prompt = str(translator.translate(prompt, 'English'))
|
|
|
54 |
negative="low quality",
|
55 |
width=1024,
|
56 |
height=1024,
|
57 |
+
seed: int = -1,
|
58 |
nums=1,
|
59 |
scale=1.5,
|
60 |
steps=30,
|
|
|
62 |
|
63 |
if seed == -1:
|
64 |
seed = random.randint(0, MAX_SEED)
|
65 |
+
seed = int(seed)
|
|
|
|
|
66 |
generator = torch.Generator().manual_seed(seed)
|
67 |
|
68 |
prompt = str(translator.translate(prompt, 'English'))
|