Giter Club home page Giter Club logo

comfyui_ib_customnodes's Introduction

ComfyUI_Ib_CustomNodes

Load Image From Path

def LoadImageFromPath(
    image: str = r'ComfyUI_00001_-assets\ComfyUI_00001_.png [output]'
) -> tuple[Image, Mask]

ComfyUI's built-in Load Image node can only load uploaded images, which produces duplicated files in the input directory and cannot reload the image when the source file is changed. Load Image From Path instead loads the image from the source path and does not have such problems.

One use of this node is to work with Photoshop's Quick Export to quickly perform img2img/inpaint on the edited image. Update: For working with Photoshop, comfyui-photoshop is more convenient and supports waiting for changes. See tutorial at r/comfyui.

The image path can be in the following format:

  • Absolute path:

    D:\ComfyUI\output\ComfyUI_00001_-assets\ComfyUI_00001_.png

  • Relative to the input directory:

    ComfyUI_00001_-assets\ComfyUI_00001_.png [input]

  • Relative to the output directory:

    ComfyUI_00001_-assets\ComfyUI_00001_.png [output]

  • Relative to the temp directory:

    ComfyUI_00001_-assets\ComfyUI_00001_.png [temp]

PIL.Image

def PILToImage(
    images: PilImage
) -> Image
def PILToMask(
    images: PilImage
) -> Image
def ImageToPIL(
    images: Image
) -> PilImage

comfyui_ib_customnodes's People

Contributors

chaoses-ib avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

comfyui_ib_customnodes's Issues

TripoSR and Mask error

Hello
The mask output don't work with TripoSR
The one from regular node Lod image works fine

Error occurred when executing TripoSRSampler:

Dimension out of range (expected to be in range of [-2, 1], but got 2)

File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-TripoSR\__init__.py", line 87, in sample
mask = reference_mask[0].unsqueeze(2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

How to input file paths from other nodes

Thanks for writing such a handy plugin. I have a question, the image path is supposed to be in text format, but if I try to convert the image to input from another text or string node, I get an error,
ERROR:root: - Exception when validating inner node: 'NoneType' object has no attribute ' endswith'
ERROR:root:Output will be ignored
20240229
What should I do to solve this problem, thanks .

[Feature Request] Add image preview and "choose file" button to browse the filesystem

Hi!

This node is already really awesome! Thanks for you great work!
Could you please add a "choose file" button to browse the filesystem?
That would be very helpful to search for the right file without copy+paste any path.

Also it would be great to have preview of the image file in the node as soon the path of the image file has been changed.

Kind regards

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.