본문 바로가기
잡담/WebUI(stable-diffusion)

WebUI Extensions 업데이트 안되는 경우 해결방법

by flatsun 2023. 3. 6.
반응형

WebUI에서 Extensions 메뉴로 들어와

Check for updates를 누르고 업데이트 적용 시

 

WARNING:  Invalid HTTP request received.
Exception in callback _ProactorReadPipeTransport._loop_reading(<_OverlappedF...ed result=677>)
handle: <Handle _ProactorReadPipeTransport._loop_reading(<_OverlappedF...ed result=677>)>
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 188, in handle_events
    event = self.conn.next_event()
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 443, in next_event
    exc._reraise_as_remote_protocol_error()
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_util.py", line 76, in _reraise_as_remote_protocol_error
    raise self
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 425, in next_event
    event = self._extract_next_receive_event()
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 367, in _extract_next_receive_event
    event = self._reader(self._receive_buffer)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_readers.py", line 203, in expect_nothing
    raise LocalProtocolError("Got data when expecting EOF")
h11._util.RemoteProtocolError: Got data when expecting EOF

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 249, in _fire_event_triggered_transitions
    new_state = EVENT_TRIGGERED_TRANSITIONS[role][state][event_type]
KeyError: <class 'h11._events.Response'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Spore\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\Spore\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 320, in _loop_reading
    self._data_received(data, length)
  File "C:\Users\Spore\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 270, in _data_received
    self._protocol.data_received(data)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 183, in data_received
    self.handle_events()
  File "D:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 192, in handle_events
    self.send_400_response(msg)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 301, in send_400_response
    output = self.conn.send(event)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 468, in send
    data_list = self.send_with_data_passthrough(event)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 493, in send_with_data_passthrough
    self._process_event(self.our_role, event)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 242, in _process_event
    self._cstate.process_event(role, type(event), server_switch_event)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 238, in process_event
    self._fire_event_triggered_transitions(role, event_type)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 251, in _fire_event_triggered_transitions
    raise LocalProtocolError(
h11._util.LocalProtocolError: can't handle event type Response when role=SERVER and state=CLOSED
Closing server running on port: 7860
Restarting UI...
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\launch.py", line 361, in <module>
    start()
  File "D:\stable-diffusion-webui\launch.py", line 356, in start
    webui.webui()
  File "D:\stable-diffusion-webui\webui.py", line 205, in webui
    shared.demo = modules.ui.create_ui()
  File "D:\stable-diffusion-webui\modules\ui.py", line 458, in create_ui
    modules.scripts.scripts_txt2img.initialize_scripts(is_img2img=False)
  File "D:\stable-diffusion-webui\modules\scripts.py", line 270, in initialize_scripts
    script = script_class()
  File "D:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 189, in __init__
    "clip_vision": clip,
NameError: name 'clip' is not defined

 

이런 에러가 생긴 것이 보이는데

git 3.1.30 API 변경으로 인해 생긴 문제다

 

해결방법은 

D:\stable-diffusion-webui\modules

위 경로로 이동한 뒤

extensions.py 파일을 열어준 후

 

for fetch in repo.remote().fetch("--dry-run"): 
> for fetch in repo.remote().fetch(dry_run=True):

repo.git.fetch('--all')        
repo.git.reset('--hard', 'origin')
> repo.git.fetch(all=True)        
> repo.git.reset('origin', hard=True)

 

파일 안에서 CTRL + F로 밑줄 그은 텍스트를 찾은 뒤

강조 표시한 텍스트로 바꿔준 뒤

저장하고 WebUI를 다시 실행해주면

정상적으로 extension 업데이트가 가능하다

반응형

댓글