In part five of An Introduction to Stable Diffusion, we will learn to install Automatic1111 and be introduced to a different interface. We will also use this new interface to generate and modify images. The current version of Easy Diffusion is 2.5.39 beta version and includes Seamless tiling as the added feature. I started Easy Diffusion from the command line and the below information appeared while loading. It indicates Easy Diffusion would automatically open in a browser window. On my Ubuntu Studio installation, that did not happen, possibly because I am running Brave as my default browser. Having had some issues with Easy Diffusion, I installed the Automatic1111 version which is apparently more popular. As the name implies, Easy Diffusion is indeed easier to use for a new user and the interface more obvious. Automatic1111 is more capable if less user friendly. I will therefore start using both in comparison and when possible present both interface screens for comparison purposes.
Dans la cinquième partie de mon Introduction à Stable Diffusion, nous apprendrons comment installer Automatic1111 et je vous présenterai une nouvelle interface. Nous allons utiliser cette nouvelle interface pour générer et modifier des images.
La version actuelle d’Easy Diffusion est la version 2.5.39 bêta et comprend les mosaïques Seamless comme nouvelle fonctionnalité. J’ai démarré Easy Diffusion à partir de la ligne de commande et les informations ci-dessous se sont affichées pendant le chargement, indiquant que Easy Diffusion s’ouvrira automatiquement dans la fenêtre d’un navigateur. Sur ma machine sous Ubuntu Studio, cela n’a pas eu lieu, peut-être parce que mon navigateur par défaut est Brave.
Ayant eu quelques problèmes avec Easy Diffusion, j’ai installé la version Automatic1111 qui est, paraît-il, plus populaire. Comme son nom implique, Easy Diffusion est en fait plus facile à utiliser pour un nouvel utilisateur et l’interface est plus évidente. Bien que moins convivial, Automatic1111 peut en faire davantage. Je vais donc commencer à utiliser les deux pour les comparer et, si possible, présenter l’écran de chacune des deux interfaces à des fins de comparaison.
First, we must get the Automatic1111 version installed. Go to the install page: https://github.com/AUTOMATIC1111/stable-diffusion-webui and go to mid-page where installation information can be found. There you will find procedures for Windows, Apple and Linux operating systems. It seemed more difficult to install on Linux in the past but now just install the Python dependencies for Debian, Red Hat or Arch based OSes then run the provided command in the directory desired and it will be installed. Run Automatic1111 by typing in: webui.sh in your terminal and opening a browser tab and going to the indicated URL: http://127.0.0.1:7860 It should then bring up a considerably different Stable Diffusion interface:
D’abord, on doit installer la version Automatic1111. Allez à la page d’installation : https://github.com/AUTOMATIC1111/stable-diffusion-webui, puis descendez au milieu de la page où les informations sur l’installation se trouvent. Vous y verrez les procédures pour les systèmes d’exploitation de Windows, Apple et Linux. Par le passé, il semblait plus difficile à installer sur Linux, mais maintenant il suffit d’installer les dépendances Python pour les OS basés sur Debian, Red Hat ou Arch, puis de lancer la commande fournie dans le répertoire voulu et ce sera installé. Lancer Automatic1111 en tapant :
webui.sh
dans votre terminal, ouvrant un onglet de votre navigateur et allant à l’URL indiqué :
L’interface de Stable Diffusion qui s’affiche alors devrait être très différente :
You will notice a series of tabs near the top with txt2img highlighted and img2img to the right. We will use these options to first make an image and then modify it. With txt2img selected create an image by typing in an appropriate description. In the following example, I used: penguins dancing in Antarctica, sun going down, rough seas, photo-realistic. You can use the default 512×512 size and Sampling steps of 20. I also used a batch count of 20 to create a variety of images and -1 as the seed produces a random number each time as shown by placing the cursor over the option (shown above). Also indicated at the bottom of the page is the current version of Automatic1111 (v1.2.1) and versions of dependencies. Use the single graphic generated or pick out one of the batch generated. If you have batch produced several then one of the graphics is a grid of all generated as shown, twenty in my case. You can scroll through the batch and find one of interest (bottom left). When the large version of the desired graphic is shown instead of the grid of all, select the Send to img2img button (shown above).
Vous remarquerez une série d’onglets près du haut où text2img est surligné et img2img est à droite. Nous allons utiliser ces options pour, d’abord, créer une image et, ensuite, la modifier. Avec txt2img sélectionné, créez une image en tapant une description appropriée. Dans l’exemple qui suit, j’ai utilisé : « penguins dancing in Antarctica, sun going down, rough seas, photo-realistic. » (Pingouins dansant en Antarctique, le soleil se couche, la mer est déchaînée, photo réaliste). Vous pouvez utiliser la taille par défaut (512 x 512) et 20 étapes de Sampling. J’ai également utilisé un compte de lot de 20 pour créer une variété d’images et -1 comme départ produit un nombre au hasard chaque fois comme montré si vous placez le curseur sur l’option (ci-dessus).
Également indiqué en bas de la page est la version actuelle d’Automatic1111 (v1.2.1) et la version des dépendances. Utilisez l'image unique générée ou choisissez-en une dans le lot généré. Si vous avez produit un lot de plusieurs, un des affichages est une grille de toutes les images générées, comme montré ; dans mon cas, 20. Vous pouvez parcourir le lot et en trouver une qui vous intéresse (en bas à gauche).
Quand la grande version de l'image choisie s’affiche à la place de la grille les contenant toutes, sélectionnez le bouton Send to img2img (montré ci-dessus).
The graphic should then be seen in the img2img interface. You can then make the graphic wider by moving the slider or typing in the desired width, doubling it to 1024. Batch count should be changed to one and you can press the Generate button. Look carefully at the newly generated graphic. It is not the same and seems very distorted. Making it more accurately reflect the original is done by maximizing the CFG scale to 30 and reducing the Denoising strength to zero in the img2img interface (top right). After Generating the modified version the result is a very similar graphic but everything seems to have been stretched. There are ways to modify the generated graphic but it may still seem a bit of an art to get the desired result. One of the new updates is for image tiling which may also be utilized to make a wider graphic. We will address some of the numerous options as we go forward (bottom right).
L’image devra alors s’afficher dans l’interface img2img. Vous pouvez alors rendre l'image plus large en bougeant la flèche ou en tapant la largeur désirée, la doublant à 1024. Le compte du lot devrait être réduit à un et vous pouvez appuyer sur le bouton Generate.
Regardez avec attention le graphisme qui vient d’être généré. Ce n’est pas le même et il semble très déformé. Le rendre plus similaire à l’original se fait en maximisant l’échelle CFG à 30 et en réduisant la force de Denoising (débruitage) à zéro dans l’interface img2img (en haut à droite).
Après avoir généré la version modifiée, le résultat est très similaire, mais tout semble avoir été étiré. Il y a des façons de modifier le graphisme généré, mais obtenir le résultat désiré peut sembler toujours plutôt un art. Nous parlerons de quelques-unes des nombreuses options dans les prochains épisodes (en bas à droite).