diff --git a/imaginairy/vendored/blip/vit.py b/imaginairy/vendored/blip/vit.py index 8aaa34a..3af1e8f 100644 --- a/imaginairy/vendored/blip/vit.py +++ b/imaginairy/vendored/blip/vit.py @@ -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)) diff --git a/requirements-dev.txt b/requirements-dev.txt index c557705..c11221b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -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 diff --git a/setup.py b/setup.py index d0e7ae9..2c0556a 100644 --- a/setup.py +++ b/setup.py @@ -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",