Skip to content

Commit

Permalink
clean up unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
kyegomez committed Nov 7, 2023
1 parent bb496f4 commit 7a5e82b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "swarms"
version = "2.0.3"
version = "2.0.4"
description = "Swarms - Pytorch"
license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"]
Expand Down
13 changes: 6 additions & 7 deletions swarms/tools/mm_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
)

from swarms.prompts.prebuild.multi_modal_prompts import IMAGE_PROMPT
from swarms.tools.base import tool
from swarms.tools.main import BaseToolSet
from swarms.tools.tool import tool
from swarms.utils.logger import logger
from swarms.utils.main import BaseHandler, get_new_image_name


class MaskFormer(BaseToolSet):
class MaskFormer:
def __init__(self, device):
print("Initializing MaskFormer to %s" % device)
self.device = device
Expand Down Expand Up @@ -61,7 +60,7 @@ def inference(self, image_path, text):
return image_mask.resize(original_image.size)


class ImageEditing(BaseToolSet):
class ImageEditing:
def __init__(self, device):
print("Initializing ImageEditing to %s" % device)
self.device = device
Expand Down Expand Up @@ -116,7 +115,7 @@ def inference_replace(self, inputs):
return updated_image_path


class InstructPix2Pix(BaseToolSet):
class InstructPix2Pix:
def __init__(self, device):
print("Initializing InstructPix2Pix to %s" % device)
self.device = device
Expand Down Expand Up @@ -156,7 +155,7 @@ def inference(self, inputs):
return updated_image_path


class Text2Image(BaseToolSet):
class Text2Image:
def __init__(self, device):
print("Initializing Text2Image to %s" % device)
self.device = device
Expand Down Expand Up @@ -190,7 +189,7 @@ def inference(self, text):
return image_filename


class VisualQuestionAnswering(BaseToolSet):
class VisualQuestionAnswering:
def __init__(self, device):
print("Initializing VisualQuestionAnswering to %s" % device)
self.torch_dtype = torch.float16 if "cuda" in device else torch.float32
Expand Down

0 comments on commit 7a5e82b

Please sign in to comment.