sciencellama commited on
Commit
72f8b67
·
verified ·
1 Parent(s): 25244e9

Remove Space-side median from normal output (kept for depth) — user wants raw normals, client-side filter if needed

Browse files
Files changed (1) hide show
  1. infer.py +6 -3
infer.py CHANGED
@@ -258,9 +258,12 @@ def process_single_image(image_path, pipeline, task_name, device,
258
  process_res=process_res,
259
  ).images[0]
260
 
261
- # Strip the FLUX-VAE 16-px patch-grid 'weave' BEFORE the depth/normal split.
262
- # ksize=11 for normals (smaller than depth's 15 to keep edges crisp).
263
- prediction = np.clip(degrid_median(prediction, ksize=11), 0.0, 1.0).astype(np.float32)
 
 
 
264
 
265
  if task_name == "depth":
266
  output_npy = prediction.mean(axis=-1)
 
258
  process_res=process_res,
259
  ).images[0]
260
 
261
+ # NO Space-side median filter on normals per user decision, normals are
262
+ # returned RAW from the model so any filtering can be tuned client-side
263
+ # (the FLUX 16-px grid is present but normals encode orientation everywhere,
264
+ # so over-filtering softens real edges; better to control it downstream).
265
+ # degrid_median() function is kept in this file in case re-enabling is wanted.
266
+ prediction = np.clip(prediction, 0.0, 1.0).astype(np.float32)
267
 
268
  if task_name == "depth":
269
  output_npy = prediction.mean(axis=-1)