Perchance AI Character Chat T2I Window

This will add a text to image window (with t2i-styles) on your thread.

The window is automatically opened upon opening the thread. The window can be manually opened (if closed) with /open-t2i.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
// Open window with `/open-t2i` command

// the `/open-t2i` command handler
oc.thread.on("MessageAdded", async function () {
  let lastMessage = oc.thread.messages.at(-1);
  // console.log(lastMessage);
  if (lastMessage.author !== "ai") {
    if (/^\/open-t2i$/.test(lastMessage.content)) {
      lastMessage.expectsReply = false;
      setTimeout(() => (oc.thread.messages.pop(), oc.window.show()), 100)
    }
  }
});

// Show window upon opening of thread
(async function() {
  oc.window.show()
})()

// Styles from the `t2i-styles`
let styles = {
  "No Style": {
    prompt: "[input.description]",
    negative: "[input.negative]",
  },
  "Painted Anime": {
    prompt:
      "[input.description], art by atey ghailan, painterly anime style at pixiv, art by kantoku, in art style of redjuice/necömi/rella/tiv pixiv collab, your name anime art style, masterpiece digital painting, exquisite lighting and composition, inspired by wlop art style, 8k, sharp, very detailed, high resolution, illustration",
    negative:
      "[input.negative], (worst quality, low quality, blurry:1.3), black and white, low-quality, deformed, text, poorly drawn, bad art, bad anatomy, bad lighting, disfigured, faded, blurred face",
  },
  "Casual Photo": {
    prompt: "[input.description], casual photo",
    negative:
      "[input.negative], bad photo, bad lighting, high production value, unnatural studio lighting, commercial photoshoot, photoshopped, terrible photo, disfigured",
  },
  Cinematic: {
    prompt:
      "[input.description], cinematic shot, dynamic lighting, 75mm, Technicolor, Panavision, cinemascope, sharp focus, fine details, 8k, HDR, realism, realistic, key visual, film still, cinematic color grading, depth of field",
    negative:
      "[input.negative], bad lighting, low-quality, deformed, text, poorly drawn, holding camera, bad art, bad angle, boring, low-resolution, worst quality, bad composition, disfigured",
  },
  "Digital Painting": {
    prompt:
      "[input.description], breathtaking digital art, trending on artstation, by atey ghailan, by greg rutkowski, by greg tocchini, by james gilleard, 8k, high resolution, best quality",
    negative:
      "[input.negative], low-quality, deformed, signature watermark text, poorly drawn",
  },
  "Concept Art": {
    prompt:
      "[input.description], concept art, digital art, illustration, inspired by wlop style, 8k, fine details, sharp, very detailed, high resolution, masterpiece",
    negative:
      "[input.negative], low-quality, deformed, text, poorly drawn, worst quality, blurry",
  },
  "3D Disney Character": {
    prompt:
      "3D cartoon Disney character portrait render. [input.description], bokeh, 4k, highly detailed, Pixar render, CGI Animation, Disney, cute big circular reflective eyes, dof, (cinematic film), Disney realism, subtle details, breathtaking Pixar short, fine details, close up, sharp focus, HDR, Disney-style octane render, incredible composition, superb lighting and detail, [input.description]",
    negative:
      "[input.negative], worst quality, poorly drawn, bad art, boring, deformed, bad composition, crappy artwork, bad lighting",
  },
  "2D Disney Character": {
    prompt:
      "2D cartoon Disney character digital art of [input.description]. superb linework, classic 2D Disney style art, close-up, inspired by the art styles of Glen Keane and Aaron Blaise, Disney-style character concept with a Disney-style face, (trending on artstation), Disney-style version of [input.description]",
    negative:
      "[input.negative], bad 3D render, bad 3D shadowing, worst quality, poorly drawn, low-resolution render, bad colors, a photo, terrible art, text, logo, bad composition, bad lighting, disfigured, deformed, bad anatomy, crappy educational infographic cartoon, bad 3D render, black and white photo",
  },
  "Disney Sketch": {
    prompt:
      "Glen Keane character concept art (black and white) pencil sketch of [input.description]. (rough pencil sketch by Glen Keane:1.2), rough pencil sketch, close up, loose Disney-style character concept art sketch, (nice sketchy pencil strokes), Disney character design sketch, pencil texture, a concept art pencil sketch of [input.description], (by Glen Keane:1.3)",
    negative:
      "[input.negative], a photo, photorealistic style, with color, (a bad photo), bad digital art, bad 3D render, gradient, overly detailed, high contrast, bloom, a color photo, smooth shading, hilariously bad drawings, bad anatomy, bad art, 3D, a photo, soft shadows, lot of color",
  },
  "Concept Sketch": {
    prompt:
      "black and white technical drawing showcasing {a} [input.description], annotation details, masterpiece black and white, pencil strokes, annotated technical concept art sketch, pencil texture",
    negative: "[input.negative]",
  },
  Painterly: {
    prompt:
      "painterly digital painting, [input.description], digital painting by Ilya Kuvshinov with painterly brush strokes, by Ilya Kuvshinov, painterly masterpiece",
    negative:
      "brush, [input.negative], bad 3D render, (holding paintbrush), easel, bad photo, bad art, boring, bad 3D render",
  },
  "Oil Painting": {
    prompt:
      "breathtaking alla prima oil painting, [input.description], close up, (alla prima style:1.3), oil on linen, painterly oil on canvas, (painterly style:1.3), exquisite composition and lighting, modern painterly masterpiece, by alexi zaitsev, award-winning painterly alla prima oil painting",
    negative:
      "[input.negative], framed, faded colors, terrible photo, bad composition, hilariously bad drawing, bad photo, bad anatomy, extremely high contrast, worst quality, watermarked signature, bad colors, deformed, amputee, washed out, glare, boring colors, bad crayon drawing",
  },
  "Oil Painting - Realism": {
    prompt:
      "breathtaking oil painting, [input.description], photorealistic oil painting, by charlie bowater, fine details, by wlop, trending on artstation, very detailed",
    negative:
      "[input.negative], low-quality, deformed, text, poorly drawn, worst quality",
  },
  "Oil Painting - Old": {
    prompt:
      "([input.description]) (Oil painting) (by Jean-François Millet), (by Gustave Courbet), (by Jules Breton), close up",
    negative:
      "[input.negative], (badly drawn hands), extra limbs, extra fingers, bad anatomy",
  },
  "Professional Photo": {
    prompt:
      "[input.description], {sharp|soft} focus, depth of field, 8k photo, HDR, professional lighting, taken with Canon EOS R5, 75mm lens",
    negative:
      "[input.negative], worst quality, bad lighting, cropped, blurry, low-quality, deformed, text, poorly drawn, bad art, bad angle, boring, low-resolution, worst quality, bad composition, terrible lighting, bad anatomy",
  },
  Anime: {
    prompt:
      "(anime art of [input.description]:1.2), masterpiece, 4k, best quality, anime art",
    negative:
      "(worst quality, low quality:1.3), [input.negative], low-quality, deformed, text, poorly drawn, hilariously bad drawing, bad 3D render",
  },
  "Drawn Anime": {
    prompt:
      "digital art drawing, illustration of ([input.description]), anime drawing/art, bold linework, illustration, cel shaded, painterly style, digital art, masterpiece",
    negative:
      "[input.negative], boring flat infographic, oversaturated, bad photo, terrible 3D render, bad anatomy, worst quality, greyscale, black and white, disfigured, deformed, glitch, cross-eyed, lazy eye, ugly, deformed, distorted, glitched, lifeless, low quality, bad proportions",
  },
  "Cute Anime": {
    prompt:
      "(((adorable, cute, kawaii)), [input.description], cute moe anime character portrait, adorable, featured on pixiv, kawaii moé masterpiece, cuteness overload, very detailed, sooooo adorable!!!, absolute masterpiece",
    negative:
      "(worst quality, low quality:1.3), [input.negative], worst quality, ugly, 3D, photograph, bad art, blurry, boring",
  },
  "Soft Anime": {
    prompt:
      "[input.description], anime masterpiece, soft lighting, intricate, highly detailed, pixiv, anime art, 4k, art from your name anime, garden of words style art, high quality",
    negative:
      "(worst quality, low quality:1.3), [input.negative], low-quality, deformed, text, poorly drawn",
  },
  "Fantasy Painting": {
    prompt:
      "[input.description], d&d, fantasy, highly detailed, digital painting, artstation, sharp focus, fantasy art, illustration, 8k, in the style of greg rutkowski",
    negative: "[input.negative], low-quality, deformed, text, poorly drawn",
  },
  "Fantasy Landscape": {
    prompt:
      "[input.description], fantasy matte painting, absolute masterpiece, detailed matte painting by andreas rocha and greg rutkowski, by Brothers Hildebrandt, superb composition, vivid fantasy art, breathtaking fantasy masterpiece",
    negative: "[input.negative], faded, blurry, bad art, boring",
  },
  "Fantasy Portrait": {
    prompt:
      "[input.description], d&d, fantasy, highly detailed, digital painting, artstation, sharp focus, fantasy art, character art, illustration, 8k, art by artgerm and greg rutkowski",
    negative: "[input.negative], low-quality, deformed, text, poorly drawn",
  },
  "Studio Ghibli": {
    prompt:
      "[input.description], (studio ghibli style art:1.3), sharp, very detailed, high resolution, inspired by hayao miyazaki, anime, art from ghibli movie",
    negative:
      "(worst quality, low quality:1.3), [input.negative], low-quality, deformed, text, poorly drawn",
  },
  "50s Enamel Sign": {
    prompt:
      "50s enamel sign of [input.description], 50s advert enamel sign, masterpiece, authentic vintage enamel sign",
    negative: "[input.negative]",
  },
  "Vintage Comic": {
    prompt:
      "comic book style art of [input.description], (drawing, by Dave Stevens, by Adam Hughes, 1940's, 1950's:1.2), hand-drawn, color, high resolution, best quality, closeup",
    negative:
      "[input.negative], terrible photoshop, low contrast, disfigured, poorly drawn, deformed, tiled, cropped, framed",
  },
  "Franco-Belgian Comic": {
    prompt:
      "franco-belgian color comic about [input.description], bande dessinée, franco-belgian comic panel, masterpiece, breathtaking composition, intricate, detailed, best quality, close-up",
    negative:
      "[input.negative], framed blurry crappy photo, overexposed, worst quality, border, deformed horror, overly faded",
  },
  "Tintin Comic": {
    prompt:
      "color comic panel in the style of Hergé about [input.description], by Hergé, tintin style, french comic panel, franco-belgian style, close-up, masterpiece, high-resolution Hergé style",
    negative:
      "[input.negative], blurry, framed edge border, text, overexposed, bad anatomy, deformed, disfigured, blur, horror, dead eyes, boring, faded, (worst quality, low quality:1.2)",
  },
  Medieval: {
    prompt:
      "medieval illuminated manuscript picture of [input.description], medieval illuminated manuscript art, masterpiece medieval color illustration, 16th century, 8k high-resolution scan of 16th century illuminated manuscript painting, detailed medieval masterpiece, close-up",
    negative: "[input.negative], worst quality, blurry",
  },
  "Pixel Art": {
    prompt:
      "[input.description], best pixel art, neo-geo graphical style, retro nostalgic masterpiece, 128px, 16-bit pixel art, 2D pixel art style, adventure game pixel art, inspired by the art style of hyper light drifter, masterful dithering, superb composition, beautiful palette, exquisite pixel detail",
    negative:
      "[input.negative], glitched, deep fried, jpeg artifacts, out of focus, gradient, soft focus, low quality, poorly drawn, blur, grainy fabric texture, text, bad art, boring colors, blurry platformer screenshot",
  },
  "Cute Figurine": {
    prompt:
      "[input.description], figurine, modern Disney style, octane render, chibi",
    negative: "[input.negative], low-quality, deformed, text, poorly drawn",
  },
  "3D Emoji": {
    prompt:
      "masterpiece (([input.description])) cartoon emoji concept render, (close-up:1.3), facing forward, (matte), emoji render trending on artstation, noto color emoji, app icon, joypixels, simple design, new iOS 16.4 ((([input.description]))) emoji render, (simple background:1.2), (centered:1.2), masterpiece, telegram sticker, clash of clans character concept, (looking at camera), crisp render, sharp focus, simple cartoon design, 4k, sharp focus, an emoji with cartoon proportions, masterpiece emoji-style figurine render, transparent background png",
    negative:
      "[input.negative], framed, inset, border, glare, blurry, out of focus, shiny, (on pedestal:1.2), on platform, with base, gradient background, off-center, casting shadow, ((deformed, disfigured)), glitchy, vector art, text, signature, bad anatomy, messed up, bad art, gradient background, complex background, blurry, worst quality, low resolution, messy, complex, gradient background, bad lighting",
  },
  Illustration: {
    prompt:
      "breathtaking illustration of [input.description], (illustration:1.3), masterpiece, breathtaking illustration",
    negative:
      "[input.negative], low-quality, deformed, text, poorly drawn, bad 3D render, bad composition, bad photo, worst quality",
  },
  "Flat Illustration": {
    prompt:
      "[input.description], illustration, flat, 2D, vector art, masterpiece, made with adobe illustrator, behance competition winner, trending on dribble, 4k, high resolution, crisp lines",
    negative:
      "[input.negative], bad art, children's crayon drawing, worst quality, blurry, blur, jpeg artifacts, compression artifacts, text, worst quality, noise, messy, low resolution",
  },
  Watercolor: {
    prompt:
      "[input.description], (watercolor), high resolution, intricate details, 4k, wallpaper, concept art, watercolor on textured paper",
    negative: "[input.negative], low-quality, deformed, text, poorly drawn",
  },
  "1990s Photo": {
    prompt:
      "[input.description], 90s home video, nostalgic 90s photo, taken with kodak disposable camera",
    negative: "[input.negative], blurry, blur, deformed",
  },
  "1980s Photo": {
    prompt:
      "famous vintage 80s photo, [input.description], grainy photograph, 80s photo with film grain, Kodacolor II 80s photo with vignetting, retro, r/OldSchoolCool, 80s photo with wear and tear and minor creasing and scratches, vintage color photo",
    negative: "[input.negative], deformed",
  },
  "1970s Photo": {
    prompt:
      "famous vintage 70s photo, [input.description], grainy photograph, 1970s photo with film grain, 70s photo with vignetting, retro, r/OldSchoolCool, 70s photo, vintage photo",
    negative: "[input.negative], deformed",
  },
  "1960s Photo": {
    prompt:
      "famous vintage 60s photo, [input.description], grainy photograph, 1960s photo with film grain, 60s photo with vignetting, retro, r/OldSchoolCool, 60s photo, vintage photo",
    negative: "[input.negative], deformed",
  },
  "1950s Photo": {
    prompt:
      "famous vintage 50s photo, [input.description], grainy photograph, 1950s photo with film grain, 1950s photo with vignetting, retro, r/OldSchoolCool, 1950s photo, vintage photo",
    negative: "[input.negative], deformed",
  },
  "1940s Photo": {
    prompt:
      "famous vintage 1940s photo, [input.description], grainy photograph, 1940s photo with film grain, 1940s photo with vignetting, retro, r/OldSchoolCool, 1940s photo, vintage photo",
    negative: "[input.negative], deformed",
  },
  "1930s Photo": {
    prompt:
      "famous vintage 1930s photo, [input.description], grainy photograph, 1930s photo with film grain, 1930s photo with vignetting, retro, r/OldSchoolCool, 1930s photo, vintage photo",
    negative: "[input.negative], deformed",
  },
  "1920s Photo": {
    prompt:
      "famous vintage 1920s photo, [input.description], 1920s photo, restored photograph, {sepia|black and white}, historical archive photo",
    negative: "[input.negative], deformed",
  },
  "Vintage Pulp Art": {
    prompt:
      "(((1970s vintage pulp art))), [input.description], vintage pulp art, by Earle K. Bergey, by Kelly Freas, by Alex Schomburg, by H. J. Ward, glossy pulp art, Amazing Stories, Weird Tales, 8k, high resolution, best quality",
    negative:
      "[input.negative], text, cropped, bad art, deformed, worst quality, watermark, text",
  },
  "50s Infomercial Anime": {
    prompt:
      "[input.description], 1950s infomercial style, (delicate linework:1.1), paprika anime art style, close-up, (chromatic aberration glow:1.2), 2d painted cel animation, close-up, soft focus, 2D pixiv 1950s",
    negative:
      "worst quality, low quality, [input.negative], neon tube, bad art, messy, disfigured, bad anatomy, out of focus, grainy, blurry, jpeg artifact noise, deformed",
  },
  "3D Pokemon": {
    prompt:
      "a pokemon creature, [input.description], 4k render, beautiful pokemon digital art, fakemon, pokemon creature, cryptid, fakemon, masterpiece, {soft|sharp} focus, (best quality, high quality:1.3)",
    negative:
      "[input.negative], distorted, deformed, bad art, low quality, over saturated, extreme contrast, (worst quality, low quality:1.3)",
  },
  "Painted Pokemon": {
    prompt:
      "[input.description], 4k digital painting of a pokemon, amazing pokemon art by piperdraws, cryptid creations by Piper Thibodeau, by Naoki Saito and {Tokiya|Mitsuhiro Arita}, incredible composition",
    negative:
      "[input.negative], crappy 3D render, distorted, deformed, bad art, low quality, text, signature",
  },
  "2D Pokemon": {
    prompt:
      "[input.description], pokemon creature concept, superb line art, beautiful pokemon digital art, fakemon, by Sowsow, pokemon creature, cryptid, fakemon, masterpiece, by Yuu Nishida, 4k",
    negative:
      "[input.negative], distorted, deformed, bad art, low quality, crappy 3D render, text watermark symbols logo",
  },
  "Vintage Anime": {
    prompt:
      "[input.description], vintage anime, 90's anime style, by hajime sorayama, by greg tocchini, anime masterpiece, pixiv, akira-style art, akira anime art, 4k, high quality",
    negative:
      "[input.negative], (worst quality, low quality:1.3), bad art, distorted, deformed",
  },
  "Neon Vintage Anime": {
    prompt:
      "[input.description], ((neon vintage anime)) style, 90's anime style, hajime sorayama, greg tocchini, neon vintage anime masterpiece, anime art, 4k, high quality",
    negative:
      "[input.negative], blurry, (worst quality, low quality:1.3), bad art, distorted, deformed",
  },
  Manga: {
    prompt:
      "[input.description], incredible hand-drawn manga, black and white, by Takehiko Inoue, by Katsuhiro Otomo and akira toriyama manga, hand-drawn art by rumiko takahashi and Inio Asano, Ken Akamatsu manga art",
    negative:
      "[input.negative], (worst quality, low quality:1.3), bad photo, bad 3D render, distorted, deformed, fuzzy, noisy, blurry, smudge",
  },
  "Fantasy World Map": {
    prompt:
      "beautiful fantasy map of [input.description], beautiful fantasy map inspired by middle earth and azeroth and discworld and westeros and essos and the witcher world and tamriel and faerûn and thedas, 4k, beautiful colors, crisp, high-resolution artistic map, topographic 3D terrain, artistic map",
    negative:
      "[input.negative], low quality, blurry, worst quality, childrens drawing, boring, logo, scratchy and grainy, messy, washed out colors, sepia, hazy",
  },
  "Fantasy City Map": {
    prompt:
      "an aerial view of a city, TTRPG city map showing the full city, [input.description], fantasy art, by senior environment artist, beautiful fantasy map",
    negative: "[input.negative], fuzzy, bad art",
  },
  "Old World Map": {
    prompt:
      "fantasy world map of [input.description], fantasy world map, highly detailed digital painting, fantasy art, map illustration, 8k",
    negative: "[input.negative], low resolution, worst quality",
  },
  "3D Isometric Icon": {
    prompt:
      "[input.description], 3D isometric render of cute [input.description], 3D app icon, clean isometric design, beautiful design, soft gradient background, soft colors, centered, 3D blender render, masterpiece, best quality, high resolution, 8k octane render, beautiful color scheme, soft smooth lighting, physically based rendering, square image, high polycount",
    negative:
      "[input.negative], low quality, terrible design, glitchy compression artefacts, deformed, blurry compression artefacts, text",
  },
  "Flat Style Icon": {
    prompt:
      "[input.description], creative icon, flat style icon, masterpiece, high resolution, crisp, beautiful composition and color choice, beautiful flat painted style, behance contest-winner, award winning icon illustration, 8k, best quality",
    negative:
      "[input.negative], gradient, bad design, blurry, jpeg compression artefacts, grainy, gradient, text, messy and inconsistent",
  },
  "Flat Style Logo": {
    prompt:
      "beautiful flat-style logo design depicting [input.description], creative flat-style logo design, trending on dribbble, featured on behance, portfolio piece, minimal flat design, breathtaking graphic design, 8k, high resolution vector logo, plain background, amazingly beautiful logo design, winner of best logo award",
    negative:
      "[input.negative], photo, hilariously bad design, bad composition, bad colors, blurry, worst quality, low quality, shadow, boring, bad dsign, worst design ever, hilariously bad design, drop-shadow, gradient, messy, chaotic",
  },
  "Game Art Icon": {
    prompt:
      "[input.description], a concept art icon for league of legends, a digital art logo, illustration, league of legends style icon, inspired by wlop style, 8k, dota 2 style icon, fine details, sharp, very detailed icon, high resolution rpg ability/spell/item icon",
    negative:
      "[input.negative], low-quality, deformed, text, poorly drawn, multiple",
  },
  "Digital Painting Icon": {
    prompt:
      "[input.description], app logo icon, digital art pictogram icon, trending on artstation, app icon by atey ghailan, app icon by greg rutkowski, app icon by greg tocchini, app icon by james gilleard, 8k, high resolution, best quality",
    negative:
      "[input.negative], photo, low-quality, deformed, text, poorly drawn",
  },
  "Concept Art Icon": {
    prompt:
      "[input.description], a concept art icon, a digital art logo, illustration, league of legends style concept art logo icon, inspired by wlop style, 8k, fine details, sharp, very detailed, high resolution logo icon",
    negative:
      "[input.negative], low-quality, deformed, text, poorly drawn, multiple",
  },
  "Cute 3D Icon": {
    prompt:
      "[input.description], a cute 3D icon of [description], cartoon 3D icon, very cute shape, stylized octane render, 8k, masterpiece, soooo cute, beautiful cute perfection, beautiful soft lighting, soft colors, centered, high resolution, [description], soft gradient background",
    negative: "[input.negative], low quality, text, ugly, gross",
  },
  "Cute 3D Icon 𝗦𝗲𝘁": {
    prompt:
      "[input.description], a set of lovely little 3D icons, cute 3D icons, very cute shapes, stylized octane render, 8k, masterpiece, soooo cute, beautiful cute perfection, beautiful soft lighting, soft colors, centered, high resolution, [description], cute icon set",
    negative: "[input.negative], low quality, text, ugly, gross",
  },
  "Crayon Drawing": {
    prompt: "[input.description], crayon drawing",
    negative: "[input.negative], low-quality, deformed, text, poorly drawn",
  },
  Pencil: {
    prompt:
      "((black and white pencil drawing)), [input.description], black and white, breathtaking pencil illustration, highly detailed, 4k, (textured paper), pencil texture, sketch",
    negative:
      "[input.negative], stationary, holding pen, holding paper, low-quality, deformed, photo, 3D render, text, poorly drawn",
  },
  "Tattoo Design": {
    prompt:
      "amazing tattoo design, [input.description], breathtaking tattoo design, incredible tattoo design",
    negative:
      "[input.negative], low-quality, poorly drawn, blurry, faded, terrible design, worst quality, deformed, amputee, disfigured, ugly, bad, shitty, boring",
  },
  Waifu: {
    prompt:
      "[input.description], waifu character portrait, art by Kazenoko, featured on pixiv, 1 girl, by Ilya Kuvshinov, Kantoku art, very detailed anime art by Redjuice",
    negative:
      "(worst quality, low quality:1.3), [input.negative], bad photo, bad art, boring, bad 3D render, worst quality, ugly, blurry, low quality, poorly drawn, bad composition, deformed, bad 3D render, disfigured, bad anatomy, compression artifacts, dead, soulless, photorealistic",
  },
  "YuGiOh Art": {
    prompt:
      "yugioh card art for [input.description], art by genzoman, by Akina Fujiwara, by rossdraws, yugioh monster, close up, painterly details, breathtaking art, centered, masterpiece, amazing composition",
    negative:
      "[input.negative], Yugi Mutou, low-quality, blurry, crappy 3D render, worst quality, messy, noisy, framed, with border, cropped, confusing, stacked characters poster, low resolution, bad 3D render, fuzzy",
  },
  "Traditional Japanese": {
    prompt:
      "[input.description], in ukiyo-e art style, traditional japanese masterpiece",
    negative: "[input.negative], blurry, low resolution, worst quality, fuzzy",
  },
  "Nihonga Painting": {
    prompt:
      "japanese nihonga painting about [input.description], Nihonga, ancient japanese painting, intricate, detailed",
    negative: "[input.negative], framed blurry crappy photo, overly faded",
  },
  Claymation: {
    prompt:
      "[input.description], claymation, incredible claymation style, kubo and the two strings style art, Missing Link 2019 art style, clay texture, clay animation, stop-motion clay",
    negative:
      "[input.negative], glossy, creepy, dead eyes, lifeless eyes, blurry, scary, boring, tiling, cropped, terrifying, horror, out of focus",
  },
  "Furry - Painted": {
    prompt:
      "anthro [input.description] digital art, masterpiece, 4k, fine details",
    negative:
      "[input.negative], bad photo, worst quality, bad composition, bad lighting, bad colors, small eyes, low quality, bad art, poorly drawn, deformed, bad 3D render, boring, lifeless, deformed, ugly, low resolution",
  },
  "Furry - Drawn": {
    prompt:
      "anthro [input.description] illustration, hand-drawn, bold linework, anthro illustration, cel shaded, 4k, fine details, masterpiece",
    negative:
      "[input.negative], bad photo, terrible 3D render, bad anatomy, worst quality, greyscale, black and white, disfigured, deformed, glitch, cross-eyed, lazy eye, ugly, deformed, distorted, glitched, lifeless, low quality, bad proportions",
  },
  "Furry - Cinematic": {
    prompt:
      "[input.description], cinematic shot, dynamic lighting, 75mm, Technicolor, Panavision, cinemascope, sharp focus, fine details, 8k, HDR, realism, realistic, key visual, film still, cinematic color grading, depth of field, (anthro:0.1)",
    negative:
      "[input.negative], bad lighting, low-quality, deformed, text, poorly drawn, holding camera, bad art, bad angle, boring, low-resolution, worst quality, bad composition, disfigured",
  },
  Cartoon: {
    prompt:
      "[input.description], cartoon-style art, superb linework, nice colors and composition, bold linework, close-up, (masterpiece), cute art by Dana Terrace, by Rebecca Sugar, by ry-spirit, amazing and wholesome cartoon-style art, cute art style, (trending on artstation)",
    negative:
      "[input.negative], bad art, boring art, hilariously bad drawings, bad 3D render, bad photo, blurry, blur, worst quality, boring colors, logo vector image, monotone, lifeless, expressionless, faded, horror, creepy",
  },
  "Cursed Photo": {
    prompt:
      "cursed photo of [input.description], (creepy and cursed:1.2), absolutely cursed photo, nope nope nope nope, what the actual f, (unsettling photo:1.2), cursed_thing, cursedimages, no context, cursed image, bad photo, weird photo, very strange, color photo, creepy photo, (nightmare fuel)",
    negative:
      "[input.negative], skeleton face, nice photo, lovely photo, old photo, vintage photo, greyscale, wholesome, eyebleach, bad photoshop",
  },
};

