Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 3.4 KB

2023-03-05-ai-draw.md

File metadata and controls

48 lines (36 loc) · 3.4 KB
slug title date authors tags
用 Colab 免費體驗 AI 繪圖
用 Colab 免費體驗 AI 繪圖
2023-03-05T10:00
Willis
AIGC
Tech

用 Colab 免費體驗 AI 繪圖

hackmd-github-sync-badge

您也想要自己用AI繪圖嗎?

  • 生成式AI ( AIGC ) 是2023年的顯學,開源的 AI 繪圖模型越來越多,在Civitai有非常多網友創作(需註冊,許多有年齡限制),您也想自己嘗試嗎? 網路上已經有許多自行下載執行 Python 程式與模型,但就需要自備 GPU 顯卡。
  • 有網友在此 GitHub 整理諸多 AIGC 模型,而且可以用 Colab 直接產圖, Colab 是個可以免費暫時執行 GPU 運算的虛擬機,可執行 Python 及 Linux指令,您唯一要付出的是等待時間,一起來製作香香的圖吧。

在這個範例,您只要兩個步驟就可以完成囉:

  1. 打開以下 Colab ,一鍵執行以下程式碼,程式跑完會出現3個連結,點選第2個連結會開啟新分頁,是生圖的 UI 介面。
  2. 在介面新介面的 Text2Img 有兩個文字框,可以輸入以下兩個正向、負向語詞(Prompt),
    • 正面語詞
      8k, RAW photo, best quality, masterpiece:1.2), (realistic, photo-realistic:1.4), ultra-detailed, (Kpop idol),perfect detail ,  looking at viewer,make up,
      
    • 負面語詞
      paintings,sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, bad anatomy,(long hair:1.4),DeepNegative,(fat:1.2),facing away, looking away,tilted head, {Multiple people}, lowres,bad anatomy,bad hands, text, error, missing fingers,extra digit, fewer digits, cropped, worstquality, low quality, normal quality,jpegartifacts,signature, watermark, username,blurry,bad feet,cropped,poorly drawn hands,poorly drawn face,mutation,deformed,worst quality,low quality,normal quality,jpeg artifacts,signature,watermark,extra fingers,fewer digits,extra limbs,extra arms,extra legs,malformed limbs,fused fingers,too many fingers,long neck,cross-eyed,mutated hands,polar lowres,bad body,bad proportions,gross proportions,text,error,missing fingers,missing arms,missing legs,extra digit, extra arms, extra leg, extra foot,
      
  • 還可以img2img繼續生圖

Colab 遏阻了腳本指令濫用

  • 鑒於越來越多人使用 Colab 跑 stable-diffusion,已經對前述 WebUI 的腳本操作封鎖,您可以有限制的使用或付費,但最好的情況是自行下載在自己的電腦跑,如果電腦運算資源夠的話。
  • 相信未來會有更適當的做法,像是 Bing 可以直接以文字繪圖(模型是 OpenAI 的 Dell.E),或者使用 Leonardo.ai 就可以做出驚人的效果。

參考