'commit'
This commit is contained in:
@@ -3,9 +3,6 @@ import os
|
||||
import time
|
||||
import base64
|
||||
|
||||
from JiMeng.Kit.JmCommon import JmCommon
|
||||
from JiMeng.Kit.JmErrorCode import JmErrorCode
|
||||
|
||||
|
||||
class JmTxt2Img:
|
||||
action = "CVProcess"
|
||||
@@ -61,13 +58,13 @@ class JmTxt2Img:
|
||||
prompt += "5、宏大,雄伟,颜色鲜明,不要灰色调的,不要有雾霾之类的"
|
||||
prompt += "6、超高清画质"
|
||||
|
||||
# 保存图片路径
|
||||
save_image_path = os.path.join(JmCommon.base_path, "Text2Img.jpg")
|
||||
# 保存图片路径 - 使用绝对路径避免相对路径问题
|
||||
save_image_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "..", "..", "Text2Img.jpg"))
|
||||
print(f"保存图片路径:{save_image_path}")
|
||||
|
||||
# 添加重试逻辑,处理API并发限制错误
|
||||
retry_count = 0
|
||||
max_retries = 1000 # 最大重试次数
|
||||
max_retries = 5 # 减少重试次数以便更快排查问题
|
||||
retry_interval = 5000 # 重试间隔(毫秒)
|
||||
|
||||
while True:
|
||||
|
Reference in New Issue
Block a user