mirror of https://github.com/skygpu/skynet.git
Fix big caption bug, and add logging
parent
07321ee5ee
commit
021e9ce72d
|
@ -127,7 +127,10 @@ async def open_dgpu_node(
|
|||
image = convert_from_cv2_to_image(up_img)
|
||||
logging.info('done')
|
||||
|
||||
return image.tobytes()
|
||||
raw_img = image.tobytes()
|
||||
logging.info(f'final img size {len(raw_img)} bytes.')
|
||||
|
||||
return raw_img
|
||||
|
||||
except BaseException as e:
|
||||
logging.error(e)
|
||||
|
|
|
@ -23,7 +23,11 @@ PREFIX = 'tg'
|
|||
|
||||
|
||||
def prepare_metainfo_caption(meta: dict) -> str:
|
||||
meta_str = f'prompt: \"{meta["prompt"]}\"\n'
|
||||
prompt = meta["prompt"]
|
||||
if len(prompt) > 256:
|
||||
prompt = prompt[:256]
|
||||
|
||||
meta_str = f'prompt: \"{prompt}\"\n'
|
||||
meta_str += f'seed: {meta["seed"]}\n'
|
||||
meta_str += f'step: {meta["step"]}\n'
|
||||
meta_str += f'guidance: {meta["guidance"]}\n'
|
||||
|
|
Loading…
Reference in New Issue