Publish current ComfyUI O1Key code baseline
Replace the prior release tree with the current plugin, frontend, tests, and documentation. Document retired node IDs and the public Gitea update source.
This commit is contained in:
+6
-2
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Flux2 图像编辑节点
|
||||
通过 vip.o1key.com 调用 Flux2 + SeedVR2 远程服务进行图像编辑和超分辨率
|
||||
通过 api.o1key.cn 调用 Flux2 + SeedVR2 远程服务进行图像编辑和超分辨率
|
||||
|
||||
功能:
|
||||
- 接收主图和参考图
|
||||
@@ -17,6 +17,7 @@ import torch
|
||||
from PIL import Image
|
||||
|
||||
from ..utils.image_utils import tensor_to_pil, pil_to_tensor
|
||||
from ..utils.config import get_runtime_config_signature
|
||||
from ..clients.flux_edit_client import FluxEditClient
|
||||
|
||||
|
||||
@@ -32,6 +33,7 @@ class FluxImageEdit:
|
||||
|
||||
def __init__(self):
|
||||
self.client = None
|
||||
self._client_config_signature = None
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
@@ -100,8 +102,10 @@ class FluxImageEdit:
|
||||
|
||||
try:
|
||||
# 初始化客户端
|
||||
if self.client is None:
|
||||
config_signature = get_runtime_config_signature()
|
||||
if self.client is None or config_signature != self._client_config_signature:
|
||||
self.client = FluxEditClient()
|
||||
self._client_config_signature = config_signature
|
||||
|
||||
# Tensor → PIL(取第一张)
|
||||
main_pils = tensor_to_pil(主图)
|
||||
|
||||
Reference in New Issue
Block a user