schrum2 commited on
Commit
d57cf30
·
verified ·
1 Parent(s): 2808db2

better error message

Browse files
Files changed (1) hide show
  1. models/pipeline_loader.py +4 -6
models/pipeline_loader.py CHANGED
@@ -18,12 +18,10 @@ def get_pipeline(model_path):
18
  else:
19
  # Assume it's a Hugging Face Hub model ID
20
  # Try to load config to determine if it's text-conditional
21
- try:
22
- config, _ = DiffusionPipeline.load_config(model_path)
23
- has_text_encoder = "text_encoder" in config
24
- except Exception:
25
- print(f"Warning: Could not load config: {e}")
26
- has_text_encoder = False
27
  if has_text_encoder:
28
  # Use the local pipeline file for custom_pipeline
29
  pipe = DiffusionPipeline.from_pretrained(
 
18
  else:
19
  # Assume it's a Hugging Face Hub model ID
20
  # Try to load config to determine if it's text-conditional
21
+ print(model_path)
22
+ config, _ = DiffusionPipeline.load_config(model_path)
23
+ has_text_encoder = "text_encoder" in config
24
+
 
 
25
  if has_text_encoder:
26
  # Use the local pipeline file for custom_pipeline
27
  pipe = DiffusionPipeline.from_pretrained(