sayakpaul HF staff commited on
Commit
33871e9
1 Parent(s): 1fd2466

don't do anything in case nothing is provided.

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -28,6 +28,9 @@ def run(hf_token, text_encoder_weights, unet_weights, repo_prefix):
28
  if unet_weights == "":
29
  unet_weights = None
30
 
 
 
 
31
  pipeline = run_conversion(text_encoder_weights, unet_weights)
32
  output_path = "kerascv_sd_diffusers_pipeline"
33
  pipeline.save_pretrained(output_path)
 
28
  if unet_weights == "":
29
  unet_weights = None
30
 
31
+ if text_encoder_weights is None and unet_weights is None:
32
+ return "❌ No fine-tuned weights provided, nothing to do."
33
+
34
  pipeline = run_conversion(text_encoder_weights, unet_weights)
35
  output_path = "kerascv_sd_diffusers_pipeline"
36
  pipeline.save_pretrained(output_path)