Ricercar commited on
Commit
7585f70
·
1 Parent(s): 40f8240

bug fix for default prompt

Browse files
Files changed (1) hide show
  1. pages/Gallery.py +1 -1
pages/Gallery.py CHANGED
@@ -309,7 +309,7 @@ class GalleryApp:
309
  prompts = np.sort(items['prompt'].unique())[::1].tolist()
310
 
311
  # selt focus prompt index if exists
312
- if st.session_state.gallery_focus['prompt'] is None:
313
  prompt_focus_idx = 0
314
  else:
315
  prompt_focus_idx = 1 + prompts.index(st.session_state.gallery_focus['prompt'])
 
309
  prompts = np.sort(items['prompt'].unique())[::1].tolist()
310
 
311
  # selt focus prompt index if exists
312
+ if st.session_state.gallery_focus['prompt'] is None or tag != st.session_state.gallery_focus['tag']:
313
  prompt_focus_idx = 0
314
  else:
315
  prompt_focus_idx = 1 + prompts.index(st.session_state.gallery_focus['prompt'])