From 46a7a2c9785783756a3111d2a830473144368eb7 Mon Sep 17 00:00:00 2001 From: stellaHSR Date: Fri, 21 Jul 2023 17:23:49 +0800 Subject: [PATCH] rm test code --- metagpt/tools/sd_engine.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/metagpt/tools/sd_engine.py b/metagpt/tools/sd_engine.py index c0d6b3d44..13d51353e 100644 --- a/metagpt/tools/sd_engine.py +++ b/metagpt/tools/sd_engine.py @@ -110,18 +110,6 @@ class SDEngine: # todo:添加SAM接口调用 raise NotImplementedError - -# async def run(url, payload, session): -# # Perform the HTTP POST request to the SD API -# async with session.post(url, json=payload, timeout=600) as rsp: -# data = await rsp.read() -# -# rsp_json = json.loads(data) -# imgs = rsp_json['images'] -# logger.info(f"callback rsp json is {rsp_json}") -# return imgs - - def decode_base64_to_image(img, save_name): image = Image.open(io.BytesIO(base64.b64decode(img.split(",", 1)[0]))) pnginfo = PngImagePlugin.PngInfo()