This commit is contained in:
2023-02-18 22:12:27 +08:00
parent bab2a25c96
commit 2465716169

View File

@@ -298,6 +298,8 @@ def main_dev(opt):
start_code = None start_code = None
if opt.fixed_code: if opt.fixed_code:
start_code = torch.randn([opt.n_samples, opt.C, opt.H // opt.f, opt.W // opt.f], device=device) start_code = torch.randn([opt.n_samples, opt.C, opt.H // opt.f, opt.W // opt.f], device=device)
'''
# 切换模型 # 切换模型
if opt.torchscript or opt.ipex: if opt.torchscript or opt.ipex:
transformer = model.cond_stage_model.model transformer = model.cond_stage_model.model
@@ -435,8 +437,9 @@ def main_dev(opt):
#grid_count += 1 #grid_count += 1
print(f"Your samples are ready and waiting for you here: \n{outpath} \n", f" \nEnjoy.") print(f"Your samples are ready and waiting for you here: \n{outpath} \n", f" \nEnjoy.")
update_task_status(task=item, status='done', progress=1) # 修改任务状态为完成 update_task_status(task=item, status='done', progress=1) # 修改任务状态为完成
'''
print("任务结束, 等待10s后退出..") print("任务结束, 等待10s后退出..")
time.sleep(10) #time.sleep(10)
break break