diff --git a/opensora/datasets/parallel.py b/opensora/datasets/parallel.py index 7449343f3..8a687f839 100644 --- a/opensora/datasets/parallel.py +++ b/opensora/datasets/parallel.py @@ -71,7 +71,7 @@ def __call__( return results - except: + except Exception: master_workers_queue.put((worker_index, WorkerStatus.Error, None)) raise diff --git a/opensora/datasets/utils.py b/opensora/datasets/utils.py index e580735e0..79933863e 100644 --- a/opensora/datasets/utils.py +++ b/opensora/datasets/utils.py @@ -23,7 +23,7 @@ import dask.dataframe as dd SUPPORT_DASK = True -except: +except Exception: SUPPORT_DASK = False VID_EXTENSIONS = (".mp4", ".avi", ".mov", ".mkv") diff --git a/opensora/models/mmdit/distributed.py b/opensora/models/mmdit/distributed.py index 9f5288a5a..d6b045d73 100644 --- a/opensora/models/mmdit/distributed.py +++ b/opensora/models/mmdit/distributed.py @@ -24,7 +24,7 @@ _flash_attn_forward as _flash_attn_forward_v3 SUPPORT_FA3 = True -except: +except Exception: SUPPORT_FA3 = False from torch import Tensor diff --git a/opensora/models/mmdit/math.py b/opensora/models/mmdit/math.py index f09cd97a1..9f3fd9fa3 100644 --- a/opensora/models/mmdit/math.py +++ b/opensora/models/mmdit/math.py @@ -9,7 +9,7 @@ from flash_attn_interface import flash_attn_func as flash_attn_func_v3 SUPPORT_FA3 = True -except: +except Exception: SUPPORT_FA3 = False diff --git a/scripts/cnv/shard.py b/scripts/cnv/shard.py index 1162cf95d..660cff996 100644 --- a/scripts/cnv/shard.py +++ b/scripts/cnv/shard.py @@ -7,7 +7,7 @@ import dask.dataframe as dd SUPPORT_DASK = True -except: +except Exception: SUPPORT_DASK = False