realantonvoronov commited on
Commit
fc4c596
1 Parent(s): b925a10

disable early cfg

Browse files
Files changed (1) hide show
  1. models/pipeline.py +3 -2
models/pipeline.py CHANGED
@@ -157,7 +157,7 @@ class SwittiPipeline:
157
  else:
158
  freqs_cis = switti.freqs_cis
159
 
160
- if si < turn_on_cfg_start_si or si >= turn_off_cfg_start_si:
161
  apply_smooth = False
162
  x_BLC = x_BLC[:B]
163
  context = context[:B]
@@ -192,7 +192,8 @@ class SwittiPipeline:
192
 
193
  # Guidance
194
  if si < turn_on_cfg_start_si:
195
- t = 0 # no guidance
 
196
  elif si >= turn_on_cfg_start_si and si < turn_off_cfg_start_si:
197
  # default const cfg
198
  t = cfg
 
157
  else:
158
  freqs_cis = switti.freqs_cis
159
 
160
+ if si >= turn_off_cfg_start_si:
161
  apply_smooth = False
162
  x_BLC = x_BLC[:B]
163
  context = context[:B]
 
192
 
193
  # Guidance
194
  if si < turn_on_cfg_start_si:
195
+ # t = 0, i. e. no guidance
196
+ logits_BlV = logits_BlV[:B]
197
  elif si >= turn_on_cfg_start_si and si < turn_off_cfg_start_si:
198
  # default const cfg
199
  t = cfg