From 8c51828dbf9045cb372dd389bb2d1b90c26ba8b6 Mon Sep 17 00:00:00 2001 From: ChairC <974833488@qq.com> Date: Thu, 14 Nov 2024 18:32:17 +0800 Subject: [PATCH 1/3] Add: Added v1.1.7 tag. --- config/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/version.py b/config/version.py index 3bb1284..9e6fd0e 100644 --- a/config/version.py +++ b/config/version.py @@ -13,7 +13,7 @@ # IDDM version __version__ = ["0.0.1", "1.0.0", "1.0.1", "1.0.2", "1.1.0-stable", "1.1.1", "1.1.2-stable", "1.1.3", "1.1.4", "1.1.5", - "1.1.6"] + "1.1.6", "1.1.7"] def get_versions(): From 89219aff0b918b8146c98292ef9930239995e0d7 Mon Sep 17 00:00:00 2001 From: ChairC <974833488@qq.com> Date: Thu, 14 Nov 2024 18:34:46 +0800 Subject: [PATCH 2/3] Add: Added deploy test. --- test/test_module.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/test/test_module.py b/test/test_module.py index 5c26786..664beaf 100644 --- a/test/test_module.py +++ b/test/test_module.py @@ -9,6 +9,7 @@ import json import os import socket +import requests import torch import unittest @@ -129,15 +130,15 @@ def test_summary(self): print(net) summary(model=net, input_data=[x, t, y]) - def test_send_message(self): + def test_send_message_to_socket(self): """ - Test local send message to deploy.py + Test local send message to deploy_socket.py :return: None """ - test_json = {"conditional": True, "sample": "ddpm", "image_size": 64, "num_images": 2, "act": "gelu", + test_json = {"sample": "ddpm", "image_size": 64, "num_images": 2, "type": "base64", "weight_path": "/your/test/model/path/test.pt", - "result_path": "/your/results/deploy", - "num_classes": 6, "class_name": 1, "cfg_scale": 3} + "result_path": "/your/results/deploy", "class_name": 0, + } logger.info(msg=f"Test json: {test_json}") client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # host = "127.0.1.1" @@ -151,6 +152,19 @@ def test_send_message(self): client_socket.close() logger.info(msg="Send message successfully!") + def test_send_message_to_web(self): + url = "http://127.0.0.1:12341/api/generate/df" + # Define the parameters of the request, using JSON format here + data = { + "sample": "ddim", "image_size": 64, "num_images": 2, "type": "url", + "weight_path": "/your/test/model/path/test.pt", + "result_path": "/your/results/deploy", "class_name": 0, + } + + # Send a POST request + response = requests.post(url, json=data) + logger.info(msg=f"Get return message => {json.loads(response.content.decode('utf-8'))}") + def test_separate_ckpt_weights(self): """ test separate checkpoint weights From d7dfabd16baa90c5def260884a7aa0ef48635220 Mon Sep 17 00:00:00 2001 From: ChairC <974833488@qq.com> Date: Thu, 14 Nov 2024 18:39:13 +0800 Subject: [PATCH 3/3] Update: Modify writing errors. --- README.md | 1 - README_zh.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index 0d18155..f81044e 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,6 @@ Integrated Design Diffusion Model - [x] 11. Write visual webui interface. (2024-01-23) - [x] 12. Adding PLMS Sampling Method. (2024-03-12) - [x] 13. Adding FID calculator to verify image quality. (2024-05-06) -- [x] 14. Adding the deployment of image-generating Sockets - [x] 14. Adding the deployment of image-generating Sockets and Web server. (2024-11-13) ### Training diff --git a/README_zh.md b/README_zh.md index e30064a..a34abd3 100644 --- a/README_zh.md +++ b/README_zh.md @@ -119,7 +119,6 @@ Integrated Design Diffusion Model - [x] 11. 编写可视化webui界面(2024-01-23) - [x] 12. 增加PLMS采样方法(2024-03-12) - [x] 13. 增加FID方法验证图像质量(2024-05-06) -- [x] 14. 增加生成图像Socket部署(2024-11-12) - [x] 14. 增加生成图像Socket和网站服务部署(2024-11-13) ### 训练