PhotoMaker
PhotoMaker copied to clipboard
ValueError: cannot find context for 'fork'
python gradio_demo/app.py
Traceback (most recent call last):
File "E:\2023_Code_WEB\PhotoMaker-main\gradio_demo\app.py", line 10, in <module>
import spaces
File "E:\anaconda3\envs\photomaker\lib\site-packages\spaces\__init__.py", line 10, in <module>
from .zero.decorator import GPU
File "E:\anaconda3\envs\photomaker\lib\site-packages\spaces\zero\decorator.py", line 18, in <module>
from .wrappers import regular_function_wrapper
File "E:\anaconda3\envs\photomaker\lib\site-packages\spaces\zero\wrappers.py", line 42, in <module>
Process = multiprocessing.get_context('fork').Process
File "E:\anaconda3\envs\photomaker\lib\multiprocessing\context.py", line 243, in get_context
return super().get_context(method)
File "E:\anaconda3\envs\photomaker\lib\multiprocessing\context.py", line 193, in get_context
raise ValueError('cannot find context for %r' % method) from None
ValueError: cannot find context for 'fork'
Please refer to #41
this is a hack workaround but you can replace "fork" with "spawn"