Spaces:
Build error
Build error
don't do anything in case nothing is provided.
Browse files
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)
|