Skip to content

Commit

Permalink
Run additiona commands related to model and nodes in integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 committed Jul 9, 2024
1 parent 4909939 commit 0d29e0f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
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"
else:
return "https://api.comfy.org"

Expand Down

0 comments on commit 0d29e0f

Please sign in to comment.