// Generate Image function
window.generateImage = async function () {
  let selectedStyle = styleSelect.value
  let p = positivePromptInput.value
  let np = negativePromptInput.value
  if (p == undefined || p == '') { statusCon.innerHTML = 'No Prompt Provided!'; return };
  if (selectedStyle !== 'No Style') {
    p = styles[selectedStyle].prompt.replaceAll('[input.description]', p)
    np = styles[selectedStyle].negative.replaceAll('[input.negative]', np)
  }
  let seed = Number(imageSeed.value) == 0 || Number(imageSeed.value) == -1 ? Math.random().toString().slice(6) : Number(imageSeed.value);
  console.log(p)
  let prompt = {
    prompt: `${p.valueOf()}`,
    negativePrompt: `${np.valueOf()}`,
    resolution: (resSlider.value == 1 ? '512x512' : resSlider.value == 2 ? '512x768' : '768x512'),
    guidanceScale: Number(gsSlider.value),
    seed: seed
  };
  statusCon.innerHTML = `Generating Image <progress></progress>`
  let { dataUrl } = await oc.textToImage(prompt);
  statusCon.innerHTML = 'Generated'
  imageCon.src = dataUrl;
  imgDetails.innerHTML = Object.entries(prompt).map(a => `<tr><td>${a[0]}</td><td>${a[1]}</td></tr>`).join('')

}

