|
9 | 9 | RECOMMENDED_PRESETS, |
10 | 10 | RECOMMENDED_PRESETS_SEEDREAM_4, |
11 | 11 | VIDEO_TASKS_EXECUTION_TIME, |
12 | | - Image2ImageTaskCreationRequest, |
13 | 12 | Image2VideoTaskCreationRequest, |
14 | 13 | ImageTaskCreationResponse, |
15 | 14 | Seedream4Options, |
@@ -174,99 +173,6 @@ async def execute( |
174 | 173 | return IO.NodeOutput(await download_url_to_image_tensor(get_image_url_from_response(response))) |
175 | 174 |
|
176 | 175 |
|
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 | | - |
270 | 176 | class ByteDanceSeedreamNode(IO.ComfyNode): |
271 | 177 |
|
272 | 178 | @classmethod |
@@ -1101,7 +1007,6 @@ class ByteDanceExtension(ComfyExtension): |
1101 | 1007 | async def get_node_list(self) -> list[type[IO.ComfyNode]]: |
1102 | 1008 | return [ |
1103 | 1009 | ByteDanceImageNode, |
1104 | | - ByteDanceImageEditNode, |
1105 | 1010 | ByteDanceSeedreamNode, |
1106 | 1011 | ByteDanceTextToVideoNode, |
1107 | 1012 | ByteDanceImageToVideoNode, |
|
0 commit comments