Skip to content

Commit

Permalink
remove fairscale requirement, add fake fairscale to make BLIP not com…
Browse files Browse the repository at this point in the history
…plain about it
  • Loading branch information
AUTOMATIC1111 committed Jan 24, 2023
1 parent dac4529 commit 2818998
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
11 changes: 9 additions & 2 deletions modules/interrogate.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,16 @@ def categories(self):

return self.loaded_categories

def create_fake_fairscale(self):
class FakeFairscale:
def checkpoint_wrapper(self):
pass

sys.modules["fairscale.nn.checkpoint.checkpoint_activations"] = FakeFairscale

def load_blip_model(self):
with paths.Prioritize("BLIP"):
import models.blip
create_fake_fairscale()
import models.blip

files = modelloader.load_models(
model_path=os.path.join(paths.models_path, "BLIP"),
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
blendmodes
accelerate
basicsr
fairscale==0.4.4
fonts
font-roboto
gfpgan
Expand Down
1 change: 0 additions & 1 deletion requirements_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ scikit-image==0.19.2
fonts
font-roboto
timm==0.6.7
fairscale==0.4.9
piexif==1.1.3
einops==0.4.1
jsonmerge==1.8.0
Expand Down

0 comments on commit 2818998

Please sign in to comment.