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

Run additional commands related to model and nodes in integration test #105

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ jobs:
comfy --skip-prompt --no-enable-telemetry env
comfy --skip-prompt install --cpu
comfy launch --background -- --cpu
comfy model download --url https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/mm_sd_v14.ckpt?download=true --relative-path models/animatediff_models --filename animatediff_models
comfy node install ComfyUI-AnimateDiff-Evolved
comfy node update ComfyUI-AnimateDiff-Evolved
comfy node uninstall ComfyUI-AnimateDiff-Evolved

17 changes: 13 additions & 4 deletions comfy_cli/command/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
workspace_manager = WorkspaceManager()
config_manager = ConfigManager()


model_path_map = {
"lora": "loras",
"hypernetwork": "hypernetworks",
Expand Down Expand Up @@ -147,6 +146,13 @@ def download(
show_default=True,
),
] = None,
filename: Annotated[
Optional[str],
typer.Option(
help="The filename to save the model.",
show_default=True,
),
] = None,
set_civitai_api_token: Annotated[
Optional[str],
typer.Option(
Expand Down Expand Up @@ -230,9 +236,12 @@ def download(
else:
print("Model source is unknown")

local_filename = ui.prompt_input(
"Enter filename to save model as", default=local_filename
)
if filename is None:
local_filename = ui.prompt_input(
"Enter filename to save model as", default=local_filename
)
else:
local_filename = filename

if relative_path is None:
relative_path = DEFAULT_COMFY_MODEL_PATH
Expand Down
4 changes: 4 additions & 0 deletions comfy_cli/registry/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def __init__(self):
def determine_base_url(self):
if os.getenv("ENVIRONMENT") == "dev":
return "http://localhost:8080"
elif os.getenv("ENVIRONMENT") == "staging":
# print environment variable
print(os.getenv("ENVIRONMENT"))
return "https://staging-comfy-backend-qod3oz2v2q-uc.a.run.app"
Copy link
Member

Choose a reason for hiding this comment

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

https://stagingapi.comfy.org works

else:
return "https://api.comfy.org"

Expand Down
Loading