Stable Diffusion 우분투 실행

Hyun Lee·2024년 1월 24일

블로그 참고: https://velog.io/@2gunsu/Ubuntu-Stable-Diffusion-WebUI-설치하기

sudo apt install wget git python3 python3-venv libgl1 libglib2.0-0

cd ant/diffusion
wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh

# 실행
bash webui.sh -f

# 임의의 포트를 변경
bash webui.sh -f --port [원하는 포트 번호]
  • TimeoutError: The read operation timed out 또는 HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
    ⇒ 파일 stable-diffusion-webui/modules/launch_utils.py 에 있는 두 개의 함수 코드를 수정해줘야 합니다.
    1. 함수 run_pip
        return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}',
        desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
    위의 코드를 아래 코드로 수정해주세요.
    
        	return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line} --timeout 5000',
        desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
    2. 함수 `prepare_environment`
        if args.reinstall_torch or not is_installed("torch") or not is_installed("torchvision"):
            run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
            startup_timer.record("install torch")
	 위의 코드를 아래 코드로 수정해주세요.
    
        if args.reinstall_torch or not is_installed("torch") or not is_installed("torchvision"):
            run(f'"{python}" -m {torch_command} --timeout 5000', "Installing torch and torchvision", "Couldn't install torch", live=True)
            startup_timer.record("install torch")
profile
01년생 석사~ing | Computer Science. HCI. AI. Design.

0개의 댓글