tgohblio commited on
Commit
0a8acc8
·
1 Parent(s): 35921fc

Fix warning

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -266,12 +266,11 @@ def get_huggingface_safetensors(link) -> dict:
266
  split_link = link.split("/")
267
  if(len(split_link) == 2):
268
  model_card = ModelCard.load(link)
269
- base_model = model_card.data.get("base_model")
270
- print(base_model)
271
 
272
  # Relaxed check to allow Z-Image or Flux or others, assuming user knows what they are doing
273
  # or specifically check for Z-Image-Turbo
274
- if base_model not in ["Tongyi-MAI/Z-Image-Turbo", "black-forest-labs/FLUX.1-dev"]:
275
  # Just a warning instead of error to allow experimentation
276
  print("Warning: Base model might not match.")
277
 
 
266
  split_link = link.split("/")
267
  if(len(split_link) == 2):
268
  model_card = ModelCard.load(link)
269
+ base_model_list = model_card.data.get("base_model")
 
270
 
271
  # Relaxed check to allow Z-Image or Flux or others, assuming user knows what they are doing
272
  # or specifically check for Z-Image-Turbo
273
+ if base_model_list[0] not in ["Tongyi-MAI/Z-Image-Turbo", "black-forest-labs/FLUX.1-dev"]:
274
  # Just a warning instead of error to allow experimentation
275
  print("Warning: Base model might not match.")
276