mirror of
https://github.com/sd-webui/stable-diffusion-webui.git
synced 2024-12-14 23:02:00 +03:00
fix: division by zero, inefficient preview check (#1230)
This commit is contained in:
parent
68118fe0f4
commit
3705f296c6
@ -817,7 +817,10 @@ def generation_callback(img, i=0):
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
if i % int(st.session_state.update_preview_frequency) == 0 and st.session_state.update_preview and i > 0:
|
||||
if st.session_state.update_preview and\
|
||||
int(st.session_state.update_preview_frequency) > 0 and\
|
||||
i % int(st.session_state.update_preview_frequency) == 0 and\
|
||||
i > 0:
|
||||
#print (img)
|
||||
#print (type(img))
|
||||
# The following lines will convert the tensor we got on img to an actual image we can render on the UI.
|
||||
|
Loading…
Reference in New Issue
Block a user