mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-20 22:13:43 +00:00
Add a --portable flag to hide things in portable mode
This commit is contained in:
parent
3f26b0408b
commit
905afced1c
8 changed files with 27 additions and 13 deletions
|
|
@ -11,7 +11,7 @@ from modules.logging_colors import logger
|
|||
|
||||
|
||||
def default_preset():
|
||||
return {
|
||||
result = {
|
||||
'temperature': 1,
|
||||
'dynatemp_low': 1,
|
||||
'dynatemp_high': 1,
|
||||
|
|
@ -50,6 +50,13 @@ def default_preset():
|
|||
'dry_sequence_breakers': '"\\n", ":", "\\"", "*"',
|
||||
}
|
||||
|
||||
if shared.args.portable:
|
||||
samplers = result['sampler_priority'].split('\n')
|
||||
samplers = [sampler for sampler in samplers if sampler in ["dry", "top_k", "typ_p", "top_p", "min_p", "xtc", "temperature", "repetition_penalty"]]
|
||||
result['sampler_priority'] = '\n'.join(samplers)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def presets_params():
|
||||
return [k for k in default_preset()]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue