├── image ├── run1.png ├── run2.png ├── run3.png ├── run4.png ├── run5.png ├── run6.png ├── run7.png ├── run8.png ├── run9.png ├── run10.png ├── run11.png ├── run12.png ├── run13.png ├── run14.png ├── run15.png ├── run17.png ├── run18.png ├── run19.png ├── run20.png ├── saveAs.png ├── colabCopy.png ├── imagePath.png ├── install1.png ├── install2.png ├── install3.png ├── install4.png ├── install5.png ├── install6.png ├── install7.png ├── install8.png ├── install9.png ├── installationPage.png ├── InstallWebUIColab.png ├── disallowedWarning.png └── LICENSE ├── README.md └── LICENSE /image/run1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run1.png -------------------------------------------------------------------------------- /image/run2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run2.png -------------------------------------------------------------------------------- /image/run3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run3.png -------------------------------------------------------------------------------- /image/run4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run4.png -------------------------------------------------------------------------------- /image/run5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run5.png -------------------------------------------------------------------------------- /image/run6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run6.png -------------------------------------------------------------------------------- /image/run7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run7.png -------------------------------------------------------------------------------- /image/run8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run8.png -------------------------------------------------------------------------------- /image/run9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run9.png -------------------------------------------------------------------------------- /image/run10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run10.png -------------------------------------------------------------------------------- /image/run11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run11.png -------------------------------------------------------------------------------- /image/run12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run12.png -------------------------------------------------------------------------------- /image/run13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run13.png -------------------------------------------------------------------------------- /image/run14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run14.png -------------------------------------------------------------------------------- /image/run15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run15.png -------------------------------------------------------------------------------- /image/run17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run17.png -------------------------------------------------------------------------------- /image/run18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run18.png -------------------------------------------------------------------------------- /image/run19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run19.png -------------------------------------------------------------------------------- /image/run20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/run20.png -------------------------------------------------------------------------------- /image/saveAs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/saveAs.png -------------------------------------------------------------------------------- /image/colabCopy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/colabCopy.png -------------------------------------------------------------------------------- /image/imagePath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/imagePath.png -------------------------------------------------------------------------------- /image/install1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install1.png -------------------------------------------------------------------------------- /image/install2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install2.png -------------------------------------------------------------------------------- /image/install3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install3.png -------------------------------------------------------------------------------- /image/install4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install4.png -------------------------------------------------------------------------------- /image/install5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install5.png -------------------------------------------------------------------------------- /image/install6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install6.png -------------------------------------------------------------------------------- /image/install7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install7.png -------------------------------------------------------------------------------- /image/install8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install8.png -------------------------------------------------------------------------------- /image/install9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/install9.png -------------------------------------------------------------------------------- /image/installationPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/installationPage.png -------------------------------------------------------------------------------- /image/InstallWebUIColab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/InstallWebUIColab.png -------------------------------------------------------------------------------- /image/disallowedWarning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chukaml/stable-diffusion-webui-chinese-notes/HEAD/image/disallowedWarning.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Stable Diffusion WebUI的學習筆記 2 | 3 | ## 什麼是Stable Diffusion? 4 | 5 | Stable Diffusion是由[StabilityAI](https://stability.ai/)、CompVis和Runway合作開發的開源軟體,旨在根據文字的描述來生成詳細圖像,並於二零二二年八月二十二日首次公開發佈。Stable Diffusion是「穩定的擴散」的意思,它使用擴散模型(diffusion model)的一種變體,「潛擴散模型」(latent diffusion model; LDM)來訓練和作圖。因為使用擴散模型來作圖須反覆多次做逆擴散(即去噪過程)的迭代運算,運算時間始終太長,並不切合實際使用。「潛擴散模型」是把逆擴散運算改為在潛空間(latent space,也是「潛擴散」的意義)中進行,而不在像素空間(pixel space)之中進行,使運算時間大大縮短,成為實用的運算法。([這篇英文文章有詳細解釋](https://www.promptengineering.org/the-possibilities-of-ai-art-examining-stable-diffusion/)) 6 | 7 | ## 為什麼使用Stable Diffusion WebUI? 8 | 9 | Stable Diffusion本身是行命令式的軟體,要讓它繪圖,便要在終端機視窗或命令提示字元視窗下繪圖指令,非常麻煩和痛苦。譬如要繪畫一隻花貓坐在生日蛋糕後面,可能要在終端機中輸入這樣的命令: 10 | 11 | ``python scripts/txt2img.py --prompt "a birthday cake is in front of a tabby cat" --ckpt sd-v1-4.ckpt --skip_grid --n_samples 4`` 12 | 13 | 為此不少人開發了圖像化介面,以減少輸入命令的數量和輸入錯誤指令的機會。其中由AUTOMATIC1111開發的[Stable Diffusion WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui),使用網頁介面,可以在瀏覽器中指示核心程式工作,最受歡迎,所以我選用這個開源軟體作為Stable Diffusion的操作介面。 14 | 15 | ## 把Stable Diffusion WebUI安裝到自己的Google雲端硬碟裏 16 | 17 | 本開源軟體可以在Windows、Linux和Apple Silicon裏安裝,甚至可以在[Google Colaboratory](https://colab.research.google.com/)裏運行,本筆記以Google Colab為安裝目標,其他系統請參考Stable Diffusion WebUI的[GitHub網頁說明](https://github.com/AUTOMATIC1111/stable-diffusion-webui#installation-and-running)。 18 | 19 | 1. 為使之後的安裝過程順利,可以先[登入Google帳戶](https://accounts.google.com/),並開啟[Google Drive頁面](https://drive.google.com/)。
20 | ⚠️注意⚠️
本軟體會安裝到Google Drive中,所以Google Drive必須有足夠的空間。如果使用免費Google Drive帳戶,Google只提供15 GB的共用空間,GMail、Google相簿和Google Drive的內容都會計算在15 GB的容量內,可能會導致空間不足,所以如果使用免費帳戶的話,建議使用專用帳戶,只作Stable Diffusion WebUI之用,或者使用免安裝的方法,[請參考下一節說明](README.md#%E6%9C%AA%E5%AE%89%E8%A3%9D%E6%AA%94%E6%A1%88%E5%88%B0google-drive%E8%A3%8F%E4%B9%8B%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)。
21 | 另外,Google Colab的官方推特在二零二三年四月二十一日提及[Google Colab無法負擔免費帳戶使用Stable Diffusion](https://twitter.com/thechrisperry/status/1649189902079381505),所以如果使用免費Google Colab帳戶的話,請自行衡量軟體在使用期間中斷,正在運算的資料流失,甚至被禁用的風險。如要購買付費Colab項目,可以到[這條鏈結選購](https://colab.research.google.com/signup)。 22 | 23 | 1. 先到@camenduru的Stable Diffusion WebUI項目的[存儲庫主頁](https://github.com/camenduru/stable-diffusion-webui-colab/)。 24 | 25 | 1. 捲動網頁到下方,那裏列出各種安裝方法,包括把所有Stable Diffusion WebUI檔案儲存到Google Drive中,再運行軟體的方法,或者不把檔案安裝到Google Drive中,直接運行軟體的其他方法。我們會把Stable Diffusion WebUI檔案先安裝到Google Drive中,以便每次啟用都可以取得上一次的運行狀態,並可以安裝更多的插件使用,也讓生成的圖片可以儲存到Google Drive中。如果因為某些原因,例如只想體驗一下某Checkpoint模型的風格,未決定是否要長期使用它,或者Google Drive的空間不足,未能安裝軟體,[可以參考下一節](README.md#%E6%9C%AA%E5%AE%89%E8%A3%9D%E6%AA%94%E6%A1%88%E5%88%B0google-drive%E8%A3%8F%E4%B9%8B%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)。 26 | 27 | 1. 轉到本項目的[drive分支頁](https://github.com/camenduru/stable-diffusion-webui-colab/tree/drive),可以看到[把WebUI Colab安裝到Google Drive](https://github.com/camenduru/stable-diffusion-webui-colab/tree/drive#-install-the-webui-colab-to-google-drive)(🦒 Install the WebUI Colab to Google Drive)一節之下有三項:
28 | ![把WebUI Colab安裝到Google Drive](image/InstallWebUIColab.png) 29 | 30 | 1. 首先要把WebUI Colab安裝到Google Drive裏,所以按一下第一列第一欄的[![Open In Colab](https://user-images.githubusercontent.com/54370274/224839804-50c0c18b-3960-4a1c-b7fa-3c7074b11779.svg)](https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/drive/install.ipynb),以在Google Colab中開啟install.ipynb檔。 31 | 32 | 1. 這時可以把install.ipynb儲存到自己的Google Drive之中,其他兩個Google Colab檔也可以儲存到Google Drive裏,以便之後使用。如要儲存檔案,可以用滑鼠按一下選單列左側的【檔案】→【在雲硬碟中儲存複本】:
33 | ![在Google Colab中儲存複本](image/saveAs.png)
34 | ![儲存在Google Drive裏的複本](image/colabCopy.png)
35 | 儲存複本之後,所有修改都會記錄下來,日後便可以再用,但是就算沒有儲存複本,還是可以進行安裝的。無論有沒有把複本儲存起來,後面的步驟均相同,但如果沒有儲存複本的話,每次都要回到Stable Diffusion WebUI項目的[分支主頁](https://github.com/camenduru/stable-diffusion-webui-colab/tree/drive)才能夠開啟軟體。 36 | 37 | 1. 準備好install.ipynb之後,便可以按一下程式碼儲存格左上角的播放鍵,儲存格內的程式碼便會開始執行。
38 | ![在Google Colab中執行程式碼](image/installationPage.png) 39 | - ⚠️如果未把複本儲存到自己的Google Drive裏,會出現警告視窗,請按「仍要執行」以繼續執行程式。
![未把複本儲存到自己的Google Drive裏出現的警告視窗,按「仍要執行」以繼續執行程式](image/install1.png) 40 | 41 | 1. 由於安裝程式要把檔案安裝到Google Drive中,所以必須允許程式取得Google Drive的讀寫權限。請按「連線至Google雲端硬碟」以繼續授權步驟。
![允許程式取得Google Drive的讀寫權限](image/install2.png) 42 | 43 | 1. 在新開啟的視窗裏,按一下自己的帳戶名稱,以確認使用本帳戶授權。
![確認授權授權帳戶](image/install3.png) 44 | 45 | 1. 捲動到視窗底部,並按「允許」以完成授權步驟。
![按「允許」以完成授權步驟](image/install4.png) 46 | 47 | 1. 完成授權之後,程式便會繼續執行,請耐心等候十數分鐘,以完成下載和安裝檔案的步驟。
![請稍候十數分鐘,等待左上角回復播放鍵⏵狀態](image/install5.png) 48 | 49 | 1. 待工作訊息欄內顯示「Installed」字樣,並且程式碼儲存格左上角回復播放鍵⏵狀態,便表示安裝或更新過程完成。
![印出「Installed」訊息,並且左上角回復播放鍵⏵狀態,表示安裝程序完成](image/install6.png) 50 | 51 | 1. 由於Google Colab裏的虛擬機是和其他虛擬機共用資源的,所以完成安裝軟體之後,便要盡快把虛擬機關掉,以釋放佔用的資源給其他人使用。按一下右上方的▼,開啟【其他連線選項】選單,並且按一下【中斷連線並刪除執行階段】,關閉現正使用的虛擬機。
![關閉現正使用的虛擬機](image/install7.png)
記住,就算正在使用免費版本,也不要佔用著共用資源空轉。如果長時間佔用資源,Google Colab可能會限制該帳戶之後的使用情況。 52 | 53 | 1. 這時會出現警告視窗,請按「是」以完成關閉程序。關閉之後,虛擬機裏所有的檔案和設定都會全部刪除。
![在「中斷連線並刪除執行階段」警告視窗中按「是」以完成關閉程序](image/install8.png) 54 | 55 | 1. 返回[Google Drive主頁](https://drive.google.com/),可以看到已新增了一個「stable-diffusion-webui-colab」的目錄,表示已安裝好了Stable Diffusion WebUI軟體。日後執行本軟體時均會使用「stable-diffusion-webui-colab」目錄裏的檔案,所以切勿移動本目錄,也不要更改它的名字。另外可以看到,現在已經使用了超過8 GB的空間,佔用了超過一半的免費空間。
![完成安裝步驟後,會在Google Drive裏出現「stable-diffusion-webui-colab」目錄](image/install9.png)
56 | ⚠️注意⚠️
安裝程式預設不會安裝ControlNet(用來控制人物姿勢的插件)。如果同時安裝ControlNet v1.1,耗用的空間會暴增至12 GB以上。 57 | 58 | 現在完成了第一部份,跟著我們看看如何打開軟體使用Stable Diffusion WebUI。 59 | 60 | ## 初次使用Stable Diffusion WebUI 61 | 62 | 我們下面使用的Stable Diffusion WebUI是英文介面,可是就算感到英語能力有點不足,也不用擔心,之後我會簡單介紹網頁裏各項目的意義。反而使用軟體繪圖時所撰寫的提示詞,要求的英語能力比較高,但是我們還是可以透過參考其他人寫好的提示詞,以及使用線上翻譯、ChatGPT等方法,寫出一些合乎自己所需的提示詞,說到底,繪畫最重要的是創意,不管使用什麼方法和工具。 63 | 64 | ### 已把Stable Diffusion WebUI的所需檔案安裝到Google Drive裏之使用方法 65 | 66 | 1. 現在返回Stable Diffusion WebUI項目的[分支頁](https://github.com/camenduru/stable-diffusion-webui-colab/tree/drive#-install-the-webui-colab-to-google-drive),按第二列的[![Open In Colab](https://user-images.githubusercontent.com/54370274/224839804-50c0c18b-3960-4a1c-b7fa-3c7074b11779.svg)](https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/drive/run.ipynb),以在Google Colab中開啟run.ipynb檔案。 67 | 68 | 1. 這時也可以把run.ipynb檔案儲存到自己的Google Drive之中,以便日後使用。由於每次啟動本軟體都要使用本檔案,所以最好還是儲存下來,放在方便自己找到的地方。 69 | 70 | 1. 準備好run.ipynb檔案之後,便可以按一下程式碼儲存格左上角的播放鍵,儲存格內的程式碼便會開始執行。
![在Google Colab中執行程式碼](image/run1.png) 71 |
⚠️注意⚠️:免費帳戶的使用者會收到執行禁用程式碼的警告,該警告表示,軟體於執行期間,虛擬機會隨時關閉,所有紀錄會消失(已存放到Google Drive中的圖片不受影響) 72 |
![免費帳戶的使用者會收到執行禁用程式碼的警告,請按「仍要繼續」以執行程式](image/disallowedWarning.png) 73 | 74 | 1. 由於執行程式要讀寫Google Drive中的「stable-diffusion-webui-colab」目錄,所以必須允許程式取得Google Drive的讀寫權限。這和之前安裝的過程相近,不再贅敘,如果忘記了該怎樣做的話,請參看上一節第8至10步。 75 | 76 | 1. 完成授權之後,程式便會繼續執行,開始初始化程序和檢查、安裝更新,並從Cloudflare Tunnel取得臨時網址,以便透過瀏覽器介面操作Google Colab的虛擬機裏的軟體,請耐心等候約十分鐘。
![正在Google Colab中執行程式碼](image/run2.png) 77 | 78 | 1. 當訊息輸出方框出現「Public WebUI Colab URL:」和網址,表示已成功啟動軟體,並取得操作軟體的臨時網址。
![程式執行成功,便可以透過顯示的臨時網址操作軟體](image/run3.png) 79 | 80 | 1. 請按一下任意一條鏈結,這時便會在新視窗中開啟Stable Diffusion WebUI的操作介面,之後所有產圖操作都可以在這個網頁裏完成
![Stable Diffusion WebUI的操作介面](image/run4.png)
81 | ⚠️注意⚠️
Stable Diffusion WebUI網頁只是操作介面,軟體實際上是在Google Colab的虛擬機裏執行,所以在使用期間,必須保持虛擬機持續運作,不可以關閉Google Colab的網頁。
現在你的虛擬機成為了一個Stable Diffusion伺服器,並打開了埠口和外界溝通,通過的就是Cloudflare Tunnel所給予的那些臨時網址,所以不要向他人透露你所得到的網址。如果在程式執行期間被他人知道網址的話,他便可以佔用你的資源和瀏覽你的圖片等。 82 | 83 | 1. 現在我們便試試叫Stable Diffusion畫一隻花貓坐在生日蛋糕後面。在正向提示詞的文字方塊裏輸入「A birthday cake is in front of a tabby cat, party, photorealistic, 8k」,其他項目的設定值維持預設值不用修改,然後按一下右方「Generate」(生成)按鈕,以命令Stable Diffusion開始繪圖。
![在左上方的正向提示詞文字方塊裏輸入自己希望在圖片中出現的東西](image/run5.png) 84 | 85 | 1. 當Stable Diffusion正在繪圖時,結果顯示框上方會顯示「Waiting」(等待)或估計剩餘時間(ETA),請耐心等候程式完成算圖。
![正在等待完成算圖](image/run6.png)
86 | 如果這時切換到Google Colab的視窗中,便可以看到虛擬機正在進行迭代運算。
![虛擬機正在進行迭代運算](image/run7.png) 87 | 88 | 1. 當Stable Diffusion完成繪圖時,會在結果顯示框中顯示生成的圖片的縮圖。
![完成算圖之後,會在結果顯示框中看到所有生成的圖片的縮圖](image/run8.png)
89 | 如果這時切換到Google Colab的視窗中,會看到「Total progress: 100%」的訊息。
![在Google Colab的視窗中顯示「Total progress: 100%」的訊息,表示生圖運算完成](image/run9.png) 90 | 91 | 1. 現在我們可以直接在Stable Diffusion WebUI的網頁裏瀏覽每張生成的圖片,只要按一下感興趣的縮圖便能選取它,它會放大顯示,並且在下方顯示所有圖片的縮圖(是次只有一幅圖片),以及本圖生成時的相關設定。
你看到的圖片和我的不同,可是流程是一樣的。
![按一下縮圖,便可以選取它,並進行各項工作](image/run10.png) 92 | 93 | 1. 如果想把選取的圖片儲存到本地電腦裏,可以按一下結果顯示框下的「Save」(儲存)按鈕,下方便會產生全尺寸的圖片的鏈結,只要按一下鏈結便能把全尺寸的圖片儲存到本機中。
![按一下「Save」(儲存)按鈕,便可以透過產生的鏈結下載全尺寸圖片](image/run11.png) 94 | 95 | 1. 如果想把選取的一張或多張圖片壓縮之後,再儲存到本地電腦裏,可以按一下結果顯示框下的「Zip」(壓縮)按鈕,程式便會把該些圖片壓縮成一個壓縮檔(Zip格式),並且在下方產生鏈結,只要按一下鏈結便能把壓縮檔儲存到本機中。
![按一下「Zip」(壓縮)按鈕,便可以透過生成的鏈結圖片的壓縮檔](image/run12.png) 96 | 97 | 1. 如果按一下放大圖,可以進入預覽窗格,左上角會有三個按鈕,從左至右分別是「圖片縮放切換」、「平鋪圖片預覽」和「儲存圖片」按鈕,其中「儲存圖片」按鈕不能使用。按左側和右側的箭頭可以移到上一張和下一張圖片;按右上角的交叉按鈕,或者按鈕以外的地方,便能離開預覽窗格。
![預覽窗格裏各項功能的圖解](image/run13.png) 98 | 99 | 1. 除了可以在網頁介面瀏覽圖片和下載心儀的圖片檔案外,還可以轉到Google Drive裏瀏覽圖片。開啟[Google Drive頁面](https://drive.google.com/),順序移到【stable-diffusion-webui-colab】→【stable-diffusion-webui】→【outputs】→【txt2img-images】→【[今天日期]】這個目錄裏,裏面存放了所有在今天生成的圖片檔案。
100 | ![在Google Drive中瀏覽Stable Diffusion所生成的圖片](image/imagePath.png) 101 | 102 | 1. 恭喜你,現在已經學會了要如何透過Stable Diffusion WebUI使用Stable Diffusion生成圖片,記得使用完本軟體之後,要像之前安裝軟體時一樣,把虛擬機關掉,以釋放佔用的資源給其他人使用。記住,就算是在使用免費版本,也不要佔用著共用資源空轉,更何況本軟體使用更寶貴的圖形處理器(GPU)資源。如果長時間佔用圖形處理器資源,Google Colab可能會限制該帳戶之後的使用情況。
![為己為人,記得長時間不使用虛擬機的時候,把虛擬機關掉釋放資源](image/run14.png)
⚠️注意⚠️
關閉虛擬機之後,所有安裝到虛擬機之中的程式和虛擬機的狀態皆會清除(付費帳會可以選擇保留虛擬機狀態之後再用),因此如果只是要停止Stable Diffusion WebUI軟體,以便進行其他工作,譬如想在虛擬機裏安裝新的Checkpoint模型,請按執行程式中的儲存格左上角的暫停(即剛才的播放鍵,現在變成暫停鍵),然後便可以修改、新增或執行所需程式。
![如果想在現時的虛擬機裏執行其他程式或工作,必須先停掉現正執行的程式,按一下該儲存格左上角的暫停鍵便可以了](image/run15.png) 103 | 104 | ### 未安裝檔案到Google Drive裏之使用方法 105 | 106 | 如果因為Google Drive空間的問題,或者純粹想在安裝某Checkpoint模型之前,先體驗其效果後才決定要否安裝該模型,均可以使用本方法來執行Stable Diffusion WebUI。當然,本方法並非不用下載和安裝軟體,而是所有檔案和軟體都只會儲存在Google Colab的虛擬機中,一旦把虛擬機關閉之後,所有檔案包括繪圖成果,均會全部清除,不留痕跡。當然如果使用期間生成了心儀的圖片,還是有辦法把它放到安全的地方保存下來。 107 | 108 | ⚠️注意⚠️
Google Colab的官方推特在二零二三年四月二十一日提及[Google Colab無法負擔免費帳戶使用Stable Diffusion](https://twitter.com/thechrisperry/status/1649189902079381505),所以如果使用免費Google Colab帳戶的話,請自行衡量軟體在使用期間中斷,正在運算的資料流失,甚至被禁用的風險。如要購買付費Colab項目,可以到[這條鏈結選購](https://colab.research.google.com/signup)。 109 | 110 | 1. 為使之後的安裝過程順利,可以先[登入Google帳戶](https://accounts.google.com/),並開啟[Google Drive頁面](https://drive.google.com/)。 111 | 112 | 1. 移到camenduru的Stable Diffusion WebUI項目的[存儲庫主頁](https://github.com/camenduru/stable-diffusion-webui-colab/)內,捲動到[Colab](https://github.com/camenduru/stable-diffusion-webui-colab/tree/main#-colab)一節下,該處列出了使用不同Checkpoint模型的Google Colab檔案。 113 | - 列表裏最後一行是該Google Colab檔案所執行的Stable Diffusion WebUI內含了什麼Checkpoint模型,並且可以按下鏈結前往說明頁查看詳情。 114 | - 第一行(lite行)下的檔案啟動Stable Diffusion WebUI輕盈版,表示所執行的是穩定的WebUI和擴充插件,但不含ControlNet v1.1; 115 | - 第二行(stable行)下的檔案啟動Stable Diffusion WebUI穩定版,表示所執行的是穩定的WebUI和擴充插件,並包含ControlNet v1.1; 116 | - 第三行(nightly行)下的檔案啟動最新的PyTorch 2.0訓練系統的Stable Diffusion WebUI搶鮮版,使用的是最新近的WebUI和每天更新的擴充插件庫,並包含ControlNet v1.1。
![Colab下的安裝選項](image/run15.png) 117 | 118 | 1. 一般初學者只要使用Stable Diffusion WebUI輕盈版便足夠,這樣可以減少安裝和開啟軟體所需的時間。只有當需要使用ControlNet功能(用來控制人物姿勢)時,才需要安裝穩定版。下面我會以stable_diffusion_1_5_webui_colab輕盈版為安裝示範,其他版本的安裝方法大同小異。 119 | 120 | 1. 捲動Stable Diffusion WebUI網頁往下方,直至看到列表最右行裏出現「stable_diffusion_1_5_webui_colab」字樣,我會以這個最基本最常用的Checkpoint模型為例子,示範如何安裝。按一下該列第一行的[![以在Google Colab中開啟輕盈版](https://user-images.githubusercontent.com/54370274/224839806-8720fb19-9c7d-46a2-8d7c-de3afb39c11f.svg)](https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/main/lite/stable_diffusion_1_5_webui_colab.ipynb),以在Google Colab中開啟stable_diffusion_1_5_webui_colab.ipynb檔。 121 | 122 | 1. 這時可以把stable_diffusion_1_5_webui_colab.ipynb儲存到自己的Google Drive之中,以便之後使用。如要儲存檔案,可以用滑鼠按一下選單列左側的【檔案】→【在雲硬碟中儲存複本】:(圖片是install.ipynb,但是做法沒有分別)
123 | ![在Google Colab中儲存複本](image/saveAs.png)
124 | ![儲存在Google Drive裏的複本](image/colabCopy.png)
125 | 儲存複本之後,若果有修改都會記錄下來,日後便可以再用,但是就算沒有儲存複本,還是可以進行安裝的。無論有沒有把複本儲存起來,後面的步驟均相同,但如果沒有儲存複本的話,每次都要回到Stable Diffusion WebUI項目的[存儲庫主頁](https://github.com/camenduru/stable-diffusion-webui-colab/)才能夠安裝和開啟軟體。 126 | 127 | 1. 準備好stable_diffusion_1_5_webui_colab.ipynb之後,便可以按一下程式碼儲存格左上角的播放鍵,儲存格內的程式碼便會開始執行。
128 | ![在Google Colab中執行程式碼](image/run17.png) 129 | - ⚠️如果未把複本儲存到自己的Google Drive裏,會出現警告視窗,請按「仍要執行」以繼續執行程式。
![未把複本儲存到自己的Google Drive裏出現的警告視窗,按「仍要執行」以繼續執行程式](image/run18.png) 130 | 131 | 1. 由於要下載和安裝軟體檔案,並且初始化軟體,還要從Cloudflare Tunnel取得臨時網址,以便透過瀏覽器介面操作Google Colab的虛擬機裏的軟體,過程繁複,請耐心等候約十分鐘。
![正在Google Colab中執行程式碼](image/run19.png) 132 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-ShareAlike 4.0 International Public 58 | License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-ShareAlike 4.0 International Public License ("Public 63 | License"). To the extent this Public License may be interpreted as a 64 | contract, You are granted the Licensed Rights in consideration of Your 65 | acceptance of these terms and conditions, and the Licensor grants You 66 | such rights in consideration of benefits the Licensor receives from 67 | making the Licensed Material available under these terms and 68 | conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. Share means to provide material to the public by any means or 126 | process that requires permission under the Licensed Rights, such 127 | as reproduction, public display, public performance, distribution, 128 | dissemination, communication, or importation, and to make material 129 | available to the public including in ways that members of the 130 | public may access the material from a place and at a time 131 | individually chosen by them. 132 | 133 | l. Sui Generis Database Rights means rights other than copyright 134 | resulting from Directive 96/9/EC of the European Parliament and of 135 | the Council of 11 March 1996 on the legal protection of databases, 136 | as amended and/or succeeded, as well as other essentially 137 | equivalent rights anywhere in the world. 138 | 139 | m. You means the individual or entity exercising the Licensed Rights 140 | under this Public License. Your has a corresponding meaning. 141 | 142 | 143 | Section 2 -- Scope. 144 | 145 | a. License grant. 146 | 147 | 1. Subject to the terms and conditions of this Public License, 148 | the Licensor hereby grants You a worldwide, royalty-free, 149 | non-sublicensable, non-exclusive, irrevocable license to 150 | exercise the Licensed Rights in the Licensed Material to: 151 | 152 | a. reproduce and Share the Licensed Material, in whole or 153 | in part; and 154 | 155 | b. produce, reproduce, and Share Adapted Material. 156 | 157 | 2. Exceptions and Limitations. For the avoidance of doubt, where 158 | Exceptions and Limitations apply to Your use, this Public 159 | License does not apply, and You do not need to comply with 160 | its terms and conditions. 161 | 162 | 3. Term. The term of this Public License is specified in Section 163 | 6(a). 164 | 165 | 4. Media and formats; technical modifications allowed. The 166 | Licensor authorizes You to exercise the Licensed Rights in 167 | all media and formats whether now known or hereafter created, 168 | and to make technical modifications necessary to do so. The 169 | Licensor waives and/or agrees not to assert any right or 170 | authority to forbid You from making technical modifications 171 | necessary to exercise the Licensed Rights, including 172 | technical modifications necessary to circumvent Effective 173 | Technological Measures. For purposes of this Public License, 174 | simply making modifications authorized by this Section 2(a) 175 | (4) never produces Adapted Material. 176 | 177 | 5. Downstream recipients. 178 | 179 | a. Offer from the Licensor -- Licensed Material. Every 180 | recipient of the Licensed Material automatically 181 | receives an offer from the Licensor to exercise the 182 | Licensed Rights under the terms and conditions of this 183 | Public License. 184 | 185 | b. Additional offer from the Licensor -- Adapted Material. 186 | Every recipient of Adapted Material from You 187 | automatically receives an offer from the Licensor to 188 | exercise the Licensed Rights in the Adapted Material 189 | under the conditions of the Adapter's License You apply. 190 | 191 | c. No downstream restrictions. You may not offer or impose 192 | any additional or different terms or conditions on, or 193 | apply any Effective Technological Measures to, the 194 | Licensed Material if doing so restricts exercise of the 195 | Licensed Rights by any recipient of the Licensed 196 | Material. 197 | 198 | 6. No endorsement. Nothing in this Public License constitutes or 199 | may be construed as permission to assert or imply that You 200 | are, or that Your use of the Licensed Material is, connected 201 | with, or sponsored, endorsed, or granted official status by, 202 | the Licensor or others designated to receive attribution as 203 | provided in Section 3(a)(1)(A)(i). 204 | 205 | b. Other rights. 206 | 207 | 1. Moral rights, such as the right of integrity, are not 208 | licensed under this Public License, nor are publicity, 209 | privacy, and/or other similar personality rights; however, to 210 | the extent possible, the Licensor waives and/or agrees not to 211 | assert any such rights held by the Licensor to the limited 212 | extent necessary to allow You to exercise the Licensed 213 | Rights, but not otherwise. 214 | 215 | 2. Patent and trademark rights are not licensed under this 216 | Public License. 217 | 218 | 3. To the extent possible, the Licensor waives any right to 219 | collect royalties from You for the exercise of the Licensed 220 | Rights, whether directly or through a collecting society 221 | under any voluntary or waivable statutory or compulsory 222 | licensing scheme. In all other cases the Licensor expressly 223 | reserves any right to collect such royalties. 224 | 225 | 226 | Section 3 -- License Conditions. 227 | 228 | Your exercise of the Licensed Rights is expressly made subject to the 229 | following conditions. 230 | 231 | a. Attribution. 232 | 233 | 1. If You Share the Licensed Material (including in modified 234 | form), You must: 235 | 236 | a. retain the following if it is supplied by the Licensor 237 | with the Licensed Material: 238 | 239 | i. identification of the creator(s) of the Licensed 240 | Material and any others designated to receive 241 | attribution, in any reasonable manner requested by 242 | the Licensor (including by pseudonym if 243 | designated); 244 | 245 | ii. a copyright notice; 246 | 247 | iii. a notice that refers to this Public License; 248 | 249 | iv. a notice that refers to the disclaimer of 250 | warranties; 251 | 252 | v. a URI or hyperlink to the Licensed Material to the 253 | extent reasonably practicable; 254 | 255 | b. indicate if You modified the Licensed Material and 256 | retain an indication of any previous modifications; and 257 | 258 | c. indicate the Licensed Material is licensed under this 259 | Public License, and include the text of, or the URI or 260 | hyperlink to, this Public License. 261 | 262 | 2. You may satisfy the conditions in Section 3(a)(1) in any 263 | reasonable manner based on the medium, means, and context in 264 | which You Share the Licensed Material. For example, it may be 265 | reasonable to satisfy the conditions by providing a URI or 266 | hyperlink to a resource that includes the required 267 | information. 268 | 269 | 3. If requested by the Licensor, You must remove any of the 270 | information required by Section 3(a)(1)(A) to the extent 271 | reasonably practicable. 272 | 273 | b. ShareAlike. 274 | 275 | In addition to the conditions in Section 3(a), if You Share 276 | Adapted Material You produce, the following conditions also apply. 277 | 278 | 1. The Adapter's License You apply must be a Creative Commons 279 | license with the same License Elements, this version or 280 | later, or a BY-SA Compatible License. 281 | 282 | 2. You must include the text of, or the URI or hyperlink to, the 283 | Adapter's License You apply. You may satisfy this condition 284 | in any reasonable manner based on the medium, means, and 285 | context in which You Share Adapted Material. 286 | 287 | 3. You may not offer or impose any additional or different terms 288 | or conditions on, or apply any Effective Technological 289 | Measures to, Adapted Material that restrict exercise of the 290 | rights granted under the Adapter's License You apply. 291 | 292 | 293 | Section 4 -- Sui Generis Database Rights. 294 | 295 | Where the Licensed Rights include Sui Generis Database Rights that 296 | apply to Your use of the Licensed Material: 297 | 298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 299 | to extract, reuse, reproduce, and Share all or a substantial 300 | portion of the contents of the database; 301 | 302 | b. if You include all or a substantial portion of the database 303 | contents in a database in which You have Sui Generis Database 304 | Rights, then the database in which You have Sui Generis Database 305 | Rights (but not its individual contents) is Adapted Material, 306 | including for purposes of Section 3(b); and 307 | 308 | c. You must comply with the conditions in Section 3(a) if You Share 309 | all or a substantial portion of the contents of the database. 310 | 311 | For the avoidance of doubt, this Section 4 supplements and does not 312 | replace Your obligations under this Public License where the Licensed 313 | Rights include other Copyright and Similar Rights. 314 | 315 | 316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 317 | 318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 328 | 329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 338 | 339 | c. The disclaimer of warranties and limitation of liability provided 340 | above shall be interpreted in a manner that, to the extent 341 | possible, most closely approximates an absolute disclaimer and 342 | waiver of all liability. 343 | 344 | 345 | Section 6 -- Term and Termination. 346 | 347 | a. This Public License applies for the term of the Copyright and 348 | Similar Rights licensed here. However, if You fail to comply with 349 | this Public License, then Your rights under this Public License 350 | terminate automatically. 351 | 352 | b. Where Your right to use the Licensed Material has terminated under 353 | Section 6(a), it reinstates: 354 | 355 | 1. automatically as of the date the violation is cured, provided 356 | it is cured within 30 days of Your discovery of the 357 | violation; or 358 | 359 | 2. upon express reinstatement by the Licensor. 360 | 361 | For the avoidance of doubt, this Section 6(b) does not affect any 362 | right the Licensor may have to seek remedies for Your violations 363 | of this Public License. 364 | 365 | c. For the avoidance of doubt, the Licensor may also offer the 366 | Licensed Material under separate terms or conditions or stop 367 | distributing the Licensed Material at any time; however, doing so 368 | will not terminate this Public License. 369 | 370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 371 | License. 372 | 373 | 374 | Section 7 -- Other Terms and Conditions. 375 | 376 | a. The Licensor shall not be bound by any additional or different 377 | terms or conditions communicated by You unless expressly agreed. 378 | 379 | b. Any arrangements, understandings, or agreements regarding the 380 | Licensed Material not stated herein are separate from and 381 | independent of the terms and conditions of this Public License. 382 | 383 | 384 | Section 8 -- Interpretation. 385 | 386 | a. For the avoidance of doubt, this Public License does not, and 387 | shall not be interpreted to, reduce, limit, restrict, or impose 388 | conditions on any use of the Licensed Material that could lawfully 389 | be made without permission under this Public License. 390 | 391 | b. To the extent possible, if any provision of this Public License is 392 | deemed unenforceable, it shall be automatically reformed to the 393 | minimum extent necessary to make it enforceable. If the provision 394 | cannot be reformed, it shall be severed from this Public License 395 | without affecting the enforceability of the remaining terms and 396 | conditions. 397 | 398 | c. No term or condition of this Public License will be waived and no 399 | failure to comply consented to unless expressly agreed to by the 400 | Licensor. 401 | 402 | d. Nothing in this Public License constitutes or may be interpreted 403 | as a limitation upon, or waiver of, any privileges and immunities 404 | that apply to the Licensor or You, including from the legal 405 | processes of any jurisdiction or authority. 406 | 407 | 408 | ======================================================================= 409 | 410 | Creative Commons is not a party to its public licenses. 411 | Notwithstanding, Creative Commons may elect to apply one of its public 412 | licenses to material it publishes and in those instances will be 413 | considered the “Licensor.” The text of the Creative Commons public 414 | licenses is dedicated to the public domain under the CC0 Public Domain 415 | Dedication. Except for the limited purpose of indicating that material 416 | is shared under a Creative Commons public license or as otherwise 417 | permitted by the Creative Commons policies published at 418 | creativecommons.org/policies, Creative Commons does not authorize the 419 | use of the trademark "Creative Commons" or any other trademark or logo 420 | of Creative Commons without its prior written consent including, 421 | without limitation, in connection with any unauthorized modifications 422 | to any of its public licenses or any other arrangements, 423 | understandings, or agreements concerning use of licensed material. For 424 | the avoidance of doubt, this paragraph does not form part of the public 425 | licenses. 426 | 427 | Creative Commons may be contacted at creativecommons.org. 428 | -------------------------------------------------------------------------------- /image/LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-ShareAlike 4.0 International Public 58 | License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-ShareAlike 4.0 International Public License ("Public 63 | License"). To the extent this Public License may be interpreted as a 64 | contract, You are granted the Licensed Rights in consideration of Your 65 | acceptance of these terms and conditions, and the Licensor grants You 66 | such rights in consideration of benefits the Licensor receives from 67 | making the Licensed Material available under these terms and 68 | conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. Share means to provide material to the public by any means or 126 | process that requires permission under the Licensed Rights, such 127 | as reproduction, public display, public performance, distribution, 128 | dissemination, communication, or importation, and to make material 129 | available to the public including in ways that members of the 130 | public may access the material from a place and at a time 131 | individually chosen by them. 132 | 133 | l. Sui Generis Database Rights means rights other than copyright 134 | resulting from Directive 96/9/EC of the European Parliament and of 135 | the Council of 11 March 1996 on the legal protection of databases, 136 | as amended and/or succeeded, as well as other essentially 137 | equivalent rights anywhere in the world. 138 | 139 | m. You means the individual or entity exercising the Licensed Rights 140 | under this Public License. Your has a corresponding meaning. 141 | 142 | 143 | Section 2 -- Scope. 144 | 145 | a. License grant. 146 | 147 | 1. Subject to the terms and conditions of this Public License, 148 | the Licensor hereby grants You a worldwide, royalty-free, 149 | non-sublicensable, non-exclusive, irrevocable license to 150 | exercise the Licensed Rights in the Licensed Material to: 151 | 152 | a. reproduce and Share the Licensed Material, in whole or 153 | in part; and 154 | 155 | b. produce, reproduce, and Share Adapted Material. 156 | 157 | 2. Exceptions and Limitations. For the avoidance of doubt, where 158 | Exceptions and Limitations apply to Your use, this Public 159 | License does not apply, and You do not need to comply with 160 | its terms and conditions. 161 | 162 | 3. Term. The term of this Public License is specified in Section 163 | 6(a). 164 | 165 | 4. Media and formats; technical modifications allowed. The 166 | Licensor authorizes You to exercise the Licensed Rights in 167 | all media and formats whether now known or hereafter created, 168 | and to make technical modifications necessary to do so. The 169 | Licensor waives and/or agrees not to assert any right or 170 | authority to forbid You from making technical modifications 171 | necessary to exercise the Licensed Rights, including 172 | technical modifications necessary to circumvent Effective 173 | Technological Measures. For purposes of this Public License, 174 | simply making modifications authorized by this Section 2(a) 175 | (4) never produces Adapted Material. 176 | 177 | 5. Downstream recipients. 178 | 179 | a. Offer from the Licensor -- Licensed Material. Every 180 | recipient of the Licensed Material automatically 181 | receives an offer from the Licensor to exercise the 182 | Licensed Rights under the terms and conditions of this 183 | Public License. 184 | 185 | b. Additional offer from the Licensor -- Adapted Material. 186 | Every recipient of Adapted Material from You 187 | automatically receives an offer from the Licensor to 188 | exercise the Licensed Rights in the Adapted Material 189 | under the conditions of the Adapter's License You apply. 190 | 191 | c. No downstream restrictions. You may not offer or impose 192 | any additional or different terms or conditions on, or 193 | apply any Effective Technological Measures to, the 194 | Licensed Material if doing so restricts exercise of the 195 | Licensed Rights by any recipient of the Licensed 196 | Material. 197 | 198 | 6. No endorsement. Nothing in this Public License constitutes or 199 | may be construed as permission to assert or imply that You 200 | are, or that Your use of the Licensed Material is, connected 201 | with, or sponsored, endorsed, or granted official status by, 202 | the Licensor or others designated to receive attribution as 203 | provided in Section 3(a)(1)(A)(i). 204 | 205 | b. Other rights. 206 | 207 | 1. Moral rights, such as the right of integrity, are not 208 | licensed under this Public License, nor are publicity, 209 | privacy, and/or other similar personality rights; however, to 210 | the extent possible, the Licensor waives and/or agrees not to 211 | assert any such rights held by the Licensor to the limited 212 | extent necessary to allow You to exercise the Licensed 213 | Rights, but not otherwise. 214 | 215 | 2. Patent and trademark rights are not licensed under this 216 | Public License. 217 | 218 | 3. To the extent possible, the Licensor waives any right to 219 | collect royalties from You for the exercise of the Licensed 220 | Rights, whether directly or through a collecting society 221 | under any voluntary or waivable statutory or compulsory 222 | licensing scheme. In all other cases the Licensor expressly 223 | reserves any right to collect such royalties. 224 | 225 | 226 | Section 3 -- License Conditions. 227 | 228 | Your exercise of the Licensed Rights is expressly made subject to the 229 | following conditions. 230 | 231 | a. Attribution. 232 | 233 | 1. If You Share the Licensed Material (including in modified 234 | form), You must: 235 | 236 | a. retain the following if it is supplied by the Licensor 237 | with the Licensed Material: 238 | 239 | i. identification of the creator(s) of the Licensed 240 | Material and any others designated to receive 241 | attribution, in any reasonable manner requested by 242 | the Licensor (including by pseudonym if 243 | designated); 244 | 245 | ii. a copyright notice; 246 | 247 | iii. a notice that refers to this Public License; 248 | 249 | iv. a notice that refers to the disclaimer of 250 | warranties; 251 | 252 | v. a URI or hyperlink to the Licensed Material to the 253 | extent reasonably practicable; 254 | 255 | b. indicate if You modified the Licensed Material and 256 | retain an indication of any previous modifications; and 257 | 258 | c. indicate the Licensed Material is licensed under this 259 | Public License, and include the text of, or the URI or 260 | hyperlink to, this Public License. 261 | 262 | 2. You may satisfy the conditions in Section 3(a)(1) in any 263 | reasonable manner based on the medium, means, and context in 264 | which You Share the Licensed Material. For example, it may be 265 | reasonable to satisfy the conditions by providing a URI or 266 | hyperlink to a resource that includes the required 267 | information. 268 | 269 | 3. If requested by the Licensor, You must remove any of the 270 | information required by Section 3(a)(1)(A) to the extent 271 | reasonably practicable. 272 | 273 | b. ShareAlike. 274 | 275 | In addition to the conditions in Section 3(a), if You Share 276 | Adapted Material You produce, the following conditions also apply. 277 | 278 | 1. The Adapter's License You apply must be a Creative Commons 279 | license with the same License Elements, this version or 280 | later, or a BY-SA Compatible License. 281 | 282 | 2. You must include the text of, or the URI or hyperlink to, the 283 | Adapter's License You apply. You may satisfy this condition 284 | in any reasonable manner based on the medium, means, and 285 | context in which You Share Adapted Material. 286 | 287 | 3. You may not offer or impose any additional or different terms 288 | or conditions on, or apply any Effective Technological 289 | Measures to, Adapted Material that restrict exercise of the 290 | rights granted under the Adapter's License You apply. 291 | 292 | 293 | Section 4 -- Sui Generis Database Rights. 294 | 295 | Where the Licensed Rights include Sui Generis Database Rights that 296 | apply to Your use of the Licensed Material: 297 | 298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 299 | to extract, reuse, reproduce, and Share all or a substantial 300 | portion of the contents of the database; 301 | 302 | b. if You include all or a substantial portion of the database 303 | contents in a database in which You have Sui Generis Database 304 | Rights, then the database in which You have Sui Generis Database 305 | Rights (but not its individual contents) is Adapted Material, 306 | including for purposes of Section 3(b); and 307 | 308 | c. You must comply with the conditions in Section 3(a) if You Share 309 | all or a substantial portion of the contents of the database. 310 | 311 | For the avoidance of doubt, this Section 4 supplements and does not 312 | replace Your obligations under this Public License where the Licensed 313 | Rights include other Copyright and Similar Rights. 314 | 315 | 316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 317 | 318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 328 | 329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 338 | 339 | c. The disclaimer of warranties and limitation of liability provided 340 | above shall be interpreted in a manner that, to the extent 341 | possible, most closely approximates an absolute disclaimer and 342 | waiver of all liability. 343 | 344 | 345 | Section 6 -- Term and Termination. 346 | 347 | a. This Public License applies for the term of the Copyright and 348 | Similar Rights licensed here. However, if You fail to comply with 349 | this Public License, then Your rights under this Public License 350 | terminate automatically. 351 | 352 | b. Where Your right to use the Licensed Material has terminated under 353 | Section 6(a), it reinstates: 354 | 355 | 1. automatically as of the date the violation is cured, provided 356 | it is cured within 30 days of Your discovery of the 357 | violation; or 358 | 359 | 2. upon express reinstatement by the Licensor. 360 | 361 | For the avoidance of doubt, this Section 6(b) does not affect any 362 | right the Licensor may have to seek remedies for Your violations 363 | of this Public License. 364 | 365 | c. For the avoidance of doubt, the Licensor may also offer the 366 | Licensed Material under separate terms or conditions or stop 367 | distributing the Licensed Material at any time; however, doing so 368 | will not terminate this Public License. 369 | 370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 371 | License. 372 | 373 | 374 | Section 7 -- Other Terms and Conditions. 375 | 376 | a. The Licensor shall not be bound by any additional or different 377 | terms or conditions communicated by You unless expressly agreed. 378 | 379 | b. Any arrangements, understandings, or agreements regarding the 380 | Licensed Material not stated herein are separate from and 381 | independent of the terms and conditions of this Public License. 382 | 383 | 384 | Section 8 -- Interpretation. 385 | 386 | a. For the avoidance of doubt, this Public License does not, and 387 | shall not be interpreted to, reduce, limit, restrict, or impose 388 | conditions on any use of the Licensed Material that could lawfully 389 | be made without permission under this Public License. 390 | 391 | b. To the extent possible, if any provision of this Public License is 392 | deemed unenforceable, it shall be automatically reformed to the 393 | minimum extent necessary to make it enforceable. If the provision 394 | cannot be reformed, it shall be severed from this Public License 395 | without affecting the enforceability of the remaining terms and 396 | conditions. 397 | 398 | c. No term or condition of this Public License will be waived and no 399 | failure to comply consented to unless expressly agreed to by the 400 | Licensor. 401 | 402 | d. Nothing in this Public License constitutes or may be interpreted 403 | as a limitation upon, or waiver of, any privileges and immunities 404 | that apply to the Licensor or You, including from the legal 405 | processes of any jurisdiction or authority. 406 | 407 | 408 | ======================================================================= 409 | 410 | Creative Commons is not a party to its public licenses. 411 | Notwithstanding, Creative Commons may elect to apply one of its public 412 | licenses to material it publishes and in those instances will be 413 | considered the “Licensor.” The text of the Creative Commons public 414 | licenses is dedicated to the public domain under the CC0 Public Domain 415 | Dedication. Except for the limited purpose of indicating that material 416 | is shared under a Creative Commons public license or as otherwise 417 | permitted by the Creative Commons policies published at 418 | creativecommons.org/policies, Creative Commons does not authorize the 419 | use of the trademark "Creative Commons" or any other trademark or logo 420 | of Creative Commons without its prior written consent including, 421 | without limitation, in connection with any unauthorized modifications 422 | to any of its public licenses or any other arrangements, 423 | understandings, or agreements concerning use of licensed material. For 424 | the avoidance of doubt, this paragraph does not form part of the public 425 | licenses. 426 | 427 | Creative Commons may be contacted at creativecommons.org. 428 | --------------------------------------------------------------------------------