refacer icon indicating copy to clipboard operation
refacer copied to clipboard

The localhost doesn't work normally.

Open SkywalkerLuke opened this issue 1 year ago • 5 comments

It seems that the localhost is not working, when I set the refacer on the Linux. image

SkywalkerLuke avatar Jul 25 '23 12:07 SkywalkerLuke

image And the shell is like this.

SkywalkerLuke avatar Jul 25 '23 12:07 SkywalkerLuke

Have similar problem on macos. When press "Reface" queue start count, but nothing happened. There are no logs in console, no cpu load. cpu activity Waiting few hours leads to error in webui Screenshot at Jul 30 17-22-20 If press Reface again after error messages in log:

(venv) (base) admin@admins-MBP-2 refacer % python app.py                    
Trying FFMPEG h264_videotoolbox encoder
FFMPEG h264_videotoolbox encoder works
Video codec for FFMPEG: h264_videotoolbox
CPU mode with providers ['CPUExecutionProvider']
inswapper-shape: [1, 3, 128, 128]
Running on local URL:  http://127.0.0.1:7860/

Task exception was never retrieved
future: <Task finished name='j4xebw3ra3d_0' coro=<Queue.process_events() done, defined at /Users/admin/PycharmProjects/refacer/venv/lib/python3.10/site-packages/gradio/queueing.py:343> exception=1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'data': [[{'data': 'data...on_hash': 'j4xebw3ra3d'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.1/v/missing>
Traceback (most recent call last):
  File "/Users/admin/PycharmProjects/refacer/venv/lib/python3.10/site-packages/gradio/queueing.py", line 347, in process_events
    client_awake = await self.gather_event_data(event)
  File "/Users/admin/PycharmProjects/refacer/venv/lib/python3.10/site-packages/gradio/queueing.py", line 220, in gather_event_data
    data, client_awake = await self.get_message(event, timeout=receive_timeout)
  File "/Users/admin/PycharmProjects/refacer/venv/lib/python3.10/site-packages/gradio/queueing.py", line 456, in get_message
    return PredictBody(**data), True
  File "/Users/admin/PycharmProjects/refacer/venv/lib/python3.10/site-packages/pydantic/main.py", line 159, in __init__
    __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'data': [[{'data': 'data...on_hash': 'j4xebw3ra3d'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.1/v/missing

Also tied with COREML, CPU, --max_num_faces 1, --force_cpu, --share_gradio and API example. roop via sd and standalone work on this machine.

Any advice how to find a problem?

Tech specs: MacOS Ventura 13.4 MBP M1 32gb ram

xynta avatar Jul 30 '23 15:07 xynta

Updating the gradio version in the requirements.txt file and re-running pip install -r requirements.txt fixed this issue for me.

gradio==3.36.1

FYI, I'm running in CPU mode on Ubuntu 22 with only the --server-name flag: python3 app.py --server_name 192.168.0.98

mwiater avatar Aug 07 '23 19:08 mwiater

mwiater thank you! It work for me too!

xynta avatar Aug 08 '23 05:08 xynta

It also works for me. However, I wonder whether the authors can update a python root for us to use, not only the localhost.

SkywalkerLuke avatar Aug 09 '23 04:08 SkywalkerLuke