Introduction:
Currently, there are relatively few systematic learning tutorials available online. In this series of articles, I will share with you the principles and processes of AI drawing based on my own experiences and knowledge. Starting from scratch, I will present the key concepts in a concise manner to help you quickly grasp the art of AI drawing. I hope to provide everyone with the joy of AI drawing. Please note that this tutorial is primarily based on my own learning, and I welcome any corrections if there are any errors.
一、Principles of AI Drawing:
AI drawing is a method that utilizes artificial intelligence techniques to generate visual artworks. It is based on deep learning models, often employing a framework called Generative Adversarial Network (GAN). While this technology has been studied by scholars for a long time, significant progress has been made in the past couple of years, allowing for the generation of images that conform to human aesthetics after receiving specific instructions.
One key difference between AI drawing and human drawing is that the process of human drawing involves sketching, outlining, composition, and coloring, while AI drawing starts by diffusing and adding noise to the original image. Then, based on new logical instructions, an algorithm is applied to reverse the diffusion and remove the noise, resulting in the generated image. The example below illustrates this process:

For a detailed algorithmic process, please refer to the following image. The text prompts we set and the Lora model play a role in this process of generating images. (We will discuss text prompts and the Lora model in future articles.)

Based on this deep learning algorithm, there are currently various AI drawing products available, such as NovelAI and Midjourney. Additionally, I will introduce Stable Diffusion (referred to as SD). The advantages of SD are that it is currently free and can be downloaded and used on your own computer. There are also many open-source Lora models available for drawing purposes. However, SD has higher requirements for graphics cards. It is recommended to prioritize Nvidia graphics cards when choosing computer equipment, preferably from the 3060 series or above. Otherwise, generating each image will be time-consuming.
The main software used in SD at present is developed by a brilliant individual known as AUTOMATIC1111 in the GitHub open-source community.

The current mainstream SD interfaces are based on his code. This is what people commonly refer to as SD WEB UI.

Below is the download link for SD WEB UI:
https://github.com/AUTOMATIC1111/stable-diffusion-webui
Regarding how to perform local installation, there are many detailed tutorials available on YouTube. It is difficult to explain through written instructions, so I suggest following their video tutorials directly. If you do not want to purchase a new graphics card, you can also use Google Colab for installation, but the free version has limitations on usage. However, it is a great option if you just want to try AI drawing.
In the next article, we will introduce the features and functions of the SD WEB UI interface. If you find this article helpful, please give it a thumbs up to encourage me to continue writing.
前言
目前網路上比較少系統性的學習教程
這系列文章我會依照我自己目前所學到的經驗和知識
將一些AI繪畫的原理跟製作過程分享給大家
從零毫無基礎開始
以重點節略的方式讓大家能快速上手學會AI繪畫
希望能讓大家一起體會AI繪畫的樂趣
當然本教程目前還是主要依據我學習到的知識
如果有錯誤請見諒並歡迎指正
一、AI繪畫的原理
AI繪畫是一種利用人工智能技術來生成視覺藝術作品的方法。
它的原理基於深度學習模型,通常使用稱為生成對抗網絡(GAN)的架構。
這項技術並非突然出現,已經有很多學者研究很久,
但直到近兩年才有了重大進展,
可以達到真正輸入指令後獲得符合人類審美的圖片
首先AI繪畫和人類繪畫不同的是
人類繪畫的步驟是先打草稿、畫線條進行構圖上色等
但AI繪畫是先將原圖片先擴散增加噪聲模糊圖片後
再依照新的邏輯指令予演算法
反向逆擴散去除噪聲進而生成圖片
下方是範例圖
左邊是原圖
中間是增加噪聲的擴散過程
最右邊則是去除噪聲後生成的圖片

詳細演算法的過程可以參考下列圖片
我們所設定的文本提示詞和Lora模型就是在這過程中進行作用生成圖片
(關於提示詞和Lora模型我們將會在之後的文章提到)

基於這種深度學習模型演算法
目前有許多AI繪畫的產品
例如NovelAI、Midjourney等
以及我要介紹的Stable Diffusion(以下簡稱SD)
SD的優點是目前不收費,並且你可以下載到自己的電腦使用
另外有許多開源的Lora模型可以給你搭配繪圖使用
但對顯示卡要求較高
推薦電腦配備顯卡優先選擇Nvidia的顯卡
並且建議要在3060系列顯卡以上,否則每算一張圖都會十分耗時間
而目前SD使用的主要軟體
需要感謝一位在github開源社區暱稱為AUTOMATIC1111的大佬

目前主流的SD介面都是基於他的代碼設計的
這就是現在大家說的SD WEB UI

下面是SD WEB UI的下載連結
https://github.com/AUTOMATIC1111/stable-diffusion-webui
如何進行本地安裝,Youtube上有許多詳細教程,
我用文章說明比較難說明清楚
建議直接按照他們的影片步驟操作,就不多說明
而不想購買新的顯示卡
也可以運用google colab進行安裝,但免費版使用有次數限制
但如果只是想嘗試一下AI繪圖是很不錯的選擇
下一篇文章我們將會介紹SD WEB UI的介面各項功能的涵義
如果覺得本篇文章對您有幫助
還請幫我點讚鼓勵我繼續寫下去
大変申し訳ありませんが、私は日本語版の作成ができません。私の日本語能力が不足しており、文章の間違いが多くなる可能性があるためです。お手伝いできる他の質問や翻訳がありましたら、お知らせください。心よりお待ちしております。
Overdoser
2023-05-25 03:52:22 +0000 UTC