{"id":7089,"date":"2022-10-18T16:49:51","date_gmt":"2022-10-18T23:49:51","guid":{"rendered":"https:\/\/mattfife.com\/?p=7089"},"modified":"2023-02-09T11:41:49","modified_gmt":"2023-02-09T18:41:49","slug":"installing-stable-diffusion-1-4","status":"publish","type":"post","link":"https:\/\/mattfife.com\/?p=7089","title":{"rendered":"Installing Stable-diffusion 1.4"},"content":{"rendered":"\n<p>Time to play with some AI generated art! <\/p>\n\n\n\n<p>Here&#8217;s some great instructions on how to install the older stable diffusion 1.4:<br><a href=\"https:\/\/www.howtogeek.com\/830179\/how-to-run-stable-diffusion-on-your-pc-to-generate-ai-images\/\">https:\/\/www.howtogeek.com\/830179\/how-to-run-stable-diffusion-on-your-pc-to-generate-ai-images\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8GB of VRAM or less<\/h2>\n\n\n\n<p>One of the first things you&#8217;ll run into is that you&#8217;re not going to be able to generate any images at 512&#215;512 or larger if you have a graphics card with 8GB of VRAM or less. Even smaller if you only have 4GB of VRAM. The first\/easiest method is to limit the output image size. There is also an <a href=\"https:\/\/github.com\/power-74\/stable-diffusion-4GB\" data-type=\"URL\" data-id=\"https:\/\/github.com\/power-74\/stable-diffusion-4GB\" target=\"_blank\" rel=\"noreferrer noopener\">option that splits the model into 4 parts and loads each separately<\/a> (thought it will take longer), or using a more optimized\/compressed set of trained model data. <\/p>\n\n\n\n<p>So how do you do that if you have an older graphics card that only has 4GB or 8GB of VRAM? <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/@tingtingin\" data-type=\"URL\" data-id=\"https:\/\/www.youtube.com\/@tingtingin\" target=\"_blank\">TingTingin <\/a>has some tips at the end of his installation video if you are using a card with 8GB of VRAM (nVidia 3070&#8217;s for example).<\/p>\n\n\n\n<p><strong>Summary (<a href=\"https:\/\/youtu.be\/z99WBrs1D3g?t=946\" data-type=\"URL\" data-id=\"https:\/\/youtu.be\/z99WBrs1D3g?t=946\" target=\"_blank\" rel=\"noreferrer noopener\">at 15:45<\/a>):<\/strong> Modify your txt2img.py and add the line &#8216;model.half()&#8217; after model = instantiate_from_config(config.model) in the load_model_from_config() function.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/z99WBrs1D3g?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Time to play with some AI generated art! Here&#8217;s some great instructions on how to install the older stable diffusion 1.4:https:\/\/www.howtogeek.com\/830179\/how-to-run-stable-diffusion-on-your-pc-to-generate-ai-images\/ 8GB of VRAM or less One of the first things you&#8217;ll run into is that you&#8217;re not going to be able to generate any images at 512&#215;512 or larger if you have a graphics card with 8GB of VRAM or less. Even smaller if you only have 4GB of VRAM. The first\/easiest method is to limit the output image&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/mattfife.com\/?p=7089\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[28,9,6,5],"tags":[],"class_list":["post-7089","post","type-post","status-publish","format-standard","hentry","category-ai","category-cool","category-technicalproblemsolutions","category-technical"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4WECr-1Ql","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/7089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7089"}],"version-history":[{"count":9,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/7089\/revisions"}],"predecessor-version":[{"id":8185,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/7089\/revisions\/8185"}],"wp:attachment":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}