Fabrice-TIERCELIN
commited on
Commit
•
96c7fb7
1
Parent(s):
7813cdf
Fix seed
Browse files- gradio_demo.py +3 -2
gradio_demo.py
CHANGED
@@ -13,6 +13,7 @@ from CKPT_PTH import LLAVA_MODEL_PATH
|
|
13 |
import einops
|
14 |
import copy
|
15 |
import time
|
|
|
16 |
import spaces
|
17 |
from huggingface_hub import hf_hub_download
|
18 |
|
@@ -27,7 +28,7 @@ parser.add_argument("--opt", type=str, default='options/SUPIR_v0.yaml')
|
|
27 |
parser.add_argument("--ip", type=str, default='127.0.0.1')
|
28 |
parser.add_argument("--port", type=int, default='6688')
|
29 |
parser.add_argument("--no_llava", action='store_true', default=True)#False
|
30 |
-
parser.add_argument("--use_image_slider", action='store_true', default=False
|
31 |
parser.add_argument("--log_history", action='store_true', default=False)
|
32 |
parser.add_argument("--loading_half_params", action='store_true', default=False)#False
|
33 |
parser.add_argument("--use_tile_vae", action='store_true', default=True)#False
|
@@ -67,7 +68,7 @@ if torch.cuda.device_count() > 0:
|
|
67 |
|
68 |
def update_seed(is_randomize_seed, seed):
|
69 |
if is_randomize_seed:
|
70 |
-
return random.randint(0,
|
71 |
return seed
|
72 |
|
73 |
def check(input_image):
|
|
|
13 |
import einops
|
14 |
import copy
|
15 |
import time
|
16 |
+
import random
|
17 |
import spaces
|
18 |
from huggingface_hub import hf_hub_download
|
19 |
|
|
|
28 |
parser.add_argument("--ip", type=str, default='127.0.0.1')
|
29 |
parser.add_argument("--port", type=int, default='6688')
|
30 |
parser.add_argument("--no_llava", action='store_true', default=True)#False
|
31 |
+
parser.add_argument("--use_image_slider", action='store_true', default=True)#False
|
32 |
parser.add_argument("--log_history", action='store_true', default=False)
|
33 |
parser.add_argument("--loading_half_params", action='store_true', default=False)#False
|
34 |
parser.add_argument("--use_tile_vae", action='store_true', default=True)#False
|
|
|
68 |
|
69 |
def update_seed(is_randomize_seed, seed):
|
70 |
if is_randomize_seed:
|
71 |
+
return random.randint(0, 2147483647)
|
72 |
return seed
|
73 |
|
74 |
def check(input_image):
|