Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -14,13 +14,13 @@ import warnings
|
|
14 |
import time
|
15 |
import asyncio
|
16 |
from functools import partial
|
|
|
17 |
|
18 |
# external
|
19 |
|
20 |
import spaces
|
21 |
import torch
|
22 |
import gradio as gr
|
23 |
-
from pathos.multiprocessing import ProcessPool as Pool
|
24 |
from numpy import asarray as array
|
25 |
from lxml.html import fromstring
|
26 |
from diffusers.utils import export_to_gif, load_image
|
@@ -136,7 +136,7 @@ pipe_flux = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_d
|
|
136 |
|
137 |
def parallel(func,*args):
|
138 |
with Pool(nodes=len(args)) as pool:
|
139 |
-
res = pool.
|
140 |
return list(res)
|
141 |
|
142 |
# functionality
|
|
|
14 |
import time
|
15 |
import asyncio
|
16 |
from functools import partial
|
17 |
+
from concurrent.futures import ProcessPoolExecutor as Pool
|
18 |
|
19 |
# external
|
20 |
|
21 |
import spaces
|
22 |
import torch
|
23 |
import gradio as gr
|
|
|
24 |
from numpy import asarray as array
|
25 |
from lxml.html import fromstring
|
26 |
from diffusers.utils import export_to_gif, load_image
|
|
|
136 |
|
137 |
def parallel(func,*args):
|
138 |
with Pool(nodes=len(args)) as pool:
|
139 |
+
res = pool.map(func, *args)
|
140 |
return list(res)
|
141 |
|
142 |
# functionality
|