PhotoMaker icon indicating copy to clipboard operation
PhotoMaker copied to clipboard

ValueError: cannot find context for 'fork'

Open monkeycc opened this issue 1 year ago • 2 comments

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'

monkeycc avatar Jan 18 '24 08:01 monkeycc

Please refer to #41

Paper99 avatar Jan 18 '24 08:01 Paper99

this is a hack workaround but you can replace "fork" with "spawn"

ohmygoobness avatar Jan 18 '24 11:01 ohmygoobness