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

specify commit hash not work #212

Open
1 of 2 tasks
sko00o opened this issue Nov 17, 2024 · 2 comments
Open
1 of 2 tasks

specify commit hash not work #212

sko00o opened this issue Nov 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sko00o
Copy link
Contributor

sko00o commented Nov 17, 2024

Describe the bug

comfy-cli: v1.3.1

I want to install specify version of ComfyUI using following command:

COMFYUI_COMMIT=8a5281006f178f9aa0e8cbd4fc29e2f3c119d2e2
comfy install --version nightly --commit ${COMFYUI_COMMIT}

But I still got the latest commit.

To Reproduce
Steps to reproduce the behavior

cd /tmp
COMFYUI_COMMIT=8a5281006f178f9aa0e8cbd4fc29e2f3c119d2e2
comfy --skip-prompt --here install --cpu --version nightly --commit ${COMFYUI_COMMIT}

# view current commit hash
cd ./ComfyUI && git rev-parse HEAD

Terminal output:

# ... omit install output ...
41886af138939719b86f30bacbafc76a142d89de

Expected behavior

I need --commit option works.

Nice to have

  • Terminal output
  • Screenshots

Additional context
Add any other context about the problem here.

@sko00o sko00o added the bug Something isn't working label Nov 17, 2024
@sko00o
Copy link
Contributor Author

sko00o commented Nov 17, 2024

I think this bug comes from the callback function validate_commit_and_version didn't return value.

def validate_commit_and_version(commit: Optional[str], ctx: typer.Context):
"""
Validate that the commit is not specified unless the version is 'nightly'.
"""
version = ctx.params.get("version")
if commit and version != "nightly":
raise typer.BadParameter("You can only specify the commit if the version is 'nightly'.")

I fixed it and send a PR (#213).

@robinjhuang
Copy link
Member

Thank you @sko00o! Merged and will make a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants