{"id":749,"date":"2023-05-21T07:00:00","date_gmt":"2023-05-21T07:00:00","guid":{"rendered":"https:\/\/thedailyhi.com\/tdh\/?p=749"},"modified":"2023-05-29T14:08:30","modified_gmt":"2023-05-29T14:08:30","slug":"getting-started-with-stable-diffusion","status":"publish","type":"post","link":"https:\/\/thedailyhi.com\/tdh\/getting-started-with-stable-diffusion\/","title":{"rendered":"Getting Started With Stable Diffusion"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is Stable Diffusion?<\/h2>\n\n\n\n<p>Stable Diffusion is a type of deep learning, text-to-image model released in 2022. It is primarily used to generate detailed images conditioned on text descriptions, though it can also be applied to other tasks such as inpainting, outpainting, and generating image-to-image translations guided by a text prompt. It was developed by the start-up Stability AI in collaboration with a number of academic researchers and non-profit organizations.<\/p>\n\n\n\n<p>Stable Diffusion is a latent diffusion model, a kind of deep generative neural network. Its code and model weights have been released publicly, and it can run on most consumer hardware equipped with a modest GPU with at least 8 GB VRAM. This marked a departure from previous proprietary text-to-image models such as DALL-E and Midjourney which were accessible only via cloud services.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to start using Stable Diffusion<\/h2>\n\n\n\n<p>Before you can begin using Stable Diffusion there are a variety of dependencies you will need. Stable Diffusion relies primarily on Python and Git, however for it to be effective you will also need a model (we\u2019ll get to that in just a second). You will also need at least 20-30Gb of disk space and as mentioned previously, 8Gb of virtual RAM for Stable Diffusion to work effectively. To begin, download Python 3.10+ by clicking <a rel=\"noreferrer noopener\" href=\"https:\/\/www.python.org\/downloads\/release\/python-3107\/\" data-type=\"URL\" data-id=\"https:\/\/www.python.org\/downloads\/release\/python-3107\/\" target=\"_blank\">here<\/a>. Scroll to the bottom and click on the Windows installer. Depending on your system you will need either 32-bit or 64-bit. When you are ready to install be sure to select \u201cAdd Python 3.x to PATH\u201d otherwise it will not work. Then click \u201cInstall now.\u201d After that you can move on to the Git dependency.<\/p>\n\n\n\n<p>To get Git-csm click <a rel=\"noreferrer noopener\" href=\"https:\/\/git-scm.com\/download\/win\" target=\"_blank\">here<\/a>. Once you are on the home page select the Standalone Installer. You will need either 32-bit or 64-bit depending on your system. Open the installer and select <strong>Yes <\/strong>for administrator. Select <strong>Next<\/strong> and you\u2019ll be able to select where you want to install Git. When you have selected where you want to install Git select <strong>Next<\/strong> and you\u2019ll move to the components page. Make sure all of the boxes are checked before moving to the next page. Select <strong>Next<\/strong> until you arrive to the \u201cChoosing the default editor used by Git\u201d page. Select the drop down menu and choose \u201cUse Notepad as Git\u2019s default editor.\u201d After that is done leave everything else as default and select <strong>Next<\/strong> until Git begins to install.<\/p>\n\n\n\n<p>Now you will need to create a dedicated folder for Stable Diffusion. This can be anywhere on your computer. The folder could be given any name though I recommend naming it \u201cSD\u201d or \u201cStable Diffusion\u201d to make it easily identifiable. Once the folder is created click on the navigation panel, select all of the text, delete them, and type \u201ccmd.\u201d This should open up the command line interface for the folder you created. If the command line interface does not pop&nbsp; up then Git was incorrectly installed. If the command line interface does pop up enter \u201cgit clone <a href=\"https:\/\/github.com\/AUTOMATIC1111\/stable-diffusion-webui\">https:\/\/github.com\/AUTOMATIC1111\/stable-diffusion-webui<\/a>\u201d without the quotations. This will install Stable Diffusion webui to your folder. Once installed navigate to the Stable Diffusion folder and run \u201cwebui-user.bat\u201d for the first time. This will install necessary extensions. Congratulations you now have Stable Diffusion! Before you can use it to generate images effectively you may want a good model and LoRA.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are models and what is a LoRA?<\/h2>\n\n\n\n<p>Models, also known as checkpoint files, are trained Stable Diffusion weights used for the purpose of generating general or a particular style of images. In layman\u2019s terms it is a collection of images of a similar type or style used to produce a specific outcome. If you want a realistic generated image, then you\u2019ll want a model based on realistic data. If you want a stylized image you will want a stylized model and so on.<\/p>\n\n\n\n<p>A LoRA is a Low-Rank Adaptation. A LoRA is used to further specify the generation of the image. For example, if you want to ensure that a gray cat appears in the generated image you may consider using a LoRA trained on gray cat images. You can use more than one LoRA at a time. However too many LoRA\u2019s in use may produce undesirable results. You can get models and LoRA\u2019s at <a href=\"http:\/\/civitai.com\/\" data-type=\"URL\" target=\"_blank\" rel=\"noreferrer noopener\">civitai.com<\/a>.<\/p>\n\n\n\n<p>In Civitai each image will be abled either \u201cCheckpoint\u201d or \u201cLora.\u201d Brows around and download a model that you would like your generated images to be based on. Once you download your model and\/or LoRA go to your Stable Diffusion folder. When opened navigate to the models folder. Models will go into the \u201cStable-diffusion\u201d folder and LoRa\u2019s go into the \u201clora\u201d folder. Run Stable Diffusion for the second time and you will be able to select your model and\/or LoRA. For a full tutorial on how to use Stable Diffusion webui be sure to stay tuned for an upcoming article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Stable Diffusion? Stable Diffusion is a type of deep learning, text-to-image model released in 2022. It is primarily used to generate detailed images conditioned on text descriptions, though it can also be applied to other tasks such as inpainting, outpainting, and generating image-to-image translations guided by a text prompt. It was developed by [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":750,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"tdm_status":"","tdm_grid_status":""},"categories":[21,2,12],"tags":[],"_links":{"self":[{"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/posts\/749"}],"collection":[{"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/comments?post=749"}],"version-history":[{"count":9,"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/posts\/749\/revisions"}],"predecessor-version":[{"id":859,"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/posts\/749\/revisions\/859"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/media\/750"}],"wp:attachment":[{"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/media?parent=749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/categories?post=749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thedailyhi.com\/tdh\/wp-json\/wp\/v2\/tags?post=749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}