|
|
@ -102,6 +102,8 @@ def getUse(server_address):
|
|
|
|
|
|
|
|
|
|
|
|
# 清理GPU显存
|
|
|
|
# 清理GPU显存
|
|
|
|
def clearGPU(server_address):
|
|
|
|
def clearGPU(server_address):
|
|
|
|
|
|
|
|
# 显示显卡使用率
|
|
|
|
|
|
|
|
print('清理显存前:' + getUse(server_address))
|
|
|
|
# 打开文件并读取内容
|
|
|
|
# 打开文件并读取内容
|
|
|
|
file_path = r'../JSON/clearGPU.json'
|
|
|
|
file_path = r'../JSON/clearGPU.json'
|
|
|
|
if not os.path.exists(file_path):
|
|
|
|
if not os.path.exists(file_path):
|
|
|
@ -111,6 +113,9 @@ def clearGPU(server_address):
|
|
|
|
# 清理
|
|
|
|
# 清理
|
|
|
|
queue_prompt(server_address, "cleanGpuRam", prompt_data)
|
|
|
|
queue_prompt(server_address, "cleanGpuRam", prompt_data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 显示显卡使用率
|
|
|
|
|
|
|
|
print('清理显存后:' + getUse(server_address))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 生成图像
|
|
|
|
# 生成图像
|
|
|
|
def generate_clip(server_address, prompt_data, client_id, output_path, myfilter):
|
|
|
|
def generate_clip(server_address, prompt_data, client_id, output_path, myfilter):
|
|
|
|