John6666 commited on
Commit
26a5ac0
1 Parent(s): e164e63

Upload 2 files

Browse files
Files changed (2) hide show
  1. flux.py +2 -2
  2. modutils.py +2 -2
flux.py CHANGED
@@ -43,8 +43,8 @@ def download_things(directory, url, hf_token="", civitai_api_key=""):
43
  if "?" in url:
44
  url = url.split("?")[0]
45
  if civitai_api_key:
46
- user_header = f'"Authorization: Bearer {civitai_api_key}"'
47
- os.system(f"aria2c --console-log-level=error --summary-interval=10 --header={user_header} -c -x 16 -k 1M -s 16 -d {directory} {url}")
48
  else:
49
  print("\033[91mYou need an API key to download Civitai models.\033[0m")
50
  else:
 
43
  if "?" in url:
44
  url = url.split("?")[0]
45
  if civitai_api_key:
46
+ url = url + f"?token={civitai_api_key}"
47
+ os.system(f"aria2c --console-log-level=error --summary-interval=10 -c -x 16 -k 1M -s 16 -d {directory} {url}")
48
  else:
49
  print("\033[91mYou need an API key to download Civitai models.\033[0m")
50
  else:
modutils.py CHANGED
@@ -82,8 +82,8 @@ def download_things(directory, url, hf_token="", civitai_api_key=""):
82
  if "?" in url:
83
  url = url.split("?")[0]
84
  if civitai_api_key:
85
- user_header = f'"Authorization: Bearer {civitai_api_key}"'
86
- os.system(f"aria2c --console-log-level=error --summary-interval=10 --header={user_header} -c -x 16 -k 1M -s 16 -d {directory} {url}")
87
  else:
88
  print("\033[91mYou need an API key to download Civitai models.\033[0m")
89
  else:
 
82
  if "?" in url:
83
  url = url.split("?")[0]
84
  if civitai_api_key:
85
+ url = url + f"?token={civitai_api_key}"
86
+ os.system(f"aria2c --console-log-level=error --summary-interval=10 -c -x 16 -k 1M -s 16 -d {directory} {url}")
87
  else:
88
  print("\033[91mYou need an API key to download Civitai models.\033[0m")
89
  else: