Add a --portable flag to hide things in portable mode

This commit is contained in:
oobabooga 2025-05-02 16:32:22 -07:00
parent 3f26b0408b
commit 905afced1c
8 changed files with 27 additions and 13 deletions

View file

@ -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()]