Outils pour utilisateurs

Outils du site


issue205:stable_diffusion

Ceci est une ancienne révision du document !


This time we continue with ComfyUI. We will start off with a useful feature and then create both a parallel and series workflow. The useful tip is bypassing individual nodes which you can do by right-clicking on one, such as the KSampler node shown, and selecting Bypass, which will turn the node purple indicating it’s no longer viable if you run the Prompt. Selecting Bypass again reverses the selection. This allows you to add nodes and retain the old workspace version to try something new without worrying about losing the current version. (This is helpful but don’t forget to save any needed new workspace for future use.) Likewise, you can do the same thing with the entire workflow by right-clicking and selecting Add Group, then stretching the blue rectangle to cover all nodes. Then right-clicking again gives you the option of Bypassing Group Nodes, turning all nodes to purple. Repeating and selecting Set Group Nodes to Never will un-bypass the group. Why is this very useful? – You can copy the entire workflow and paste it on the same page allowing you to make changes without starting on a new workflow. You don’t lose anything in the original version, and can switch back and forth as needed to run only the active one.

Next we will create parallel processes in a workspace. Consider that you may want to create an image with each of the four seasons. Essentially you need to make four identical workflows all starting from the same beginning. Start with the original image workflow, copy the Ksampler and paste it with Ctrl-Shift and V three times, each with the same starting connections. All that’s needed then is to add a CLIP Text Encode (Prompt) for each season with the prompt word summer, fall, winter or spring. Combining each season with the original positive prompt via a new Conditioning (Combine) Node and using that as the positive Prompt to the KSampler allows you to get the desired output images. While the workflow looks confusing, it’s four copies of the same thing except for the added Prompt via the Combining Node. We can do something similar but as a series. We previously up-scaled an output, only to find it made the image bigger but with no higher resolution.

To solve that issue, we will chain three KSampler nodes with an Upscale Latent Node taking the output Latent from the first KSampler node to the second KSampler node via a Latent Upscale By node; we will repeat the same steps from the second KSampler node to the third KSampler node. I used a scale_by 2.0 for both Latent Scale By settings. In each of the above examples, if the first image doesn’t look good you can simply stop the workflow via the Queue Prompt manager before it finishes to save time which is particularly important if it’s a slow process. The result shows the workflow with apparently three exact images. However, I cropped heads from the three outputs and you see a noticeable difference. The images are not only larger but have higher resolution because more information has been used to create the images. Next time, we will look at yet another interface UI version named Fooocus. It doesn’t have the flexibility of ComfyUI to control each step but for simplicity it’s hard to beat.

issue205/stable_diffusion.1718342396.txt.gz · Dernière modification : 2024/06/14 07:19 de d52fr