Location>code7788 >text

Comfyui Basic Tutorial (I) -- Local Installation and Deployment

Popularity:176 ℃/2024-09-05 02:06:16

preamble

The relationship between ComfyUI and Stable Diffusion has been described in a previous post. For those who are not sure, see the portalStable Diffusion: The White Man's Path to the Pit.
WebUI and ComfyUI are not equal to Stable Diffusion, they can be understood as tools to facilitate the running of certain large models. Since I have contacted ComfyUI, I basically gave up WebUI, this article will start, then there will be a series of introductory articles to introduce ComfyUI, whether ComfyUI or WebUI, the basic principles of work are needed to understand clearly, so that we can better utilize the big model and some plug-ins to generate the effect we want. This article mainly introduces the local installation and deployment of ComfyUI.

I. Official version installation

The official address of ComfyUI is listed below:
/comfyanonymous/ComfyUI

Installation steps, the official document is written more clearly, here will not repeat.

Installing the official version requires a certain level of programming, first of all knowing how to use git, and second of all a certain level of Python, basic environment management, package installation and so on. If you don't know how to surf magic, you also need to know how to change sources.
In addition to installing the official version, there is a high probability that there will be some errors reported during the installation process, and you need to deal with them one by one.

Second, the Autumn Leaves Integration Pack

If there is only an official version, it will probably dissuade half of the people, can't you use AI to draw without knowing how to program? The majority of designers expressed their discontent. No hurry, believe in the power of open source, in addition to the official version, there are a lot of gods spontaneously made a one-click startup integration package, just need to download the integration package, unzip, and then you can one-click startup. Among the many versions of the integration package, when the B station@Akiba aaaki Big Brother's Painted Matters starter is the most widely known.

2.1 Integration package download and installation

Autumn Leaf ComfyUI Integration Pack official release address:/video/BV1Ew411776J/

Netflix Download:/s/64b808baa960

If you need the download address of other webcams, you can find it in the video comment section. Enthusiasts have already uploaded it and shared it.

2.2 Instructions for using the Integration Pack

The integration package is downloaded, unzipped, and then the interface should look like the following after a successful launch:

In general, the first time you start it up, it's a good idea to update the kernel version, as well as update the plugins, before using it.
Before updating, click on Settings at the bottom of the left menu bar and find Network Settings:

If you don't have magic, make sure all of these switches circled are on.
Next, click Versioning to perform an update:

In order, you can refresh the kernel version and update it with one click, and refresh the extension version and update it with one click.

Finally, go back to the One-Click Startup page, click One-Click Startup, then the launcher interface will automatically jump to the console page, wait for a while, see the following message, it means the startup is successful.

At this point, your browser, normally, should have opened the following page with a default workflow loaded.

The address bar address should match the address shown in the console messagehttp://127.0.0.1:8188/

If your browser doesn't open the page automatically, you can open your browser manually and type in the address above to open it.

It is possible that your default interface is not displaying Chinese, if you need to set the language, click on the small gear in the lower left corner to enter the settings interface, find the language, and then select it.

There may also be a case where you installed not the latest version of the integration package and launched it without updating the kernel, and it's possible that you're seeing the old hover panel style, the

At this point the pinion is in the top right corner of the hover panel, just click into settings to change the language. We recommend updating to a new version with a new interface that looks cleaner.

Go back to the main page and click on the top right corner of the pageexecution queueIf the workflow is not executed, it will start executing the workflow, and you will be able to see the generated image after a short while.

This default workflow is the simplest workflow and generates images very quickly, depending on how long it takes, depending on your computer configuration, mainly the graphics card.

OK, here, it shows that the local ComfyUI environment has been successfully installed and deployed.

III. Integration package plug-in installation (customized nodes)

Plug-ins, also called custom nodes. Whether it is the official version or integration package, after successful installation, have come with a lot of commonly used plug-ins, but this is far from enough, the actual use of the process to often install plug-ins, integration packages to install plug-ins in a number of ways, the following one by one.

3.1 Installation via ComfyUI Node Manager

The ComfyUI node manager, itself a plugin, is calledComfyUI-ManagerThis is the first time that ComfyUI has been installed, and it was installed along with ComfyUI when it was successfully installed.
Click on the menu barManager Daikai Manager Interface

After successful installation, the ComfyUI launcher needs to be restarted to take effect.

3.2 Installation via Git URL

Generally custom nodes are found in some git repository with a corresponding address.
For example, for the EchoMimic plugin, open its repository address page, click Code, you can see the address, click copy.

Find custom_nodes in your ComfyUI installation path, for example mine isD:\AI\StableDiffusion\ComfyUI\custom_nodes

Open a command line window and execute the command

git clone /sharpcj/

3.3 Downloading the plug-in package for installation

Still in the git repository address, click the followingDownload ZIP Download it and unzip it intocustom_nodes directory is sufficient.

This method does not allow for direct plugin updates and is not recommended.

3.4 Launcher Plugin Management

This is an installation method specific to the integration pack, open the launcher, select to the version management menu, install new extensions, then search for the plugin you need to install and click install.

IV. Loading and saving workflows

ComfyUI workflow has two forms, one is json file. One is a json file which records the node information, connection information and so on of the workflow. The other is the image generated by ComfyUI workflow, which by default has the workflow information for generating the image.

4.1 Loading workflows

Just drag and drop the workflow json file or the image with workflow information into ComfyUI interface.
Note: Only images generated through the ComfyUI workflow and not processed to remove information will work.

4.2 Preservation of workflows

Similarly, there are two forms of saving the workflow, one is the generated image, and the other is through the menu, clicking Save and generating a json file.

concluding remarks

This question focuses on how to install and deploy ComfyUI Autumn Leaves Integration Pack locally, as well as how to install plugins and load and save workflows.
More menu functions can be explored on your own after you have acquired some knowledge of ComfyUI.
The next piece of the article will introduce the core common nodes of ComfyUI workflow through the simplest Vincentian graph workflow, so stay tuned.