mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 06:23:20 -07:00
fix: flask preview line height should scale with zoom
This commit is contained in:
parent
0aae99e808
commit
2a55ecb42d
2 changed files with 3 additions and 6 deletions
|
@ -308,9 +308,7 @@ def create_preview_pane_image(previews, selected_preview, loss_history,
|
|||
else:
|
||||
loss_history_to_show = loss_history[-show_last_history_iters_count:]
|
||||
lh_height = int(100 * zoom.scale)
|
||||
# FIXME: investigate old behavior (batch_size, lh_height)
|
||||
# lh_img = models.ModelBase.get_loss_history_preview(loss_history_to_show, iteration, batch_size, w, c, lh_height)
|
||||
lh_img = models.ModelBase.get_loss_history_preview(loss_history_to_show, iteration, w, c)
|
||||
lh_img = models.ModelBase.get_loss_history_preview(loss_history_to_show, iteration, w, c, lh_height)
|
||||
final = np.concatenate([final, lh_img], axis=0)
|
||||
|
||||
final = np.concatenate([final, selected_preview_rgb], axis=0)
|
||||
|
|
|
@ -574,10 +574,9 @@ class ModelBase(object):
|
|||
return summary_text
|
||||
|
||||
@staticmethod
|
||||
def get_loss_history_preview(loss_history, iter, w, c):
|
||||
def get_loss_history_preview(loss_history, iter, w, c, lh_height=100):
|
||||
loss_history = np.array (loss_history.copy())
|
||||
|
||||
lh_height = 100
|
||||
lh_img = np.ones ( (lh_height,w,c) ) * 0.1
|
||||
|
||||
if len(loss_history) != 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue