Nodes Browser

ComfyDeploy: How ObjectFusion_ComfyUI_nodes works in ComfyUI?

What is ObjectFusion_ComfyUI_nodes?

This is a node to generate new image that combine 2 objects from different scene.

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for ObjectFusion_ComfyUI_nodes and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

🎨 Object Fusion Pipeline

🌟 Motivation

Have you ever fantasized about crafting a single masterpiece from elements of different photos? 😲 What if I told you that manually prompting each object's shape, color, and features for diffusion could be a thing of the past? And let’s be real, using GPT to describe each object step by step can feel like chasing an AI in slow motion. πŸ’πŸ’€

Here, I introduce a complete pipeline that takes two images as input, allowing you to choose which objects from the images you want to fuse seamlessly.

πŸš€ Features

  • Combine objects from two different images into a single scene.
  • Easy selection and customization of objects to be fused.
  • Optimized integration with ComfyUI.

πŸ–ΌοΈ Some Examples

Example 2

<details> <summary>Click to expand/collapse</summary>

Example 1 Example 3 Example 4

</details>

πŸ› οΈ Installation

  1. Clone this repo into the custom_nodes directory in ComfyUI:

    git clone https://github.com/ducido/ObjectFusion_ComfyUI_nodes
    
  2. Clone these amazing repositories and follow their instructions:

  3. Install the required packages:

    conda create -n objectfusion python=3.10 -y
    conda activate objectfusion
    pip install -r custom_nodes/ObjectFusion_ComfyUI_nodes/requirements.txt
    wget https://huggingface.co/camenduru/YoloWorld-EfficientSAM/resolve/main/efficient_sam_s_gpu.jit -P custom_nodes/ObjectFusion_ComfyUI_nodes/Custom_ComfyUI_YoloWorld_EfficientSAM
    
  4. Or you can install with ComfyUI-Manager which is much easier and faster.

πŸ“Œ Note

All the folders, except CROP_OBJECT, are from other repositories. Thank you for your amazing works, I appreciate that. Besides, I have made some minor modifications to fit this project. Here are the details:

  • Custom_ComfyUI-YoloWorld-EfficientSAM

    • Added 2 output fields: BBOX, categories.
    • Displayed ID also in the IMAGE output (e.g., {ID} - {class} - {confidence}).
  • comfyui-llm-assistant

    • Removed input field: prompt.
    • Added 4 input fields: object1, desc_obj1, object2, desc_obj2.
    • Change all default value to "" because the newest frontend of ComfyUI consider None value as a bug

🀝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

πŸ“„ License

This project is licensed under the MIT License.