fix: K video 节点改用 api.o1key.com 直连,绕过 Cloudflare 代理避免 524 超时
Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
@@ -10,7 +10,7 @@ import tempfile
|
|||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from ..utils.config import get_api_key_or_raise, get_async_api_base_url
|
from ..utils.config import get_api_key_or_raise, get_api_base_url
|
||||||
from ..utils.image_utils import tensor_to_pil, encode_image_to_base64
|
from ..utils.image_utils import tensor_to_pil, encode_image_to_base64
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -72,7 +72,7 @@ class KVideoFirstLast:
|
|||||||
|
|
||||||
async def generate(self, 起始帧, 提示词, 模式, 时长, 生成音频="关闭", 尾帧=None, seed=0):
|
async def generate(self, 起始帧, 提示词, 模式, 时长, 生成音频="关闭", 尾帧=None, seed=0):
|
||||||
api_key = get_api_key_or_raise()
|
api_key = get_api_key_or_raise()
|
||||||
base_url = get_async_api_base_url()
|
base_url = get_api_base_url()
|
||||||
headers = {
|
headers = {
|
||||||
"Authorization": f"Bearer {api_key}",
|
"Authorization": f"Bearer {api_key}",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import tempfile
|
|||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from ..utils.config import get_api_key_or_raise, get_async_api_base_url
|
from ..utils.config import get_api_key_or_raise, get_api_base_url
|
||||||
from ..utils.image_utils import tensor_to_pil, encode_image_to_base64
|
from ..utils.image_utils import tensor_to_pil, encode_image_to_base64
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -70,7 +70,7 @@ class KVideoImage2Video:
|
|||||||
|
|
||||||
async def generate(self, 起始帧, 提示词, 模式, 时长, 生成音频="关闭", seed=0):
|
async def generate(self, 起始帧, 提示词, 模式, 时长, 生成音频="关闭", seed=0):
|
||||||
api_key = get_api_key_or_raise()
|
api_key = get_api_key_or_raise()
|
||||||
base_url = get_async_api_base_url()
|
base_url = get_api_base_url()
|
||||||
headers = {
|
headers = {
|
||||||
"Authorization": f"Bearer {api_key}",
|
"Authorization": f"Bearer {api_key}",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
Reference in New Issue
Block a user