Skip to content

Commit 23dc6c7

Browse files
authored
fix indexing (black-forest-labs#113)
1 parent 33a24ac commit 23dc6c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

demo_st.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def main(
125125
os.makedirs(output_dir)
126126
idx = 0
127127
else:
128-
fns = [fn for fn in iglob(output_name.format(idx="*")) if re.search(r"img_[0-9]\.jpg$", fn)]
128+
fns = [fn for fn in iglob(output_name.format(idx="*")) if re.search(r"img_[0-9]+\.jpg$", fn)]
129129
if len(fns) > 0:
130130
idx = max(int(fn.split("_")[-1].split(".")[0]) for fn in fns) + 1
131131
else:

src/flux/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def main(
148148
os.makedirs(output_dir)
149149
idx = 0
150150
else:
151-
fns = [fn for fn in iglob(output_name.format(idx="*")) if re.search(r"img_[0-9]\.jpg$", fn)]
151+
fns = [fn for fn in iglob(output_name.format(idx="*")) if re.search(r"img_[0-9]+\.jpg$", fn)]
152152
if len(fns) > 0:
153153
idx = max(int(fn.split("_")[-1].split(".")[0]) for fn in fns) + 1
154154
else:

0 commit comments

Comments
 (0)