manbeast3b commited on
Commit
d69b312
·
verified ·
1 Parent(s): 05f52e8

Update src/loss.py

Browse files
Files changed (1) hide show
  1. src/loss.py +2 -1
src/loss.py CHANGED
@@ -110,7 +110,8 @@ class SchedulerWrapper:
110
  D=sample;E=model_output;A=timestep;
111
  if timestep==0: print("resetting"); image_count+=1;count=0
112
  if True:
113
- C=B.scheduler.step(E,A,D,**F);A=A.tolist(); if timestep+1==len(B.timesteps): torch.save(model_output, f"/home/mbhat/edge-maxxing/miner/miner/latents/latent_{count}.pth")
 
114
  if A not in B.catch_x:B.catch_x[A]=[];B.catch_e[A]=[];B.catch_x_[A]=[]
115
  B.catch_x[A].append(D.clone().detach().cpu());B.catch_e[A].append(E.clone().detach().cpu());B.catch_x_[A].append(C[0].clone().detach().cpu());return C
116
  else:C=B.loss_scheduler.step(E,A,D,**F);return C
 
110
  D=sample;E=model_output;A=timestep;
111
  if timestep==0: print("resetting"); image_count+=1;count=0
112
  if True:
113
+ C=B.scheduler.step(E,A,D,**F);A=A.tolist();
114
+ if timestep+1==len(B.timesteps): torch.save(model_output, f"/home/mbhat/edge-maxxing/miner/miner/latents/latent_{count}.pth")
115
  if A not in B.catch_x:B.catch_x[A]=[];B.catch_e[A]=[];B.catch_x_[A]=[]
116
  B.catch_x[A].append(D.clone().detach().cpu());B.catch_e[A].append(E.clone().detach().cpu());B.catch_x_[A].append(C[0].clone().detach().cpu());return C
117
  else:C=B.loss_scheduler.step(E,A,D,**F);return C