Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with cloning CLIP repository #16614

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

vishwamartur
Copy link

Related to #9774

Add network connectivity check and retry mechanism for git_clone function.

  • launch.py

    • Add a check for network connectivity before attempting to clone the repository.
    • Print a message and exit if the network connectivity check fails.
  • modules/launch_utils.py

    • Update the git_clone function to include a retry mechanism with a default of 3 retries.
    • Print a message and retry the clone operation if it fails, up to the specified number of retries.
    • Clean up the directory before retrying the clone operation.

Related to AUTOMATIC1111#9774

Add network connectivity check and retry mechanism for `git_clone` function.

* **launch.py**
  - Add a check for network connectivity before attempting to clone the repository.
  - Print a message and exit if the network connectivity check fails.

* **modules/launch_utils.py**
  - Update the `git_clone` function to include a retry mechanism with a default of 3 retries.
  - Print a message and retry the clone operation if it fails, up to the specified number of retries.
  - Clean up the directory before retrying the clone operation.
@w-e-w w-e-w changed the base branch from master to dev October 31, 2024 11:42
Copy link
Collaborator

@w-e-w w-e-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should meke sure your line endings setting match what the repos uses so that it doesn't mark every line being modified


read https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Contributing
don't know why you deleted the PR checklist template

PR has to be based on and target dev branch, not master

Sorry, something went wrong.


with launch_utils.startup_timer.subcategory("prepare environment"):
if not args.skip_prepare_environment:
if check_network_connectivity():
Copy link
Collaborator

@w-e-w w-e-w Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will not work

your change will prevent WebUI from launching if a user is disconnected from the internet or not able to reach GitHub for whatever reason
WebUI should be able to launch without a connection after it's installed and assets are downloaded

providing better more understandable error for git clone message makes more sense then adding a check_network_connectivity test

also you added some instructions on a user may set up a proxy
pretty much the only reason one would use a github proxy / morrir is because for whatever reason GitHub is unusable
but check_network_connectivity test you added will now work with proxy
preventing webui from launching

best that webui don't not make any unnecessary connections to any external servers including GitHub

@w-e-w w-e-w marked this pull request as draft October 31, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants