Skip to content

Commit cd4985e

Browse files
chore(api-nodes): remove ByteDanceImageEditNode node (seededit) (#12069)
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
1 parent bfe31d0 commit cd4985e

File tree

2 files changed

+0
-106
lines changed

2 files changed

+0
-106
lines changed

comfy_api_nodes/apis/bytedance.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ class Text2ImageTaskCreationRequest(BaseModel):
1313
watermark: bool | None = Field(False)
1414

1515

16-
class Image2ImageTaskCreationRequest(BaseModel):
17-
model: str = Field(...)
18-
prompt: str = Field(...)
19-
response_format: str | None = Field("url")
20-
image: str = Field(..., description="Base64 encoded string or image URL")
21-
size: str | None = Field("adaptive")
22-
seed: int | None = Field(..., ge=0, le=2147483647)
23-
guidance_scale: float | None = Field(..., ge=1.0, le=10.0)
24-
watermark: bool | None = Field(False)
25-
26-
2716
class Seedream4Options(BaseModel):
2817
max_images: int = Field(15)
2918

comfy_api_nodes/nodes_bytedance.py

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
RECOMMENDED_PRESETS,
1010
RECOMMENDED_PRESETS_SEEDREAM_4,
1111
VIDEO_TASKS_EXECUTION_TIME,
12-
Image2ImageTaskCreationRequest,
1312
Image2VideoTaskCreationRequest,
1413
ImageTaskCreationResponse,
1514
Seedream4Options,
@@ -174,99 +173,6 @@ async def execute(
174173
return IO.NodeOutput(await download_url_to_image_tensor(get_image_url_from_response(response)))
175174

176175

177-
class ByteDanceImageEditNode(IO.ComfyNode):
178-
179-
@classmethod
180-
def define_schema(cls):
181-
return IO.Schema(
182-
node_id="ByteDanceImageEditNode",
183-
display_name="ByteDance Image Edit",
184-
category="api node/image/ByteDance",
185-
description="Edit images using ByteDance models via api based on prompt",
186-
inputs=[
187-
IO.Combo.Input("model", options=["seededit-3-0-i2i-250628"]),
188-
IO.Image.Input(
189-
"image",
190-
tooltip="The base image to edit",
191-
),
192-
IO.String.Input(
193-
"prompt",
194-
multiline=True,
195-
default="",
196-
tooltip="Instruction to edit image",
197-
),
198-
IO.Int.Input(
199-
"seed",
200-
default=0,
201-
min=0,
202-
max=2147483647,
203-
step=1,
204-
display_mode=IO.NumberDisplay.number,
205-
control_after_generate=True,
206-
tooltip="Seed to use for generation",
207-
optional=True,
208-
),
209-
IO.Float.Input(
210-
"guidance_scale",
211-
default=5.5,
212-
min=1.0,
213-
max=10.0,
214-
step=0.01,
215-
display_mode=IO.NumberDisplay.number,
216-
tooltip="Higher value makes the image follow the prompt more closely",
217-
optional=True,
218-
),
219-
IO.Boolean.Input(
220-
"watermark",
221-
default=False,
222-
tooltip='Whether to add an "AI generated" watermark to the image',
223-
optional=True,
224-
),
225-
],
226-
outputs=[
227-
IO.Image.Output(),
228-
],
229-
hidden=[
230-
IO.Hidden.auth_token_comfy_org,
231-
IO.Hidden.api_key_comfy_org,
232-
IO.Hidden.unique_id,
233-
],
234-
is_api_node=True,
235-
is_deprecated=True,
236-
)
237-
238-
@classmethod
239-
async def execute(
240-
cls,
241-
model: str,
242-
image: Input.Image,
243-
prompt: str,
244-
seed: int,
245-
guidance_scale: float,
246-
watermark: bool,
247-
) -> IO.NodeOutput:
248-
validate_string(prompt, strip_whitespace=True, min_length=1)
249-
if get_number_of_images(image) != 1:
250-
raise ValueError("Exactly one input image is required.")
251-
validate_image_aspect_ratio(image, (1, 3), (3, 1))
252-
source_url = (await upload_images_to_comfyapi(cls, image, max_images=1, mime_type="image/png"))[0]
253-
payload = Image2ImageTaskCreationRequest(
254-
model=model,
255-
prompt=prompt,
256-
image=source_url,
257-
seed=seed,
258-
guidance_scale=guidance_scale,
259-
watermark=watermark,
260-
)
261-
response = await sync_op(
262-
cls,
263-
ApiEndpoint(path=BYTEPLUS_IMAGE_ENDPOINT, method="POST"),
264-
data=payload,
265-
response_model=ImageTaskCreationResponse,
266-
)
267-
return IO.NodeOutput(await download_url_to_image_tensor(get_image_url_from_response(response)))
268-
269-
270176
class ByteDanceSeedreamNode(IO.ComfyNode):
271177

272178
@classmethod
@@ -1101,7 +1007,6 @@ class ByteDanceExtension(ComfyExtension):
11011007
async def get_node_list(self) -> list[type[IO.ComfyNode]]:
11021008
return [
11031009
ByteDanceImageNode,
1104-
ByteDanceImageEditNode,
11051010
ByteDanceSeedreamNode,
11061011
ByteDanceTextToVideoNode,
11071012
ByteDanceImageToVideoNode,

0 commit comments

Comments
 (0)