Skip to content

fix: remove torchvision from SIZE_PROHIBITIVE_PACKAGES - #376

Open
Swigler wants to merge 1 commit into
runpod:mainfrom
Swigler:fix/remove-torchvision-from-blacklist
Open

fix: remove torchvision from SIZE_PROHIBITIVE_PACKAGES#376
Swigler wants to merge 1 commit into
runpod:mainfrom
Swigler:fix/remove-torchvision-from-blacklist

Conversation

@Swigler

@Swigler Swigler commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Remove torchvision from the SIZE_PROHIBITIVE_PACKAGES blacklist.

Fixes #353

What was wrong

torchvision was unconditionally excluded from dependency installation because it was assumed to be:

  1. Present in GPU base images — it is not (only torch is)
  2. 50 MB — it is 7.3 MB now

When a user explicitly requests dependencies=["torchvision"], Flash silently strips it. The deploy succeeds, but the app crashes at runtime with ImportError: No module named torchvision.

What changed

One line removed from the SIZE_PROHIBITIVE_PACKAGES frozenset in build.py. torch (500 MB), torchaudio (30 MB), and triton (150 MB) remain blacklisted as they are genuinely large and present in base images.

Test plan

  • Verified torchvision is not in RunPod GPU base images (confirmed by issue reporter)
  • Current wheel size is 7.3 MB (well below the threshold for size-based exclusion)

torchvision is not present in GPU base images (only torch is), so
excluding it causes silent ImportError at runtime when users explicitly
request it via dependencies=["torchvision"]. The package is also only
7.3 MB now, not the 50 MB cited in the comment.

Closes runpod#353
@Swigler
Swigler force-pushed the fix/remove-torchvision-from-blacklist branch from b26a2a5 to e1e2fd7 Compare September 3, 2026 17:56
@Swigler

Swigler commented Sep 3, 2026

Copy link
Copy Markdown
Author

Ping — small fix, torchvision is flagged as prohibitive but it's a legitimate dependency for vision workloads. Ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SIZE_PROHIBITIVE_PACKAGES unconditionally strips torchvision, but it's neither present on all GPU base images nor actually large

1 participant