camenduru / stable-diffusion-webui-colab

stable diffusion webui colab
The Unlicense
15.58k stars 2.61k forks source link

[Bug]: Your local changes to the following files would be overwritten by checkout #365

Closed chuanSir123 closed 1 year ago

chuanSir123 commented 1 year ago

What happened?

excuse me,When I use colab to mount and start, there is an error that causes the startup to fail.

Colab cell output

Python 3.9.16 (main, Dec  7 2022, 01:11:51) 
[GCC 9.4.0]
Commit hash: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
Fetching updates for K-diffusion...
Checking out commit for K-diffusion with hash: 5b3af030dd83e0297272d861c19477735d0317ec...
Traceback (most recent call last):
  File "/content/drive/MyDrive/share/0417001/stable-diffusion-webui/launch.py", line 380, in <module>
    prepare_environment()
  File "/content/drive/MyDrive/share/0417001/stable-diffusion-webui/launch.py", line 317, in prepare_environment
    git_clone(k_diffusion_repo, repo_dir('k-diffusion'), "K-diffusion", k_diffusion_commit_hash)
  File "/content/drive/MyDrive/share/0417001/stable-diffusion-webui/launch.py", line 164, in git_clone
    run(f'"{git}" -C "{dir}" checkout {commithash}', f"Checking out commit for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}")
  File "/content/drive/MyDrive/share/0417001/stable-diffusion-webui/launch.py", line 113, in run
    raise RuntimeError(message)
RuntimeError: Couldn't checkout commit 5b3af030dd83e0297272d861c19477735d0317ec for K-diffusion.
Command: "git" -C "/content/drive/MyDrive/share/0417001/stable-diffusion-webui/repositories/k-diffusion" checkout 5b3af030dd83e0297272d861c19477735d0317ec
Error code: 1
stdout: <empty>
stderr: error: Your local changes to the following files would be overwritten by checkout:
    train.py
Please commit your changes or stash them before you switch branches.
Aborting

Which colab and model(s) were you using when the error occurred?

https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/main/stable/stable_diffusion_1_5_webui_colab.ipynb

Which Public WebUI Colab URL were you using when the error occurred?

remote.moe

If you used HiRes mode when the error occurred, please provide the Hires info

No response

chuanSir123 commented 1 year ago

sorry,When I use Google Drive to mount the startup, there is an error that causes the startup to fail

camenduru commented 1 year ago

Hi @chuanSir123 👋 please delete this folder stable-diffusion-webui\repositories\k-diffusion then use install colab maybe works and check do you have enough free space in your Google Drive

chuanSir123 commented 1 year ago

Tried everything you said, still doesn't work. Finally, I directly removed this line of error reporting code, and now it is running. What is the impact of deleting this line?