diff --git a/modules/shared.py b/modules/shared.py index 51fdf36c..6f3396a7 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -27,6 +27,7 @@ settings = { 'max_new_tokens': 200, 'max_new_tokens_min': 1, 'max_new_tokens_max': 2000, + 'seed': -1, 'name1': 'You', 'name2': 'Assistant', 'context': 'This is a conversation with your Assistant. The Assistant is very helpful and is eager to chat with you and answer your questions.', diff --git a/server.py b/server.py index 8cbe1f7c..225a1f4c 100644 --- a/server.py +++ b/server.py @@ -166,7 +166,7 @@ def create_settings_menus(default_preset): with gr.Column(): create_model_and_preset_menus() with gr.Column(): - shared.gradio['seed'] = gr.Number(value=-1, label='Seed (-1 for random)') + shared.gradio['seed'] = gr.Number(value=shared.settings['seed'], label='Seed (-1 for random)') with gr.Row(): with gr.Column(): diff --git a/settings-template.json b/settings-template.json index 047373f2..4ce0ca7a 100644 --- a/settings-template.json +++ b/settings-template.json @@ -2,6 +2,7 @@ "max_new_tokens": 200, "max_new_tokens_min": 1, "max_new_tokens_max": 2000, + "seed": -1, "name1": "You", "name2": "Assistant", "context": "This is a conversation with your Assistant. The Assistant is very helpful and is eager to chat with you and answer your questions.",