Skip to content

Commit

Permalink
Merge pull request #4 from ssJSKFJDJ/master
Browse files Browse the repository at this point in the history
add whiteList to i2i.lua
  • Loading branch information
HsiangNianian committed Dec 1, 2022
2 parents 98b0bc8 + 0ef301c commit aaea7e9
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions script/i2i.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ local json = require('json')
local seed = ranint(0, 1919810)
local tab = {}
local prompt = 'masterpiece, best quality, ' .. images:gsub('%[(.*)%]', ' ')
local whlstfromGroup = { 971050440, 10086 } --白名单群
local whlstfromQQ = { 2753364619, 1712724531 } --白名单用户

tab['prompt'] = prompt
tab['width'] = 1024
Expand All @@ -27,9 +29,22 @@ tab['url'] = url
tab['sampler_index'] = 'Euler'
tab['negative_prompt'] =
'nsfw,{{{ugly}}}, {{{duplicate}}}, {{morbid}}, {{mutilated}}, {{{tranny}}}, mutated hands,{{{poorly drawn hands}}}, blurry, {{bad anatomy}},{{{bad proportions}}}, extra limbs, cloned face,{{{disfigured}}}, {{{more than 2 nipples}}}, {{{{missing arms}}}},{{{extra legs}}},mutated hands,{{{{{fused fingers}}}}}, {{{{{too many fingers}}}}}, {{{unclear eyes}}}, lowers, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality,jpeg artifacts, signature, watermark, username, blurry, bad feet, text font ui,malformed hands, long neck, missing limb,{mutated hand and finger: 1.5},{long body: 1.3},{mutation poorly drawn: 1.2}, disfigured, malformed mutated, multiple breasts, futa, yaoi, {{{{:3}}}}, {{{3d}}},sex,nipple,pussy'

local data = json.encode(tab)
sendMsg('i2i...', msg.fromGroup, msg.fromQQ)
local _, receive = http.post(api, data)
local image = '[CQ:image,file=' .. receive .. ']'
return image
for k = 1, #whlstfromGroup do
if msg.gid == whlstfromGroup[k] then
sendMsg("i2i...", msg.fromGroup, msg.fromQQ)
__, receive = http.post(api, data)
image = "[CQ:image,file=" .. receive .. "]"
return image
end
end

for k = 1, #whlstfromQQ do
if msg.uid == whlstfromQQ[k] then
sendMsg("i2i...", msg.fromGroup, msg.fromQQ)
__, receive = http.post(api, data)
image = "[CQ:image,file=" .. receive .. "]"
return image
end
end
return "你没有权限哦~"

0 comments on commit aaea7e9

Please sign in to comment.