bingyic commited on
Commit
4b9c38c
Β·
1 Parent(s): f55b5f1

Revert "Fix extract_features_value_attention and add _get_all_blocks"

Browse files

This reverts commit f55b5f107d6b313b89520b4fc260a34207adc461.

Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -36,15 +36,7 @@ DEFAULT_VARIANT = "TIPS v2 β€” L/14"
36
 
37
  def _device():
38
  return torch.device("cuda" if torch.cuda.is_available() else "cpu")
39
- def _get_all_blocks(model_image):
40
- if hasattr(model_image, "chunked_blocks") and model_image.chunked_blocks:
41
- blocks = []
42
- for chunk in model_image.blocks:
43
- for blk in chunk:
44
- if not isinstance(blk, torch.nn.Identity):
45
- blocks.append(blk)
46
- return blocks
47
- return list(model_image.blocks)
48
 
49
  # ── Pascal Context (59 classes) ─────────────────────────────────────────────
50
 
 
36
 
37
  def _device():
38
  return torch.device("cuda" if torch.cuda.is_available() else "cpu")
39
+
 
 
 
 
 
 
 
 
40
 
41
  # ── Pascal Context (59 classes) ─────────────────────────────────────────────
42