alexnasa commited on
Commit
1fe35e7
·
verified ·
1 Parent(s): 34a346a

Update pipelines/pipeline_seesr.py

Browse files
Files changed (1) hide show
  1. pipelines/pipeline_seesr.py +2 -1
pipelines/pipeline_seesr.py CHANGED
@@ -836,6 +836,7 @@ class StableDiffusionControlNetPipeline(DiffusionPipeline, TextualInversionLoade
836
  gamma_0: Optional[float] = 0.1, # base steering strength
837
  use_KDS = True,
838
  bandwidth = 0.1,
 
839
  args=None,
840
  ):
841
  r"""
@@ -1235,7 +1236,7 @@ class StableDiffusionControlNetPipeline(DiffusionPipeline, TextualInversionLoade
1235
  x0_uncond, x0_cond = x0_pred.chunk(2, dim=0) # each [N, C, H, W]
1236
 
1237
  # 3) Apply KDE steering *only* on the conditional batch
1238
- m_shift_cond = kde_grad(x0_cond, bandwidth=bandwidth) # [N, C, H, W]
1239
  delta_t = gamma_0 * (1 - i / (len(timesteps) - 1))
1240
  x0_cond_steer = x0_cond + delta_t * m_shift_cond # steered conditional
1241
 
 
836
  gamma_0: Optional[float] = 0.1, # base steering strength
837
  use_KDS = True,
838
  bandwidth = 0.1,
839
+ patch_size = 16,
840
  args=None,
841
  ):
842
  r"""
 
1236
  x0_uncond, x0_cond = x0_pred.chunk(2, dim=0) # each [N, C, H, W]
1237
 
1238
  # 3) Apply KDE steering *only* on the conditional batch
1239
+ m_shift_cond = kde_grad(x0_cond, patch_size=patch_size, bandwidth=bandwidth) # [N, C, H, W]
1240
  delta_t = gamma_0 * (1 - i / (len(timesteps) - 1))
1241
  x0_cond_steer = x0_cond + delta_t * m_shift_cond # steered conditional
1242