提交 2b7f419e 编写于 作者: 杨龙伟

update:更换一批模版

上级 a6ae5915
......@@ -20,7 +20,6 @@ import { defineComponent, ref } from 'vue';
import aiHeader from './components/ai-header.vue';
import aiSider from './components/ai-sider.vue';
import request from '@/api/sd';
import defaultImage from '@/assets/label/default.png';
export default defineComponent({
name: 'App',
......@@ -29,12 +28,12 @@ export default defineComponent({
aiSider
},
setup () {
const image = ref(defaultImage)
const image = ref('/img/default.png')
const getSdData = (item)=> {
console.log('request gpt data ...')
return request.gpt(item.prompt).then(res => {
console.log('request sd data...')
return request.draw({}, item.prompt, item.negative_prompt).then(res => {
console.log('request sd data...',item)
return request.draw(item).then(res => {
if (res) image.value = res;
return res;
})
......
......@@ -4,22 +4,24 @@ export const apiKey = process.env.INSCODE_API_KEY;
export const apiUrl = 'https://inscode-api.csdn.net/api/v1/gpt/';
export default {
draw (config, prompt, negative_prompt) {
draw (config) {
return new Promise(function(resolve,rejcet){
const data = {
prompt: prompt,
prompt: config.prompt,
steps: config?.steps??20,
negative_prompt: negative_prompt??'nsfw',
negative_prompt: config.negative_prompt??'nsfw',
width: config?.width??512,
height: config?.height??512,
cfg_scale: config?.cfg_scale??6,
seed : config?.seed??-1,
sampler_name: config?.sampler_name??"DPM++ SDE Karras"
cfg_scale: config.cfg_scale??6,
seed : config.seed??-1,
sampler_name: config.sampler_name??"DPM++ SDE Karras",
sd_model_checkpoint:config.sd_model_checkpoint??"chilloutmix_NiPrunedFp32Fix"
}
const headers = {
'content-type': 'application/json'
};
let api = 'https://gpu-pod659f8b38499a1c2067e69973-6006.node.inscode.run/sdapi/v1/txt2img'
let api = 'https://gpu-pod65a740489791404c18103243-6006.node.inscode.run/sdapi/v1/txt2img'
console.log('sd data',data)
axios.post(api, data, { headers }).then(response => {
if (response.status === 200 && response?.data?.images){
const image = response?.data?.images[0]
......
......@@ -37,12 +37,6 @@
</template>
<script>
import { defineComponent, onMounted, reactive } from 'vue';
import image0 from '@/assets/label/00.png';
import image1 from '@/assets/label/01.png';
import image2 from '@/assets/label/02.png';
import image3 from '@/assets/label/03.png';
import image4 from '@/assets/label/04.png';
import image5 from '@/assets/label/05.png';
export default defineComponent({
name: 'aiSider',
emits: ['submit', 'error'],
......@@ -64,54 +58,77 @@
'label':'重置',
'prompt':'',
'negative_prompt':'',
'image': image0
'image': '/img/00.png',
},
{
'label':'机甲战士',
'prompt':'Metal armor, metallic texture, solo, 1boy, science fiction, male focus, power armor, humanoid robot, robot, blurry, blurry background, city, helmet',
'negative_prompt':'FastNegativeV2,(bad-artist:1),(worst quality, low quality:1.4),(bad_prompt_version2:0.8),bad-hands-5,lowres,bad anatomy,bad hands,((text)),(watermark),error,missing fingers,extra digit,fewer digits,cropped,worst quality,low quality,normal quality,((username)),blurry,(extra limbs),bad-artist-anime,badhandv4,EasyNegative,ng_deepnegative_v1_75t,verybadimagenegative_v1.3,BadDream,(three hands:1.6),(three legs:1.2),(more than two hands:1.4),(more than two legs,:1.2),1abel,',
'image': image3
'label':'二次元少女',
'prompt':'(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), (1girl:1.3), extremely detailed,(fractal art:1.1),(colorful:1.1)(flowers:1.3),highest detailed,(zentangle:1.2), (dynamic pose), (abstract background:1.3), (many colors:1.4), ,(earrings), (feathers:1.5)',
'negative_prompt':'(worst quality, low quality:2), NSFW,monochrome, zombie,overexposure, watermark,text,bad anatomy,bad hand,extra hands,extra fingers,too many fingers,fused fingers,bad arm,distorted arm,extra arms,fused arms,extra legs,missing leg,disembodied leg,extra nipples, detached arm, liquid hand,inverted hand,disembodied limb, oversized head,extra body,extra navel,easynegative,(hair between eyes),sketch, duplicate, ugly, huge eyes, text, logo, worst face, (bad and mutated hands:1.3), (blurry:2.0), horror, geometry, bad_prompt, (bad hands), (missing fingers), multiple limbs, bad anatomy, (interlocked fingers:1.2), Ugly Fingers, (extra digit and hands and fingers and legs and arms:1.4), (deformed fingers:1.2), (long fingers:1.2),(bad-artist-anime), bad-artist, bad hand, extra legs ,(ng_deepnegative_v1_75t)',
'image': '/img/01.png',
'seed':3839976427,
"sampler_name": "DPM++ SDE Karras",
'sd_model_checkpoint':'ghostmix_v11'
},
{
'label':'汉服',
'prompt':'1woman,handsome,high quality,long hair,dark hair,chinese clothes,photorealistic,realistic,photography,masterpiece,best quality,ultra-detailed,1man,looking at viewer,solo,handsome face,pony tail,hanfu,gufeng,black and white hanfu,bamboo,bamboo leaf on clothes,bamboo pattern hanfu,hanfu,(bamboo:1.2)',
'negative_prompt':'(worst quality, low quality:1.4),(depth of field, blurry:1.2),(greyscale, monochrome:1.1),3D face,cropped,lowres,text,(nsfw:1.3),(worst quality:2),(low quality:2),(normal quality:2),normal quality,((grayscale)),skin spots,acnes,skin blemishes,age spot,(ugly:1.331),(duplicate:1.331),(morbid:1.21),(mutilated:1.21),(tranny:1.331),mutated hands,(poorly drawn hands:1.5),blurry,(bad anatomy:1.21),(bad proportions:1.331),extra limbs,(disfigured:1.331),(missing arms:1.331),(extra legs:1.331),(fused fingers:1.61051),(too many fingers:1.61051),(unclear eyes:1.331),lowers,bad hands,missing fingers,extra digit,bad hands,missing fingers,(((extra arms and legs))),bad-artist,bad-artist-anime,bad-hands-5,bad-image-v2-39000,bad-picture-chill-75v,bad_prompt,bad_prompt_version2,badhandv4,ng_deepnegative_v1_75t,EasyNegative,2girls,3girls,lowres,bad anatomy,bad hands,text,error,missing fingers,extra digit,fewer digits,cropped,worst quality,low quality,normal quality,signature,watermark,username,blurry,badfeet,ugly,pregnant,duplicate,hermaphrodite,scar,green clothes,bad eyes,bad pupils,green hair,(duplicates),skin spots,acnes,skin blemishes,age spot,bad anatomy,(ugly:1.331),(duplicate:1.331),(morbid:1.21),(mutilated:1.21),mutated hands,(poorly drawn hands:1.331),blurry,(bad anatomy:1.21),(bad proportions:1.331),extra limbs,(disfigured:1.331),(missing arms:1.331),(extra legs:1.331),(fused fingers:1.61051),(too many fingers:1.61051),(unclear eyes:1.331),bad hands,missing fingers,extra digit,bad body,pubic hair,glans,refraction,diffusion,bad body,bad proportions,gross proportions,text,missing fingers,missing arms,missing legs,(((simple background))),fused fingers,too many fingers,missing arms,missing legs,extra arms,extra legs',
'image': image4
'label':'格温蜘蛛侠',
'prompt':'(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2),highly detailed face,1girl,gwen_stacy, (portrait:1.3),<lora:gwen_1.5:0.6>, spider-gwen suit , bodysuit , superhero,(extremely detailed,highres, highest detailed,8k,absurdres,CG),cyberpunk city, <lora:add_detail:1>, happy',
'negative_prompt':'(worst quality, low quality,2D:2), monochrome, zombie,overexposure, watermark,text,bad anatomy,bad hand,extra hands,extra fingers,too many fingers,fused fingers,bad arm,distorted arm,extra arms,fused arms,extra legs,missing leg,disembodied leg,extra nipples, detached arm, liquid hand,inverted hand,disembodied limb, small breasts, loli, oversized head,extra body, extra navel,easynegative,sketch, duplicate, ugly, huge eyes, text, logo, worst face, (bad and mutated hands:1.3), (blurry:2.0), horror, geometry, bad_prompt, (bad hands), (missing fingers), multiple limbs, bad anatomy, (interlocked fingers:1.2), Ugly Fingers, (extra digit and hands and fingers and legs and arms:1.4), ((2girl)), (deformed fingers:1.2), (long fingers:1.2),(bad-artist-anime), bad-artist, bad hand, extra legs ,(ng_deepnegative_v1_75t)',
'image': '/img/02.png',
'seed':4123387441,
'sampler_name': 'DPM++ SDE Karras',
'sd_model_checkpoint':'ghostmix_v11',
'height':768
},
{
'label':'国风',
'prompt':'beautiful girl, chinese clothes',
'negative_prompt':'(worst quality, low quality, normal quality, lowres, low details, oversaturated, undersaturated, overexposed, underexposed, grayscale, bw, bad photo, bad photography, bad art:1.4), (watermark, signature, text font, username, error, logo, words, letters, digits, autograph, trademark, name:1.2), (blur, blurry, grainy), morbid, ugly, asymmetrical, mutated malformed, mutilated, poorly lit, bad shadow, draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitch, duplicate, (airbrushed, cartoon, anime, semi-realistic, cgi, render, blender, digital art, manga, amateur:1.3), (3D ,3D Game, 3D Game Scene, 3D Character:1.1), (bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3)',
'image': image5
'label':'国风少女',
'prompt':'sfw,(8k, RAW photo:1.2),best quality, ultra high res,dramatic angle,(fluttered detailed color splashs), (illustration),(((1 girl))),(long hair),(rain:0.9),(hair ornament:1.4),there is an ancient palace beside the girl,chinese clothes,(focus on), color Ink wash painting,(color splashing),colorful splashing,(((colorful))),(sketch:0.8), Masterpiece,best quality, beautifully painted,highly detailed,(denoising:0.6),[splash ink],((ink refraction)), (beautiful detailed sky),moon,highly,detaild,(masterpiece, best quality, extremely detailed CG unity 8k wallpaper,masterpiece, best quality, ultra-detailed),(Lycoris radiata), <lora:koreanDollLikeness_v10:0.3>',
'negative_prompt':'(missing fingers),(bad hands),(bad feets),(ugly),paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,(((simple background))),monochrome ,lowres, 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, lowres, bad anatomy, bad hands, text, error, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, ugly,pregnant,vore,duplicate,morbid,mut ilated,tran nsexual, hermaphrodite,long neck,mutated hands,poorly drawn hands,poorly drawn face,mutation,deformed,blurry,bad anatomy,bad proportions,malformed limbs,extra limbs,cloned face,disfigured,gross proportions, (((missing arms))),(((missing legs))), (((extra arms))),(((extra legs))),pubic hair, plump,bad legs,error legs,username,blurry,bad feet',
'image': '/img/03.png',
'seed':1615207044,
'sampler_name': 'DPM++ SDE Karras',
'sd_model_checkpoint':'chilloutmix_NiPrunedFp32Fix',
'height':512
},
{
'label':'雀斑女孩',
'prompt':'beautiful lady, (freckles), big smile, ruby eyes, pigtails hair, dark makeup, hyperdetailed photography, soft light, head and shoulders portrait, cover',
'negative_prompt':'(worst quality, low quality, normal quality, lowres, low details, oversaturated, undersaturated, overexposed, underexposed, grayscale, bw, bad photo, bad photography, bad art:1.4), (watermark, signature, text font, username, error, logo, words, letters, digits, autograph, trademark, name:1.2), (blur, blurry, grainy), morbid, ugly, asymmetrical, mutated malformed, mutilated, poorly lit, bad shadow, draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitch, duplicate, (airbrushed, cartoon, anime, semi-realistic, cgi, render, blender, digital art, manga, amateur:1.3), (3D ,3D Game, 3D Game Scene, 3D Character:1.1), (bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3)',
'image': image2
'label':'樱花女孩',
'prompt':'1girl, (ulzzang-6500:0.7), kpop idol, yae miko,pink hair, long hair,best quality, (painting:1.5), (hair ornament:1.35), jewelry, purple eyes, cherry blossoms, lantern light, depth of field, detailed face, face focus, ribbon_trim, (looking at viewer:1.25), nontraditional miko, shiny skin, long sleeves, smile, thick lips, game cg, (blurry background:1.2), sitting, upper body <lora:YaeMiko_Test:0.45>,<lora:mix4:0.5>',
'negative_prompt':'nfsw, bright lantern, brightness, (nipples:1.2), pussy, EasyNegative, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers, fewer fingers, strange fingers, bad hand, bare thighs,hand,bad finger',
'image': '/img/04.png',
'seed':311582769,
'sampler_name': 'DPM++ SDE Karras',
'sd_model_checkpoint':'chilloutmix_NiPrunedFp32Fix',
'height':512
},
{
'label':'星空',
'prompt':'Surrealism in digital art, a collaboration between Beeple and Jeremias Ketner, featuring an exquisitely detailed digital illustration that captures the essence of both artists\' unique styles.',
'negative_prompt':'EasyNegative',
'image': image1
},
'label':'网红少女',
'prompt':'(RAW photo, best quality), (realistic, photo-realistic:1.3), masterpiece, an extremely delicate and beautiful, extremely detailed, CG, unity , 2k wallpaper, Amazing, finely detail, light smile, extremely detailed CG unity 8k wallpaper, huge filesize, ultra-detailed, highres, absurdres, soft light, (((medium hair:1.3), short bang, pink hair, floating hair novafrogstyle)), beautiful detailed girl, detailed fingers, extremely detailed eyes and face, beautiful detailed nose, beautiful detailed eyes, long eyelashes, light on face, looking at viewer, (closed mouth:1.2), 1girl, cute, young, mature face, (full body:1.3), ((small breasts)), realistic face, realistic body, beautiful detailed thigh, (ulzzang-6500-v1.1:0.8), <lora:koreanDollLikeness_v20:0.4>, business suit, cross-laced clothes, collared shirt, open clothes, in office, detailed office, open cardigan, black thighhighs, miniskirt, black underwear, unbuttoned shirt,\n',
'negative_prompt':'paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, extra fingers, fewer fingers, ((watermark:2)), (white letters:1), (multi nipples), bad anatomy, bad hands, text, error, missing fingers, missing arms, missing legs, extra digit, fewer digits, cropped, worst quality, jpeg artifacts, signature, watermark, username, bad feet, {Multiple people}, blurry, poorly drawn hands, poorly drawn face, mutation, deformed, 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, wrong feet bottom render, abdominal stretch, briefs, knickers, kecks, thong, {{fused fingers}}, {{bad body}}, bad-picture-chill-75v, ng_deepnegative_v1_75t, EasyNegative, bad proportion body to legs, wrong toes, extra toes, missing toes, weird toes, 2 body, 2 pussy, 2 upper, 2 lower, 2 head, 3 hand, 3 feet, extra long leg, super long leg, mirrored image, mirrored noise, (bad_prompt_version2:0.8), aged up, old,',
'image': '/img/05.png',
'seed':951042213,
'sampler_name': 'DPM++ SDE Karras',
'sd_model_checkpoint':'chilloutmix_NiPrunedFp32Fix',
'height':512
}
]
})
const handleSelectTag = (item, isInit)=> {
const { label, prompt, negative_prompt } = item;
const { label, prompt, negative_prompt,seed,sampler_name,sd_model_checkpoint,height } = item;
Object.assign(state, {
active: label,
prompt,
negative_prompt
negative_prompt,
seed,
sampler_name,
sd_model_checkpoint,
height
})
}
const handleSubmit = async ()=> {
const { prompt, active, negative_prompt } = state;
const { prompt, active, negative_prompt,seed,sampler_name,sd_model_checkpoint,height } = state;
if (state.loading) return;
state.loading = true;
try {
const params = { prompt, label: active, negative_prompt };
const params = { prompt, label: active, negative_prompt,seed,sampler_name,sd_model_checkpoint,height };
await props.loadingData(params)
context.emit('submit', params);
state.loading = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册