Skip to content

Commit 54157e4

Browse files
committed
modularpipeline.from_pretrained: error out if no config found
1 parent b44e7f5 commit 54157e4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/diffusers/modular_pipelines/modular_pipeline.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,10 @@ def _load_pipeline_config(
16231623
return None, config_dict
16241624

16251625
except EnvironmentError as e:
1626-
logger.debug(f" model_index.json not found in the repo: {e}")
1626+
raise EnvironmentError(
1627+
f"Failed to load config from '{pretrained_model_name_or_path}'. "
1628+
f"Could not find or load 'modular_model_index.json' or 'model_index.json'."
1629+
) from e
16271630

16281631
return None, None
16291632

0 commit comments

Comments
 (0)