8000 GitHub - nilor-corp/zenerator: Zenerator is a collection of ComfyUI workflows by Nilor Studio that we commonly use to produce art, conveniently packaged up in an easy-to-use Gradio application. The application was made to be extensible, so that others can produce Gradio UIs for their own custom workflows.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Zenerator is a collection of ComfyUI workflows by Nilor Studio that we commonly use to produce art, conveniently packaged up in an easy-to-use Gradio application. The application was made to be extensible, so that others can produce Gradio UIs for their own custom workflows.

License

Notifications You must be signed in to change notification settings

nilor-corp/zenerator

Repository files navigation

Python

Contributors Forks Stargazers Issues Apache-2.0 License

LinkedIn

Zenerator

Zenerator is a collection of ComfyUI workflows by Nilor Studio that we commonly use to produce art, conveniently packaged up in an easy-to-use Gradio application. The application was made to be extensible, so that others can produce Gradio UIs for their own custom workflows via JSON.

Dependencies

Installation

Warning

These setup instructions have only been tested on Windows using Powershell with Administrative privileges.

Set up the Python Environment

  • In a directory of your choosing, enter the following into your terminal:
    mkdir nilor-corp
    cd nilor-corp
    python -m venv venv
    .\venv\Scripts\activate
    python.exe -m pip install --upgrade pip

Install comfy-cli

  • In the .\nilor-corp\ directory:
    pip install comfy-cli
    pip install ultralytics     # should prevent an error when installing ComfyUI-Impact-Pack later

Install ComfyUI

  1. In the .\nilor-corp\ directory:
    comfy --workspace=ComfyUI install

Tip

If during this step you get an error that says ERROR: No matching distribution found for torch, you may have an incompatible version of Python installed. Torch documentation states that it is only compatible up to version Python 3.12.7, as we have recommended in the Dependencies above. To resolve this error, install Python 3.12.7, and start the installation process over again using that version of Python.

  1. Running the above command will cause the terminal to prompt the user for input in the terminal. Select either "nvidia", "amd", or "intel_arc" for the first question (depending on which GPU you have), and type "y" to agree to the second question about which repository to clone from.

[!WARNING] > Zenerator has only been tested on Nvidia GPUs.

  1. comfy set-default ComfyUI

Install Models

  • In the .\nilor-corp\ directory:
    cd ComfyUI
    rm -rf models   #if unix
    rmdir models    #if win. Answer yes if prompted
    git clone git@hf.co:nilor-corp/zenerator-models models
    cd ..           # should put you in .\nilor-corp\ directory

Clone Zenerator

  • In the .\nilor-corp\ directory:
    git clone https://github.com/nilor-corp/zenerator.git

Set up Zenerator Env Variables

Note

This step is only necessary if you intend to use the nilor.cool platform to generate images and use Collections of generated images as input to Zenerator. This is a highly recommended and very convenient feature, but it requires a personal Nilor API key which can currently only be attained by request from the Nilor Corp development team. In the near future it will be possible to attain this API key directly through the nilor.cool platform.

  • In the .\nilor-corp\zenerator\ directory, create a .env file and add the following to it:
    NILOR_API_KEY=<API KEY>
    NILOR_API_URI=https://api.nilor.cool/api
    

Provision ComfyUI

  1. In the .\nilor-corp\ directory, still within the venv virtual environment:
    cd zenerator
    cp .\ComfyUI-Manager-Snapshots\zenerator-snapshot.json ..\ComfyUI\user\default\ComfyUI-Manager\snapshots\
    cd ..\ComfyUI\custom_nodes\  # should put you in .\nilor-corp\ComfyUI\custom_nodes directory
    git clone https://github.com/BadCafeCode/execution-inversion-demo-comfyui.git
    cd ..\..           # should put you in .\nilor-corp\ directory
    comfy launch
  2. Once launched, navigate to ComfyUI in your browser: http://127.0.0.1:8188
  3. In the top right corner of the screen click the 🧩 Manager button.
  4. A new window will appear. In the bottom left corner under the Experimental section, click Snapshot Manager.
  5. Click Restore on the snapshot, then press the Restart button that appears in order to restart ComfyUI. This will download a lot packages which you should see in terminal.

