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: model download fails when server defaults to gzip #242

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
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
3 changes: 3 additions & 0 deletions comfy_cli/command/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@
)
print(f"Model downloaded successfully to: {output_path}")
else:
headers = {

Check warning on line 308 in comfy_cli/command/models/models.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/models/models.py#L308

Added line #L308 was not covered by tests
"Accept-Encoding": "identity", # Prevent gzip and chunking. Chunking breaks Content-Length, which is needed for progress bars in download_file. Also, gzip is slower.
}
print(f"Start downloading URL: {url} into {local_filepath}")
download_file(url, local_filepath, headers)

Expand Down
Loading