bizyengine 1.2.70__py3-none-any.whl → 1.2.72__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bizyengine/bizy_server/api_client.py +16 -0
- bizyengine/bizy_server/errno.py +7 -0
- bizyengine/bizy_server/server.py +10 -0
- bizyengine/bizyair_extras/third_party_api/nodes_doubao.py +131 -0
- bizyengine/version.txt +1 -1
- {bizyengine-1.2.70.dist-info → bizyengine-1.2.72.dist-info}/METADATA +1 -1
- {bizyengine-1.2.70.dist-info → bizyengine-1.2.72.dist-info}/RECORD +9 -9
- {bizyengine-1.2.70.dist-info → bizyengine-1.2.72.dist-info}/WHEEL +0 -0
- {bizyengine-1.2.70.dist-info → bizyengine-1.2.72.dist-info}/top_level.txt +0 -0
|
@@ -1227,3 +1227,19 @@ class APIClient:
|
|
|
1227
1227
|
except asyncio.exceptions.TimeoutError:
|
|
1228
1228
|
print("Request to fetch models timed out")
|
|
1229
1229
|
return []
|
|
1230
|
+
|
|
1231
|
+
async def get_plugin_tmp_token(self, api_key: str = None):
|
|
1232
|
+
url = f"{BIZYAIR_X_SERVER}/auth/plugin_tmp_token"
|
|
1233
|
+
headers, err = self.auth_header(api_key=api_key)
|
|
1234
|
+
if err is not None:
|
|
1235
|
+
print(f"get_plugin_tmp_token: error getting headers: {err}")
|
|
1236
|
+
return None, err
|
|
1237
|
+
try:
|
|
1238
|
+
data, err = await self.do_post(url, headers=headers)
|
|
1239
|
+
if err is not None:
|
|
1240
|
+
print(f"get_plugin_tmp_token error: {err}")
|
|
1241
|
+
return None, err
|
|
1242
|
+
return data["data"], None
|
|
1243
|
+
except aiohttp.ClientError as e:
|
|
1244
|
+
print(f"get_plugin_tmp_token error: {e}")
|
|
1245
|
+
return None, errnos.GET_PLUGIN_TMP_TOKEN
|
bizyengine/bizy_server/errno.py
CHANGED
bizyengine/bizy_server/server.py
CHANGED
|
@@ -1342,6 +1342,16 @@ class BizyAirServer:
|
|
|
1342
1342
|
|
|
1343
1343
|
return OKResponse(resp)
|
|
1344
1344
|
|
|
1345
|
+
@self.prompt_server.routes.post(f"/{API_PREFIX}/auth/plugin_tmp_token")
|
|
1346
|
+
async def get_plugin_tmp_token(request):
|
|
1347
|
+
api_key = request.rel_url.query.get("api_key", "")
|
|
1348
|
+
|
|
1349
|
+
resp, err = await self.api_client.get_plugin_tmp_token(api_key=api_key)
|
|
1350
|
+
if err is not None:
|
|
1351
|
+
return ErrResponse(err)
|
|
1352
|
+
|
|
1353
|
+
return OKResponse(resp)
|
|
1354
|
+
|
|
1345
1355
|
async def send_json(self, event, data, sid=None):
|
|
1346
1356
|
message = {"type": event, "data": data}
|
|
1347
1357
|
|
|
@@ -152,6 +152,137 @@ class Seedream4(BizyAirTrdApiBaseNode):
|
|
|
152
152
|
return (images,)
|
|
153
153
|
|
|
154
154
|
|
|
155
|
+
class Seedream4_5(BizyAirTrdApiBaseNode):
|
|
156
|
+
RETURN_TYPES = ("IMAGE",)
|
|
157
|
+
RETURN_NAMES = ("images",)
|
|
158
|
+
CATEGORY = "☁️BizyAir/External APIs/Doubao"
|
|
159
|
+
NODE_DISPLAY_NAME = "Seedream 4.5"
|
|
160
|
+
|
|
161
|
+
@classmethod
|
|
162
|
+
def INPUT_TYPES(s):
|
|
163
|
+
return {
|
|
164
|
+
"required": {
|
|
165
|
+
"prompt": (
|
|
166
|
+
"STRING",
|
|
167
|
+
{
|
|
168
|
+
"multiline": True,
|
|
169
|
+
"default": "",
|
|
170
|
+
},
|
|
171
|
+
),
|
|
172
|
+
"model": (
|
|
173
|
+
["doubao-seedream-4-5-251128"],
|
|
174
|
+
{"default": "doubao-seedream-4-5-251128"},
|
|
175
|
+
),
|
|
176
|
+
"size": (
|
|
177
|
+
[
|
|
178
|
+
"2K",
|
|
179
|
+
"4K",
|
|
180
|
+
"Custom",
|
|
181
|
+
],
|
|
182
|
+
{
|
|
183
|
+
"default": "2K",
|
|
184
|
+
},
|
|
185
|
+
),
|
|
186
|
+
"custom_width": (
|
|
187
|
+
"INT",
|
|
188
|
+
{
|
|
189
|
+
"default": 2048,
|
|
190
|
+
"min": 480,
|
|
191
|
+
"max": 4096,
|
|
192
|
+
"tooltip": "总像素取值范围 [2560x1440=3686400, 4096x4096=16777216], 宽高比取值范围:[1/16, 16]",
|
|
193
|
+
},
|
|
194
|
+
),
|
|
195
|
+
"custom_height": (
|
|
196
|
+
"INT",
|
|
197
|
+
{
|
|
198
|
+
"default": 2048,
|
|
199
|
+
"min": 480,
|
|
200
|
+
"max": 4096,
|
|
201
|
+
"tooltip": "总像素取值范围 [2560x1440=3686400, 4096x4096=16777216], 宽高比取值范围:[1/16, 16]",
|
|
202
|
+
},
|
|
203
|
+
),
|
|
204
|
+
"max_images": (
|
|
205
|
+
"INT",
|
|
206
|
+
{
|
|
207
|
+
"default": 1,
|
|
208
|
+
"min": 1,
|
|
209
|
+
"max": 15,
|
|
210
|
+
"tooltip": "实际可生成的图片数量,除受到 max_images 影响外,还受到输入的参考图数量影响。输入的参考图数量+最终生成的图片数量≤15张。",
|
|
211
|
+
},
|
|
212
|
+
),
|
|
213
|
+
"optimize_prompt": (
|
|
214
|
+
["disabled", "standard"],
|
|
215
|
+
{
|
|
216
|
+
"default": "disabled",
|
|
217
|
+
"tooltip": "提示词优化功能的配置。standard:标准模式,生成内容的质量更高,耗时较长。",
|
|
218
|
+
},
|
|
219
|
+
),
|
|
220
|
+
},
|
|
221
|
+
"optional": {
|
|
222
|
+
"images": (
|
|
223
|
+
"IMAGE",
|
|
224
|
+
{"tooltip": "参考图,数量不超过14张。会影响组图生成数量"},
|
|
225
|
+
),
|
|
226
|
+
},
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
def handle_inputs(self, headers, prompt_id, **kwargs):
|
|
230
|
+
# up to 14 ref images
|
|
231
|
+
# 10mb each
|
|
232
|
+
# custom total pixels [3686400, 16777216]
|
|
233
|
+
# custom size ratio [1/16, 16]
|
|
234
|
+
model = kwargs.get("model", "doubao-seedream-4-0-250828")
|
|
235
|
+
prompt = kwargs.get("prompt", "")
|
|
236
|
+
size = kwargs.get("size", "2K")
|
|
237
|
+
images = kwargs.get("images", None)
|
|
238
|
+
optimize_prompt = kwargs.get("optimize_prompt", "disabled")
|
|
239
|
+
max_images = kwargs.get("max_images", 1)
|
|
240
|
+
|
|
241
|
+
if images is not None and len(images) > 14:
|
|
242
|
+
raise ValueError("Maximum number of images is 14")
|
|
243
|
+
if size == "Custom":
|
|
244
|
+
width = kwargs.get("custom_width", 2048)
|
|
245
|
+
height = kwargs.get("custom_height", 2048)
|
|
246
|
+
if width * height < 3686400 or width * height > 16777216:
|
|
247
|
+
raise ValueError("Total pixels must be between 3686400 and 16777216")
|
|
248
|
+
if width / height < 1 / 16 or width / height > 16:
|
|
249
|
+
raise ValueError("Width/height ratio must be between 1/16 and 16")
|
|
250
|
+
size = f"{width}x{height}"
|
|
251
|
+
|
|
252
|
+
parts = []
|
|
253
|
+
for batch_number, img in enumerate(images if images is not None else []):
|
|
254
|
+
if img is not None:
|
|
255
|
+
bio = tensor_to_bytesio(image=img, total_pixels=4096 * 4096)
|
|
256
|
+
length = bio.getbuffer().nbytes
|
|
257
|
+
if length > 10 * 1024 * 1024:
|
|
258
|
+
raise ValueError(
|
|
259
|
+
"Image size is too large, Seedream 4.5 only supports up to 10MB"
|
|
260
|
+
)
|
|
261
|
+
url = self.upload_file(
|
|
262
|
+
bio,
|
|
263
|
+
f"{prompt_id}_{batch_number}.png",
|
|
264
|
+
headers,
|
|
265
|
+
)
|
|
266
|
+
parts.append(url)
|
|
267
|
+
|
|
268
|
+
data = {
|
|
269
|
+
"prompt": prompt,
|
|
270
|
+
"size": size,
|
|
271
|
+
"model": model,
|
|
272
|
+
"max_images": max_images,
|
|
273
|
+
}
|
|
274
|
+
if len(parts) > 0:
|
|
275
|
+
data["image"] = parts
|
|
276
|
+
if optimize_prompt != "disabled":
|
|
277
|
+
data["optimize_prompt"] = optimize_prompt
|
|
278
|
+
|
|
279
|
+
return data, model
|
|
280
|
+
|
|
281
|
+
def handle_outputs(self, outputs):
|
|
282
|
+
images = self.combine_images(outputs[1])
|
|
283
|
+
return (images,)
|
|
284
|
+
|
|
285
|
+
|
|
155
286
|
class Seededit3(BizyAirTrdApiBaseNode):
|
|
156
287
|
RETURN_TYPES = ("IMAGE",)
|
|
157
288
|
RETURN_NAMES = ("image",)
|
bizyengine/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.72
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bizyengine
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.72
|
|
4
4
|
Summary: [a/BizyAir](https://github.com/siliconflow/BizyAir) Comfy Nodes that can run in any environment.
|
|
5
5
|
Author-email: SiliconFlow <yaochi@siliconflow.cn>
|
|
6
6
|
Project-URL: Repository, https://github.com/siliconflow/BizyAir
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
bizyengine/__init__.py,sha256=GP9V-JM07fz7uv_qTB43QEA2rKdrVJxi5I7LRnn_3ZQ,914
|
|
2
|
-
bizyengine/version.txt,sha256=
|
|
2
|
+
bizyengine/version.txt,sha256=a7iR7IBhAjmgseNlnvFyQ7DcWKZVPC_fBtzuP4Q3RPY,7
|
|
3
3
|
bizyengine/bizy_server/__init__.py,sha256=SP9oSblnPo4KQyh7yOGD26YCskFAcQHAZy04nQBNRIw,200
|
|
4
|
-
bizyengine/bizy_server/api_client.py,sha256=
|
|
5
|
-
bizyengine/bizy_server/errno.py,sha256=
|
|
4
|
+
bizyengine/bizy_server/api_client.py,sha256=fF2VApJjPcPWGQwYWSEaIN12c8WT95lj1_QHX83WbeQ,44630
|
|
5
|
+
bizyengine/bizy_server/errno.py,sha256=ikb4Z3MRMTjosi9AC1epaOwE3kJsD6CcFcFp56AKF-Y,16986
|
|
6
6
|
bizyengine/bizy_server/error_handler.py,sha256=MGrfO1AEqbfEgMWPL8B6Ypew_zHiQAdYGlhN9bZohrY,167
|
|
7
7
|
bizyengine/bizy_server/execution.py,sha256=ayaEf6eGJKQsVZV-1_UlGlvwwmlH7FEek31Uq-MbUjA,1644
|
|
8
8
|
bizyengine/bizy_server/profile.py,sha256=f4juAzJ73gCm0AhagYpt9WnG8HEI6xze_U96-omBLqU,3044
|
|
9
9
|
bizyengine/bizy_server/resp.py,sha256=iOFT5Ud7VJBP2uqkojJIgc3y2ifMjjEXoj0ewneL9lc,710
|
|
10
|
-
bizyengine/bizy_server/server.py,sha256=
|
|
10
|
+
bizyengine/bizy_server/server.py,sha256=tdr_Um6aRed1YVMo7D9TpUyAu1ZQEyiHbQhyDfhtVoY,57877
|
|
11
11
|
bizyengine/bizy_server/stream_response.py,sha256=H2XHqlVRtQMhgdztAuG7l8-iV_Pm42u2x6WJ0gNVIW0,9654
|
|
12
12
|
bizyengine/bizy_server/utils.py,sha256=t3y3ZTDzFa8K4wXlzgLVaFNCizgylsKsd9K3rLL4sGw,3986
|
|
13
13
|
bizyengine/bizyair_extras/__init__.py,sha256=9iPmEyR7F1IXbUaBNS90ivW9ul18GcuWFxRfFv2ieAw,1011
|
|
@@ -46,7 +46,7 @@ bizyengine/bizyair_extras/nodes_ipadapter_plus/nodes_ipadapter_plus.py,sha256=lO
|
|
|
46
46
|
bizyengine/bizyair_extras/nodes_kolors_mz/__init__.py,sha256=HsCCCphW8q0SrWEiFlZKK_W2lQr1T0UJIJL7gEn37ME,3729
|
|
47
47
|
bizyengine/bizyair_extras/oauth_callback/main.py,sha256=KQOZWor3kyNx8xvUNHYNMoHfCF9g_ht13_iPk4K_5YM,3633
|
|
48
48
|
bizyengine/bizyair_extras/third_party_api/__init__.py,sha256=etiPBCIxOBD6hbrVhdivaRVOPrAp6z79YDWyJgqr_b4,320
|
|
49
|
-
bizyengine/bizyair_extras/third_party_api/nodes_doubao.py,sha256=
|
|
49
|
+
bizyengine/bizyair_extras/third_party_api/nodes_doubao.py,sha256=FtpAnxOuAND_xUgrdovw6hz5wHUm4VC92pd-fynpJpM,19239
|
|
50
50
|
bizyengine/bizyair_extras/third_party_api/nodes_flux.py,sha256=9o7imVDn9qXnUokkAjTH9yNdpXwcuQ8p3rsv5Y5eywQ,6135
|
|
51
51
|
bizyengine/bizyair_extras/third_party_api/nodes_gemini.py,sha256=-P6PO0-qwwUbOYaqbS6SSg3w6_yAkLpBtL3mNq0PNSc,14587
|
|
52
52
|
bizyengine/bizyair_extras/third_party_api/nodes_gpt.py,sha256=pvIlwjjHnk_XCa4eJERBcsWonaBd24xP0jFVQLJXdQc,3098
|
|
@@ -103,7 +103,7 @@ bizyengine/misc/route_sam.py,sha256=-bMIR2QalfnszipGxSxvDAHGJa5gPSrjkYPb5baaRg4,
|
|
|
103
103
|
bizyengine/misc/segment_anything.py,sha256=wNKYwlYPMszfwj23524geFZJjZaG4eye65SGaUnh77I,8941
|
|
104
104
|
bizyengine/misc/supernode.py,sha256=STN9gaxfTSErH8OiHeZa47d8z-G9S0I7fXuJvHQOBFM,4532
|
|
105
105
|
bizyengine/misc/utils.py,sha256=nXXTPkj4WBvds4EWjI9c-ydeWwmXl8Vwrdu-4Fh62g8,12914
|
|
106
|
-
bizyengine-1.2.
|
|
107
|
-
bizyengine-1.2.
|
|
108
|
-
bizyengine-1.2.
|
|
109
|
-
bizyengine-1.2.
|
|
106
|
+
bizyengine-1.2.72.dist-info/METADATA,sha256=avhbzY9k0yg3bnxWYcckNHBkPYIghct_pVI1FfR_OiE,735
|
|
107
|
+
bizyengine-1.2.72.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
108
|
+
bizyengine-1.2.72.dist-info/top_level.txt,sha256=2zapzqxX-we5cRyJkGf9bd5JinRtXp3-_uDI-xCAnc0,11
|
|
109
|
+
bizyengine-1.2.72.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|