Ceci est une ancienne révision du document !
You may remember the last time I introduced the ComfyUI interface to Stable Diffusion. Hopefully it enticed some readers, and this article is an explanation of how to install it. I wanted to do a clean install, and accomplished that by using a V-NAND connected via USB on which I had previously installed Ubuntu Studio. There are several installation web pages available which are essentially the same. I used the Yushan777 version, which also includes a windows install, and is found here: https://medium.com/@yushantripleseven/installing-comfyui-linux-windows-b59a57af61b6 It does require Python 3.10 and Git. It is installed via a few lines pasted in terminal, and begins by cloning the repository. First make an appropriate directory: mkdir ai, in your home directory for example. Then clone the repo by using terminal in that new directory using: git clone https://github.com/comfyanonymous/ComfyUI.git In a few minutes it responds with done; then change to the newly created subdirectory (cd ComfyUI), and input: python3 -m venv venv, to create a virtual environment – named venv in this example. Make it active via: source venv/bin/activate. The prompt should now be prefixed with (venv).
Next, dependencies are added: pip install torch torchvision torchaudio –extra-index-url https://download.pytorch.org/whl/cu121 This will take several minutes, but you are almost done. Lastly, install additional dependencies: pip install -r requirements.txt Although at this point, the installation is complete, you will want to add two other things. To launch ComfyIU easier, create a launch file, for example a plain text file “launch.sh” in the ComfyUI directory to activate the VENV and start ComfyUI I with two lines: source venv/bin/activate python3 main.py Running the program ./launch.sh with terminal in that directory, will start ComfyUI but it will not allow you to produce any images. You need to install a model. I used: ghostmix_v20Bakedvae.safetensors https://civitai.com/images/862133 because it’s a relatively small file, 2.2 GB. Although it’s not an SDXL model, they could be used if your video card is sufficient. AMD video cards may be used but additional AMD drivers will need to be installed. Safetensors and Checkpoint models need to be copied into the Models/Checkpoint subdirectory. If no model is added, the Load Checkpoint node will be circled in red when attempting to produce an image as shown (below).
Using the default positive and negative prompts will produce a 512x 512 image such as that shown on the next page, top right. At the same location where examples of outputs can be found for the Ghostmix model, you can find prompts to produce impressive images. Using the below Positive and Negative prompts will allow you to produce something like the below. The output was 1024 x 1024, resized in the Empty Latent Image node, which was resized back down for this article (provided prompts can be used with any model). Positive Prompt: 1mechanical girl,1), portrait, global illumination, shadows, octane render, 8k, ultra sharp, metal, intricate, ornaments detailed, cold colors, egyptian detail, highly intricate details, realistic light, trending on cgsociety, glowing eyes, facing camera, neon details, mechanical limbs, blood vessels connected to tubes, mechanical vertebra attaching to back, mechanical cervical attaching to neck, sitting, wires and cables connecting to head
Negative Prompt: NSFW, 3d, cartoon, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, young, loli, elf, 3d, illustration ng_deepnegative_v1_75t At this point you are ready to go, but there is one more addition worthy of adding (there are many more, but this is the way to start). In the Queue Prompt node, there are some extra options available when checking that option as shown. But after loading the ComfyUI Manager Menu, two additional options are added to the Queue Prompt node. Pressing the Manager button provides many options including updates and the ability to add others. (More about this in the next article). To add the Manager, bring up the terminal in the ComfyUI/custom_nodes directory and run: git clone https://github.com/ltdrdata/ComfyUI-Manager.git After restarting ComfyUI, you should notice the Manager button option. The colored button labeled Share allows you to publish your work in a variety of appropriate web locations. We will address some of these options next time.