// Add image to chat function
window.addImageToChat = async function () {
  if (imageCon.src == '' || imageCon.src == undefined) { statusCon.innerHTML = 'No Image Generated!'; return };
  oc.thread.messages.push({
    author: "user",
    content: `<img src="${imageCon.src}" style="width: 100%; max-width: 300px;">`,
    hiddenFrom: ["ai"], // So that the AI doesn't add the image string into the summary :)
  })
}

// HTML and CSS for the window.
document.body.innerHTML = `
<style>
  html {
    color-scheme: light dark;
    font-family: system-ui, sans-serif;
  }

  table, th, td {
    border: 1px solid;
    padding: 0.2em;
    border-collapse: collapse;
  }

  datalist {
    display: flex;
    justify-content: space-between;
    width: 100%;
    & option {
      padding: 0;
      word-break: break-word;
    }
    @media screen and (max-width: 320px) {
      writing-mode: vertical-lr;
      flex-direction: column;

    }
  }
</style>
<h1>T2I Window</h1>

<section>
  <img style="width: 100%; max-width: 500px;" id="imageCon" />
  <div id="statusCon"></div>
  <div>
  <button onclick="generateImage()">Generate Image</button> <button onclick="addImageToChat();">Add Image to Chat</button><button onclick="oc.window.hide();">Close Window</button>
  </div>
  <fieldset><summary>Prompt</summary>
      <textarea style="width: 100%;" id="positivePromptInput" placeholder="Prompts/Tags Here!"></textarea>
  </fieldset>
  <fieldset><summary>Negative Prompt</summary>
      <textarea style="width: 100%;" id="negativePromptInput" placeholder="Prompts/Tags Here!"></textarea>
  </fieldset>
  <fieldset><summary class="seedInputs" style="justify-content:space-between; margin-bottom: 0;"><span>Guidance Scale: </span><span id="gsValue">7</span></summary>
  <input id="gsSlider" class="slider" type="range" data-value="7" style="width: 100%;" min="1" max="30" step="1" value="7" oninput="gsValue.innerHTML = this.value"list="markersGS"/>
    <datalist id="markersGS">
      <option value="5" label="Less Prompt"></option>
      <option value="10"></option>
      <option value="15"></option>
      <option value="20"></option>
      <option value="25"></option>
      <option value="30" label="More Prompt"></option>
    </datalist>
  </fieldset>
  <fieldset><summary class="seedInputs" style="justify-content:space-between; margin-bottom: 0;"><span>Resolution</span></summary>
  <input id="resSlider" class="slider" type="range" data-value="512x768" style="width: 100%;" min="1" max="3" step="1" value="2" list="markersRES"/>
    <datalist id="markersRES">
      <option value="1" label="512x512"></option>
      <option value="2" label="512x768"></option>
      <option value="3" label="768x512"></option>
    </datalist>
  </fieldset>
  <fieldset><summary class="seedInputs" style="justify-content:space-between; margin-bottom: 0;"><div>Seeds / Style</div><div style="opacity: 0.5; font-size: 90%;"></div></summary>
  <div class="seedInputs"><label for="imageSeed">Image Seed </label><input id="imageSeed" type="number" placeholder="numbers only!" min="-1"/></div>
  <div><label> Styles <select id="styleSelect">
  ${Object.keys(styles)
  .map((a) => `<option value="${a}">${a}</option>`)
  .join("")}
  </select></label></div>
  </fieldset>
  <fieldset><summary>Image Details</summary>
  <table id="imgDetails" style=""></table>
  </fieldset>
</section>
<footer>
Notes:
<ul>
<li>Open this window with <code>/open-t2i</code> command.</li>
<li>Blending of tags with <code>\[from:to:value\]</code> are not supported.</li>
<li>Feel free to reach out to <a href="https://perchance.org/vionet20-gens">Vionet20</a> if you encounter any bugs with this custom code!</li>
</ul>
</footer>
`;
Edit

Pub: 08 Mar 2024 04:33 UTC

Edit: 08 Mar 2024 04:39 UTC

Views: 1449