File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -578,20 +578,20 @@ def visible_settings(self):
578578 return vis_settings
579579
580580 def validate_module (self , pipeline ):
581- """If using custom model, validate the model file opens and works"""
582- from cellpose import models
583- if self . mode . value == "custom" :
584- model_file = self .model_file_name .value
585- model_directory = self .model_directory . get_absolute_path ()
586- model_path = os . path . join ( model_directory , model_file )
587- try :
588- open ( model_path )
589- except :
590- raise ValidationError (
591- "Failed to load custom file: %s " % model_path ,
592- self . model_file_name ,
593- )
594- if self . docker_or_python . value == "Python" :
581+ if self . docker_or_python . value == "Python" :
582+ """If using custom model, validate the model file opens and works"""
583+ from cellpose import models
584+ if self .mode .value == "custom" :
585+ model_file = self .model_file_name . value
586+ model_directory = self . model_directory . get_absolute_path ( )
587+ model_path = os . path . join ( model_directory , model_file )
588+ try :
589+ open ( model_path )
590+ except :
591+ raise ValidationError (
592+ "Failed to load custom file: %s " % model_path ,
593+ self . model_file_name ,
594+ )
595595 try :
596596 model = models .CellposeModel (pretrained_model = model_path , gpu = self .use_gpu .value )
597597 except :
You can’t perform that action at this time.
0 commit comments