Avoid unnecessary CPU offload and expose full GPU profile mode
This commit is contained in:
+2
-1
@@ -12,11 +12,12 @@ SCHEMAS={
|
||||
'audio':{'speed':(.25,4,1)},
|
||||
'video':{'width':(256,1920,768),'height':(256,1088,512),'frames':(1,241,33),'fps':(1,60,24),'steps':(1,100,20),'seed':(-1,2147483647,-1)}
|
||||
}
|
||||
CHAT_GPU_DEFAULTS={'gpu_devices':[], 'split_mode':'none', 'tensor_split':[], 'mtp':False}
|
||||
CHAT_GPU_DEFAULTS={'gpu_devices':[], 'split_mode':'none', 'tensor_split':[], 'mtp':False,'gpu_offload':'auto'}
|
||||
CHAT_SAMPLING={'temperature':.8,'top_p':.95,'top_k':40,'mtp_tokens':2,'mtp_min_p':.05}
|
||||
|
||||
def chat_parameters(params):
|
||||
params={**CHAT_GPU_DEFAULTS,**CHAT_SAMPLING,**params}
|
||||
if params['gpu_offload'] not in ('auto','full'):raise ValueError('Ungültiger GPU-Auslagerungsmodus.')
|
||||
if type(params['mtp']) is not bool:raise ValueError('MTP muss an oder aus sein.')
|
||||
devices=params['gpu_devices'];split=params['tensor_split']
|
||||
if not isinstance(devices,list) or len(devices)>16 or any(not isinstance(v,str) or not re.fullmatch(r'GPU-[0-9a-fA-F-]{36}',v) for v in devices) or len(set(devices))!=len(devices):raise ValueError('GPUs müssen als eindeutige, geordnete GPU-UUIDs angegeben werden.')
|
||||
|
||||
Reference in New Issue
Block a user