Tip

You may see a ModuleNotFoundError about "tensorrt_bindings" during ComfyUI startup. In our tests, this can be safely ignored because it is resolved by the next step.

Install Zenerator dependencies

  1. Once ComfyUI has fished installing packages, quit ComfyUI by pressing Ctrl + C (Win) or Cmd + C (Unix) in the terminal.

  2. In the .\nilor-corp\ directory, enter the following:

    .\venv\Scripts\activate
    cd zenerator
    python -m pip install --no-cache-dir -r requirements.txt
  3. Then run Zenerator to install the last remaining TensorRT dependencies by entering the following:

    gradio app.py

Congratulations, you are finished installing Zenerator!

Directory Structure

  • If you have installed Zenerator correctly, your directory structure should look like this:
    nilor-corp
    β”œβ”€β”€ ComfyUI
    β”œβ”€β”€ venv
    └── zenerator
    

Test your Installation

  • Following the Usage instructions below, with both ComfyUI and Zenerator initialized please run the "Test" workflow tab to ensure that your installation is functioning properly.

Note

The first time you run a workflow on a machine, expect it to take longer to begin generating because some custom nodes will need to download models. Subsequent runs of the same workflow will take less time to start generating.

Workflow Dependencies

Warning

If you plan to use the included workflows, be aware that some of them may have additional specific dependencies or setup steps. Below are workflow-specific requirements you should resolve before attempting to run them.

Motion Directed LTXV This workflow uses a node which makes an API call to use an LLM to describe your input image. For that reason, you need to add a free API key for Groq. You basically just need to put an API key in an .env file inside the custom node pack. Instructions are here.

Usage

You will need to run ComfyUI and Zenerator in seperate instances of Powershell.

Run ComfyUI

  • In the first instance of Powershell, from the .\nilor-corp\ directory:
    .\venv\scripts\activate
    comfy launch

Tip

If you run into a "import torch" error when trying to launch ComfyUI for the first time, try the potential fix here.

Run Zenerator

  • In the second instance of Powershell, from the .\nilor-corp\ directory:
    .\venv\scripts\activate
    cd zenerator
    gradio ./app.py

Note

The first time you launch Zenerator, expect the startup to be delayed because it needs to build a TensorRT engine in order for the "Upscale Video (TensorRT)" workflow tab to work. This shouldn't take more than a few minutes and should only occur once.

Tip

Generated outputs can be found in: .\nilor-corp\ComfyUI\output\Zenerator\ directory.

Updating

Update Zenerator

  • In an instance of Powershell, from the .\nilor-corp\ directory:
    .\venv\scripts\activate
    cd zenerator
    git pull

Update ComfyUI Models

  • In the .\nilor-corp\ directory:
    cd .\ComfyUI\models
    git pull

Update ComfyUI Snapshot

  • Follow the same instructions as the Provision ComfyUI section. Do not continue beyond that section, only that section's instructions need to be followed.

Note

At some point in the future, ComfyUI and/or comfy-cli will need to be updated. When the time comes, we will update this README with additional steps as needed.

You have finished updating Zenerator!

Advanced Usage

Warning

Proceed at your own risk. Only follow these instructions if you know what you are doing, or you may break your Zenerator installation.

Making a Custom Workflow Tab

Important

This section is under construction and we will add more detailed instructions soon.

In order to make new custom workflow tabs in the Gradio app, follow these instructions:

  1. Within ComfyUI, click Workflow > Export (API) to create a new workflow JSON file and place it in the workflows folder.

  2. Then, edit the workflow_definitions.json file to add another definition for your new workflow. Be sure to edit the "filename" field to the filename of your newly-exported workflow JSON file, and follow the conventions of the existing pre-defined workflows in workflow_definitions.json to write a new workflow definition.

  3. You should populate your new workflow definition with the input components required to control the workflow, as well as the worklow node IDs that those input components should point to. The workflow node IDs can be found within your newly-exported worklow JSON file.

About

Zenerator is a collection of ComfyUI workflows by Nilor Studio that we commonly use to produce art, conveniently packaged up in an easy-to-use Gradio application. The application was made to be extensible, so that others can produce Gradio UIs for their own custom workflows.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

0