Nodes Browser

ComfyDeploy: How Pseudocomfy works in ComfyUI?

What is Pseudocomfy?

A package designed to enable multi-regional prompting for architectural rendering, integrated with the Rhino Pseudorandom plugin.

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 Pseudocomfy and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine
<div align="center"> <h1>Pseudocomfy Custom Nodes</h1> <img src="readme/logo.svg" alt="description" width="300"/> </div>

A ComfyUI custom nodes package designed to enable multi-regional prompting for architectural rendering, integrated with the Rhino Pseudorandom plugin.

Workflow Example Img

Snapshot (input JSON) format example:

   {
      "width": 0,
      "height": 0,
      "pmts_environment": 
      {
         "pmt_scene" : "a prompt describing the scene as a whole",
         "pmt_style" : "a prompt describing the rendering style",
         "pmt_negative" : "a prompt describing what should not be in the render",
      },
      "map_semantic": 
      [
         {
            "pmt_txt": "an text prompt for the object, MAY BE NULL or EMPTY",
            "pmt_img": "BASE 64 ENCODED BITMAP of a guidence image, MAY BE NULL OR EMPTY", 
            "mask": "BASE 64 ENCODED BITMAP",
            "pct": 0.00 
         },
         {
            "pmt_txt": "an text prompt for the object, MAY BE NULL or EMPTY",
            "pmt_img": "BASE 64 ENCODED BITMAP of a guidence image, MAY BE NULL OR EMPTY", 
            "mask": "BASE 64 ENCODED BITMAP",
            "pct": 0.00 
         },
        ...
      ],
      "img_depth": "BASE 64 ENCODED IMAGE",
      "img_edge": "optional BASE 64 ENCODED IMAGE"
      "pseudorandom_spatial_package_version": "{{schema version that this package adheres to in x.xx format}}",	
   }

--Manual installation instructions--

IMPORTANT: If you're using the Windows portable version of ComfyUI, which includes an embedded Python environment, you will first need to install the diffusers module:

1. Install the diffusers library for ComfyUI (Windows Portable Version)

  • Locate your main ComfyUI_windows_portable directory.

    • It might be named differently, but this is the main directory where you extracted the ComfyUI portable version. It contains folders like ComfyUI, python_embeded, and others.
  • Navigate to the ComfyUI Windows Portable Directory via a Command Prompt:

    • Open a Command Prompt by pressing Win + R, or typing cmd, and pressing Enter.
    • Use the cd command to change the current directory to the ComfyUI_windows_portable directory. For example:
      cd C:\path\to\your\ComfyUI_windows_portable
      
  • Install the library using the embedded Python interpreter:

    • While in the ComfyUI_windows_portable directory, run the following command:
      .\python_embeded\python.exe -m pip install diffusers
      
      it should look like this:
      \ComfyUI_windows_portable>.\python_embeded\python.exe -m pip install diffusers
      
  • NOT Windows Portable Version:

    • if you are using your system Python, virtual environment (or Conda environment), run:
      pip install diffusers
      

These steps will ensure that the diffusers module is installed within the embedded Python environment used by ComfyUI.


2. Install a ControlNet model

There are many places you can download depth ControlNet models, but the one we recommend is diffusion_pytorch_model.safetensors from Hugging Face.

To do this:

  1. Download the model:

  2. Move the model to the controlnet folder:

    • After download is comlpete, move the file to the controlnet subfolder inside the models folder of your ComfyUI directory:
      C:\path\to\your\ComfyUI_windows_portable\ComfyUI\models\controlnet
      
<br> <br>

3. Install IPAdapter:

  1. Install IPAdapter Plus custom nodes in ComfyUI
    • Open Comfy
    • Go to Manager > Custom Nodes Manager (Install Custom Nodes)
    • Search using the keyword "ipadapter"
    • Click Install on the one called ComfyUI_IPAdapter_plus by cubiq
  2. Install CLIP Vision models
  3. Install IPAdapter models
    • navigate to C:\path\to\your\ComfyUI_windows_portable\ComfyUI\models
    • inside models, create a new folder called ipadapter
    • go to https://github.com/cubiq/ComfyUI_IPAdapter_plus?tab=readme-ov-file#installation
    • download the .safetensors files of your choice depending on the preferred SD version
      • IMPORTANT: We recommend at least downloading:
        • SD-1.5: ip-adapter-plus_sd15.safetensors, "Plus model, very strong" version
        • SD-XL: ip-adapter-plus_sdxl_vit-h.safetensors, "SDXL plus model" version
    • move the downloaded files to newly created ipadapter folder ...\models\ipadapter

4. Make sure you have the SD models (checkpoints)

We recommend:


5. Last, clone the Pseudorandom repository:

Clone this repo inside your custom_nodes folder by:

  1. Navigate to: C:\path\to\your\ComfyUI_windows_portable\ComfyUI\custom_nodes
  2. Open the folder inside a Command Prompt and type:
    git clone https://github.com/Pseudotools/Pseudocomfy.git
    

Acknowledgments

This project incorporates code that has been adapted or directly copied from the following open-source packages:

The code from these packages is used under the terms of their respective licenses, with modifications made to fit the specific requirements of this project. The contributions of these developers are greatly appreciated, and their work has been instrumental in the development of this project.