Nymbo commited on
Commit
a8e64d1
·
verified ·
1 Parent(s): 9c4723e

Treat an empty token as anonymous

Browse files
Files changed (1) hide show
  1. convert.py +3 -0
convert.py CHANGED
@@ -81,6 +81,9 @@ def previous_pr(api: "HfApi", model_id: str, pr_title: str) -> Optional["Discuss
81
 
82
  def convert(token: str, model_id: str, filename: str, model_type: str, sample_size: int = 512, scheduler_type: str = "pndm", extract_ema: bool = True, progress=gr.Progress()):
83
  api = HfApi()
 
 
 
84
 
85
  pr_title = "Adding `diffusers` weights of this model"
86
 
 
81
 
82
  def convert(token: str, model_id: str, filename: str, model_type: str, sample_size: int = 512, scheduler_type: str = "pndm", extract_ema: bool = True, progress=gr.Progress()):
83
  api = HfApi()
84
+ token = (token or "").strip() or None
85
+ model_id = (model_id or "").strip()
86
+ filename = (filename or "").strip()
87
 
88
  pr_title = "Adding `diffusers` weights of this model"
89