mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-29 16:40:51 +02:00
sdapi: add job_timestamp field to info result (#2110)
This commit is contained in:
@@ -2480,6 +2480,8 @@ def lora_map_name_to_path(request_list):
|
||||
def sd_generate(genparams):
|
||||
global maxctx, args, currentusergenkey, totalgens, pendingabortkey, chatcompl_adapter
|
||||
|
||||
job_timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
|
||||
|
||||
default_adapter = {} if chatcompl_adapter is None else chatcompl_adapter
|
||||
adapter_obj = genparams.get('adapter', default_adapter)
|
||||
forced_negprompt = adapter_obj.get("add_sd_negative_prompt", "")
|
||||
@@ -2594,6 +2596,7 @@ def sd_generate(genparams):
|
||||
data_extra = ret.data_extra.decode("UTF-8","ignore")
|
||||
info = json.loads(ret.info.decode("UTF-8","ignore"))
|
||||
animated = True if ret.animated else False
|
||||
info["job_timestamp"] = job_timestamp
|
||||
return {"animated": animated, "data":data_main, "data_extra":data_extra, "info": info}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user