make execute async function
This commit is contained in:
+2
-2
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
+2
-2
@@ -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:
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
requests >= 3.32.4
|
||||
requests >= 2.32.4
|
||||
pillow >= 11
|
||||
|
||||
Reference in New Issue
Block a user