diff --git a/py/flux_dev.py b/py/flux_dev.py index 1f7f7ca..b74eca5 100644 --- a/py/flux_dev.py +++ b/py/flux_dev.py @@ -97,7 +97,7 @@ class FluxDevNode: CATEGORY = "UCLOUD_MODELVERSE" FUNCTION = "execute" - def execute(self, + async def execute(self, client, prompt, width=864, @@ -129,7 +129,7 @@ class FluxDevNode: )) for i in range(num_requests)] - image_urls = asyncio.run(client.run_tasks(tasks)) + image_urls = await client.run_tasks(tasks) output_images_list = [] for image_url in image_urls: diff --git a/py/flux_kontext_max.py b/py/flux_kontext_max.py index 03c620c..029a290 100644 --- a/py/flux_kontext_max.py +++ b/py/flux_kontext_max.py @@ -59,7 +59,7 @@ class FluxKontextMaxNode: CATEGORY = "UCLOUD_MODELVERSE" FUNCTION = "execute" - def execute(self, + async def execute(self, client, prompt, images, @@ -100,7 +100,7 @@ class FluxKontextMaxNode: )) for i in range(num_requests)] - image_urls = asyncio.run(client.run_tasks(tasks)) + image_urls = await client.run_tasks(tasks) output_images_list = [] for image_url in image_urls: diff --git a/py/flux_kontext_max_t2i.py b/py/flux_kontext_max_t2i.py index 138efcf..b6f4086 100644 --- a/py/flux_kontext_max_t2i.py +++ b/py/flux_kontext_max_t2i.py @@ -63,7 +63,7 @@ class FluxKontextMaxT2INode: CATEGORY = "UCLOUD_MODELVERSE" FUNCTION = "execute" - def execute(self, + async def execute(self, client, prompt, num_images=1, @@ -88,7 +88,7 @@ class FluxKontextMaxT2INode: )) for i in range(num_requests)] - image_urls = asyncio.run(client.run_tasks(tasks)) + image_urls = await client.run_tasks(tasks) output_images_list = [] for image_url in image_urls: diff --git a/py/flux_kontext_pro.py b/py/flux_kontext_pro.py index 179530d..b1f2b68 100644 --- a/py/flux_kontext_pro.py +++ b/py/flux_kontext_pro.py @@ -59,7 +59,7 @@ class FluxKontextProNode: CATEGORY = "UCLOUD_MODELVERSE" FUNCTION = "execute" - def execute(self, + async def execute(self, client, prompt, images, @@ -100,7 +100,7 @@ class FluxKontextProNode: )) for i in range(num_requests)] - image_urls = asyncio.run(client.run_tasks(tasks)) + image_urls = await client.run_tasks(tasks) output_images_list = [] for image_url in image_urls: diff --git a/py/flux_kontext_pro_t2i.py b/py/flux_kontext_pro_t2i.py index d962eae..280ea70 100644 --- a/py/flux_kontext_pro_t2i.py +++ b/py/flux_kontext_pro_t2i.py @@ -63,7 +63,7 @@ class FluxKontextProT2INode: CATEGORY = "UCLOUD_MODELVERSE" FUNCTION = "execute" - def execute(self, + async def execute(self, client, prompt, num_images=1, @@ -88,7 +88,7 @@ class FluxKontextProT2INode: )) for i in range(num_requests)] - image_urls = asyncio.run(client.run_tasks(tasks)) + image_urls = await client.run_tasks(tasks) output_images_list = [] for image_url in image_urls: diff --git a/py/step1x_edit.py b/py/step1x_edit.py index 0d2feb0..a1dae80 100644 --- a/py/step1x_edit.py +++ b/py/step1x_edit.py @@ -60,7 +60,7 @@ class Step1xEditNode: CATEGORY = "UCLOUD_MODELVERSE" FUNCTION = "execute" - def execute(self, + async def execute(self, client, prompt, image, @@ -89,7 +89,7 @@ class Step1xEditNode: )) for i in range(num_requests)] - image_urls = asyncio.run(client.run_tasks(tasks)) + image_urls = await client.run_tasks(tasks) output_images_list = [] for image_url in image_urls: diff --git a/requirements.txt b/requirements.txt index fbce154..d6d2140 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -requests >= 3.32.4 +requests >= 2.32.4 pillow >= 11