Git Product home page Git Product logo

Comments (7)

tiiime avatar tiiime commented on August 23, 2024 3

Maybe it is a quite stupid question but... How did you cut down to the models you want? Which part of the code needs to be modified?

Comment out some field in self and elements in self.tools array.

https://github.com/K-tang-mkv/visual-chatgpt-googlecolab/blob/main/visual_chatgpt.py#L804

from taskmatrix.

 avatar commented on August 23, 2024 2

Had the same issue, I also have a 10GB card and this is exactly what I needed to do. I had to spend hours making this work on Windows, it's a shame we've had to reduce this to such little functionality.

from taskmatrix.

powderblock avatar powderblock commented on August 23, 2024 1

image
Found this table ... Seems promising.

from taskmatrix.

powderblock avatar powderblock commented on August 23, 2024

I tried cutting down on the self.tools in an effort to save GPU memory but no luck.

Even with the self.tools look so slim:

class ConversationBot:
    def __init__(self):
        print("Initializing VisualChatGPT")
        self.llm = OpenAI(temperature=0)
        self.edit = ImageEditing(device="cuda:0")
        self.t2i = T2I(device="cuda:0")
        self.BLIPVQA = BLIPVQA(device="cuda:0")
        self.pix2pix = Pix2Pix(device="cuda:0")
        self.memory = ConversationBufferMemory(memory_key="chat_history", output_key='output')
        self.tools = [
            Tool(name="Generate Image From User Input Text", func=self.t2i.inference,
                 description="useful when you want to generate an image from a user input text and save it to a file. like: generate an image of an object or something, or generate an image that includes some objects. "
                             "The input to this tool should be a string, representing the text used to generate image. "),
            Tool(name="Remove Something From The Photo", func=self.edit.remove_part_of_image,
                 description="useful when you want to remove and object or something from the photo from its description or location. "
                             "The input to this tool should be a comma seperated string of two, representing the image_path and the object need to be removed. "),
            Tool(name="Replace Something From The Photo", func=self.edit.replace_part_of_image,
                 description="useful when you want to replace an object from the object description or location with another object from its description. "
                             "The input to this tool should be a comma seperated string of three, representing the image_path, the object to be replaced, the object to be replaced with "),

            Tool(name="Instruct Image Using Text", func=self.pix2pix.inference,
                 description="useful when you want to the style of the image to be like the text. like: make it look like a painting. or make it like a robot. "
                             "The input to this tool should be a comma seperated string of two, representing the image_path and the text. "),
            Tool(name="Answer Question About The Image", func=self.BLIPVQA.get_answer_from_question_and_image,
                 description="useful when you need an answer for a question based on an image. like: what is the background color of the last image, how many cats in this figure, what is in this figure. "
                             "The input to this tool should be a comma seperated string of two, representing the image_path and the question")]

Got the same error! You guys got super computers or what! Haha

from taskmatrix.

powderblock avatar powderblock commented on August 23, 2024

Fixed by cutting down the models to only 2 models (T2I and Pix2Pix where the total MB is less than 10 GB aka my GPU memory)

from taskmatrix.

videscar avatar videscar commented on August 23, 2024

Maybe it is a quite stupid question but... How did you cut down to the models you want? Which part of the code needs to be modified?

from taskmatrix.

videscar avatar videscar commented on August 23, 2024

Maybe it is a quite stupid question but... How did you cut down to the models you want? Which part of the code needs to be modified?

Comment out some field in self and elements in self.tools array.

https://github.com/K-tang-mkv/visual-chatgpt-googlecolab/blob/main/visual_chatgpt.py#L804

Perfect! Thanks!

from taskmatrix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.