Smart Waifu圖片的產生 這邊只簡單講一下環境建置部份 我架了一個圖片產生器在AWS EC2上,程式碼在https://github.com/Ayukawayen/waifu_icon_repo (fork自Jt的專案: https://github.com/blockparty-sh/waifu_icon_repo 同樣來自StyleGAN2: https://github.com/NVlabs/stylegan2 伺服器建置方法: https://noise.cash/post/l7nz7rj7 ) 圖片產生後,後端程式會將圖片用Infura的API上傳到IPFS( https://infura.io/docs/ipfs#section/Getting-Started/Add-a-file )。 智能合約會在SmartBCH鏈上儲存圖片的hash值,從這個hash就可以產生IPFS的網址連結到圖片。 如果圖片因為太少使用被移除,你可以把你備份的圖片重新上傳到IPFS,會在同樣的網址,這樣就可以讀得到了。 (如果你沒有備份,想辦法看能不能在其他網站上找到備份檔,不然就只好自己建圖片伺服器重新產生了。) 另外如果你想在AWS EC2上自架圖片伺服器,我試過Ubuntu、Debian、CentOS,建議是用Ubuntu因為python套件安裝時的問題比較少。
Log in to join in Reading is open to everyone. Replying needs an account.
No comments yet