Skip to content

Commit

Permalink
safe unload
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed May 4, 2024
1 parent a42b991 commit 6e2a452
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/preprocessor/pulid.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def unload(self) -> bool:
unloaded = False
for p_name in self.preprocessors_deps:
p = Preprocessor.get_preprocessor(p_name)
unloaded = unloaded or p.unload()
if p is not None:
unloaded = unloaded or p.unload()
return unloaded

def __call__(
Expand Down

0 comments on commit 6e2a452

Please sign in to comment.