build: remove fairscale dependency (#441)

This commit is contained in:
Bryce Drennan 2024-01-03 21:06:14 -08:00 committed by GitHub
parent 12e4855792
commit 0271bffa38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 8 deletions

View File

@ -12,7 +12,6 @@ from functools import partial
import torch
import torch.nn as nn
from fairscale.nn.checkpoint.checkpoint_activations import checkpoint_wrapper
from timm.models.helpers import adapt_input_conv
from timm.models.layers import DropPath, trunc_normal_
from timm.models.vision_transformer import PatchEmbed
@ -144,8 +143,7 @@ class Block(nn.Module):
)
if use_grad_checkpointing:
self.attn = checkpoint_wrapper(self.attn)
self.mlp = checkpoint_wrapper(self.mlp)
raise RuntimeError("not supported")
def forward(self, x, register_hook=False):
x = x + self.drop_path(self.attn(self.norm1(x), register_hook=register_hook))

View File

@ -45,8 +45,6 @@ exceptiongroup==1.2.0
# pytest
facexlib==0.3.0
# via imaginAIry (setup.py)
fairscale==0.4.13
# via imaginAIry (setup.py)
fastapi==0.108.0
# via imaginAIry (setup.py)
filelock==3.13.1
@ -125,7 +123,6 @@ numpy==1.24.4
# contourpy
# diffusers
# facexlib
# fairscale
# filterpy
# imageio
# imaginAIry (setup.py)
@ -255,7 +252,6 @@ tomli==2.0.1
torch==2.1.2
# via
# facexlib
# fairscale
# imaginAIry (setup.py)
# kornia
# open-clip-torch

View File

@ -79,7 +79,6 @@ setup(
"click-shell>=2.0",
"protobuf != 3.20.2, != 3.19.5",
"facexlib>=0.2.1.1",
"fairscale>=0.4.4", # for vendored blip
"fastapi>=0.70.0",
"ftfy>=6.0.1", # for vendored clip
"torch>=2.1.0",