Check if a string can be converted to int.
(s)
| 129 | except ValueError: |
| 130 | return False |
| 131 | def is_int(s): |
| 132 | """Check if a string can be converted to int.""" |
| 133 | try: |
| 134 | int(s) |
| 135 | return True |
| 136 | except ValueError: |
| 137 | return False |
| 138 | |
| 139 | |
| 140 | # The scheduler list mapping was taken from here: https://github.com/neggles/animatediff-cli/blob/6f336f5f4b5e38e85d7f06f1744ef42d0a45f2a7/src/animatediff/schedulers.py#L39 |