From fa1a244944c7405dc74dc085f6045892a564ba88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=9C=E8=8F=AF?= Date: Wed, 1 Mar 2023 02:53:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E6=95=B0=E7=A7=8D=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 8b082a9..3bba55d 100644 --- a/server.py +++ b/server.py @@ -253,6 +253,7 @@ def main_dev(opt): while True: for task in get_tasks(): # 遍历 tasks 返回 dict print('task:', task) # 打印任务 + seed_everything(task['seed']) # 设置随机种子 # 如果模型不同,重新加载模型(注意释放内存) if task['ckpt'] != model_name: @@ -314,8 +315,8 @@ def main_dev(opt): # x start_code = None - if task['seed']: #if opt.fixed_code: - start_code = torch.randn([task['seed'], opt.C, opt.H // opt.f, opt.W // opt.f], device=device) + if opt.fixed_code: + start_code = torch.randn([task['number'], opt.C, opt.H // opt.f, opt.W // opt.f], device=device) print("start_code:", start_code) # 更新进度