GithubHelp home page GithubHelp logo

hangover3832 / comfyui-hangover-nodes Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 9.0 9.67 MB

Various nodes for ComfyUI

Home Page: https://github.com/Hangover3832/ComfyUI-Hangover-Nodes

License: MIT License

Python 100.00%
comfyui image2text kosmos-2 stable-diffusion

comfyui-hangover-nodes's People

Contributors

hangover3832 avatar wfjsw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

comfyui-hangover-nodes's Issues

Bbox list output

kosmos2 can output bboxes to corresponding keywords that were recognized in the input image, could be useful in ComfyUI.

Feel free to contribute.

issue: config fail

After installation, the following error occurs upon the first launch.

Traceback (most recent call last):
  File "/mnt/teratera/git/ComfyUI/nodes.py", line 1810, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/mnt/teratera/git/ComfyUI/custom_nodes/ComfyUI-Hangover-Nodes/__init__.py", line 1, in <module>
    from .ms_kosmos2 import NODE_CLASS_MAPPINGS
  File "/mnt/teratera/git/ComfyUI/custom_nodes/ComfyUI-Hangover-Nodes/ms_kosmos2.py", line 17, in <module>
    model = AutoModelForVision2Seq.from_pretrained("microsoft/kosmos-2-patch14-224")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/teratera/venv/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 434, in from_pretrained
    config, kwargs = AutoConfig.from_pretrained(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/teratera/venv/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 873, in from_pretrained
    config_class = CONFIG_MAPPING[config_dict["model_type"]]
                   ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/teratera/venv/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 579, in __getitem__
    raise KeyError(key)
KeyError: 'kosmos-2'

Cannot import /mnt/teratera/git/ComfyUI/custom_nodes/ComfyUI-Hangover-Nodes module for custom nodes: 'kosmos-2'

Hi

Error occurred when executing MS kosmos-2 Interrogator:

'MsKosmos2' object has no attribute 'processor'

ImportError:

ImportError: cannot import name 'Kosmos2Config' from 'transformers' (A:\uAI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers_init_.py)

Cannot import A:\uAI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Hangover-Nodes module for custom nodes: cannot import name 'Kosmos2Config' from 'transformers' (A:\uAI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers_init_.py)

'MsKosmos2' object has no attribute 'model'

I really wanted to try this out, but I couldn't get it running. I'm missing the model, and it's not downloading automatically. If I downloaded itmanually, where should I put it?

Error occurred when executing MS kosmos-2 Interrogator:

'MsKosmos2' object has no attribute 'model'

File "***ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "***ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "***ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "***ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Hangover-Nodes\ms_kosmos2.py", line 49, in interrogate
if (self.model == None) or (self.processor == None) or (self.modelname != huggingface_model) or (device != self.device):
^^^^^^^^^^

Proposal

Is there a way to avoid including prompt in the response?
I am considering using the response directly as a gen image prompt, but it is difficult to use because it contains prompt.

Kosmos 2.5 model appears to have been released - Possible to incorporate it?

Hello,

Thanks for your time and effort on this node!

I noticed that Microsoft quietly dropped the model for Kosmos 2.5 yesterday here: https://github.com/microsoft/unilm/tree/master/kosmos-2.5
https://huggingface.co/microsoft/kosmos-2.5

The paper was published last September: https://arxiv.org/abs/2309.11419

Curious if you have plans to make it usable with this node or for ComfyUI in any fashion?

Thanks for any info!!

(Edit: Looks like you may be able to just swap in the new model)

can't be downloaded

The model can't be downloaded automatically. You don't specify which folder it should be placed in when manually downloading it. There's only a model name, and no matter where it's placed, it will be hard to find later on. There are too many files with this name.

AttributeError: 'MsKosmos2' object has no attribute 'model'

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "X:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "X:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 85, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "X:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "X:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Hangover-Nodes\ms_kosmos2.py", line 51, in interrogate
if (self.model == None) or (self.processor == None) or (self.modelname != huggingface_model) or (device != self.device):
^^^^^^^^^^
AttributeError: 'MsKosmos2' object has no attribute 'model'

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.