国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

【AI繪畫(huà)】-【fooocus】-【200+風(fēng)格測(cè)試】

2023-08-30 01:14 作者:_小師傅早  | 我要投稿

fooocus是很好的AI繪圖工具,自從裝好后畫(huà)了不少圖,都很喜歡。


希望能為每個(gè)風(fēng)格跑一張默認(rèn)的圖,跑完所有風(fēng)格,了解一下,漲漲見(jiàn)識(shí)。


于是寫(xiě)了下面一段 JS ,作用是可以控制 foocus 界面遍歷所有風(fēng)格,每個(gè)風(fēng)格畫(huà)一張圖,在控制臺(tái)簡(jiǎn)單調(diào)試了一下,可以運(yùn)行;?


```

var i = 0


style_list = document.querySelector("#component-22").querySelectorAll("input")

const observer = new MutationObserver((mutationsRecord)=>{

? ? console.log('第' + i + '次DOM元素變化;' + new Date())

? ? console.log(mutationsRecord)

? ? if (i < 0 || i >= style_list.length) {

? ? ? ? // 全部風(fēng)格都畫(huà)完了可退出監(jiān)聽(tīng)

? ? ? ? observer.disconnect()

? ? ? ? console.log('第' + i + '次;全部風(fēng)格都畫(huà)完了,退出監(jiān)聽(tīng);' + new Date())

? ? } else if (!document.querySelector("#component-10").disabled) {

? ? ? ? // 點(diǎn)擊生成按鈕

? ? ? ? document.querySelector("#component-10").click()

? ? ? ? // 游標(biāo)自增

? ? ? ? i = i + 1

? ? ? ? // 切換風(fēng)格

? ? ? ? style_list[i].parentElement.click()

? ? ? ? console.log('END style_list[i].checked = true ;第' + i + '次切換風(fēng)格' + new Date())

? ? ? ??

? ? }

}

)


observer.observe(document.querySelector("#component-10"), {

? ? attributes: true,

? ? childList: true,

? ? subtree: true

})


document.querySelector("#component-10").click()

```


效果是這樣的


可以看到每張圖的風(fēng)格字段 style 已經(jīng)不同,整個(gè)過(guò)程是自動(dòng)執(zhí)行的。


我已經(jīng)把筆記本放到空氣凈化器上開(kāi)跑了,GPU 溫度穩(wěn)在?60 度上下。



原理是監(jiān)聽(tīng)生成按鈕,如果灰變白了,說(shuō)明上一張圖畫(huà)完了,切風(fēng)格畫(huà)下一張,直到遍歷完所有的風(fēng)格后停止監(jiān)聽(tīng)。


哈哈哈哈


【AI繪畫(huà)】-【fooocus】-【200+風(fēng)格測(cè)試】的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
通州市| 合川市| 莫力| 吴桥县| 大余县| 甘孜县| 文化| 大兴区| 顺义区| 舟曲县| 江都市| 类乌齐县| 哈巴河县| 偏关县| 深州市| 岳普湖县| 汶上县| 石屏县| 鄂伦春自治旗| 平湖市| 房产| 澄城县| 新密市| 年辖:市辖区| 若羌县| 石首市| 杭锦后旗| 银川市| 蓬莱市| 信丰县| 乌兰浩特市| 手机| 宁化县| 湟中县| 莲花县| 曲靖市| 祥云县| 洛浦县| 莱芜市| 改则县| 宜章县|