Mbonea commited on
Commit
9a21a31
1 Parent(s): 2bec257

improved resolution

Browse files
Files changed (1) hide show
  1. App/Generate/database/Vercel.py +28 -6
App/Generate/database/Vercel.py CHANGED
@@ -13,18 +13,37 @@ class AsyncImageGenerator:
13
  try:
14
  url = f"{self.base}/predictions"
15
  data = {
 
 
 
 
 
 
 
 
 
 
16
  "input": {
17
  "width": 1024,
18
- "height": 1024,
19
  "prompt": payload,
20
  "scheduler": "DPMSolver++",
21
  "num_outputs": 1,
22
  "guidance_scale": 2,
23
- # "negative_prompt": "ugly, deformed, noisy, blurry, distorted, out of focus, bad anatomy, extra limbs, poorly drawn face, poorly drawn hands, missing fingers, color, 3D, 2D, video game, cgi, plastic, fake, artificial, smooth",
24
- "negative_prompt": "text, watermark, blurry, haze, low contrast, low quality, underexposed, ugly, deformed, boring, bad quality, cartoon, ((disfigured)), ((bad art)), ((deformed)), ((poorly drawn)), ((extra limbs)), ((close up)), ((b&w)), weird colors, blurry, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, low detail, low quality, double face, 2 faces, cropped, ugly, low-res, tiling, grainy, cropped, ostentatious, ugly, oversaturated, grain, low resolution, disfigured, blurry, bad anatomy, disfigured, poorly drawn face, mutant, mutated, extra limb, ugly, poorly drawn hands, missing limbs, blurred, floating limbs, disjointed limbs, deformed hands, blurred, out of focus, long neck, long body, ugly, disgusting, childish, cut off cropped, distorted, imperfect, surreal, bad hands, text, error, extra digit, fewer digits, cropped , worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, Lots of hands, extra limbs, extra fingers, conjoined fingers, deformed fingers, old, ugly eyes, imperfect eyes, skewed eyes , unnatural face, stiff face, stiff body, unbalanced body, unnatural body, lacking body, details are not clear, cluttered, details are sticky, details are low, distorted details, ugly hands, imperfect hands, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2) bad hands, fused ha nd, missing hand, disappearing arms, hands, disappearing thigh, disappearing calf, disappearing legs, ui, missing fingers",
25
  "num_inference_steps": 25,
26
  },
 
 
 
 
 
 
27
  "path": "models/playgroundai/playground-v2.5-1024px-aesthetic/versions/a45f82a1382bed5c7aeb861dac7c7d191b0fdf74d8d57c4a0e6ed7d4d0bf7d24",
 
 
 
28
  }
29
 
30
  async with self.session.post(url, json=data) as response:
@@ -96,15 +115,18 @@ async def process_images(payloads):
96
  return results
97
 
98
 
99
- # # Example payloads
100
  # payloads = [
101
  # """
102
- # Roman gladiator fighting a crocodile in the Colosseum, ancient Roman entertainment, oil painting, gruesome and thrilling, blood-stained sand, telephoto lens, afternoon golden hour lighting, cinematic film style, realistic with dramatic shadows
 
 
 
103
  # """
104
  # ]
105
 
106
 
107
- # # Run the asyncio event loop
108
  # async def main():
109
  # results = await process_images(payloads)
110
  # pprint.pprint(results)
 
13
  try:
14
  url = f"{self.base}/predictions"
15
  data = {
16
+ # "input": {
17
+ # "prompt": payload,
18
+ # "negative_prompt": "CGI, Unreal, Airbrushed, Digital",
19
+ # "width": 1024,
20
+ # "height": 1024,
21
+ # "num_outputs": 1,
22
+ # "scheduler": "DPM++SDE",
23
+ # "num_inference_steps": 30,
24
+ # "guidance_scale": 2,
25
+ # },
26
  "input": {
27
  "width": 1024,
28
+ "height": 1536,
29
  "prompt": payload,
30
  "scheduler": "DPMSolver++",
31
  "num_outputs": 1,
32
  "guidance_scale": 2,
33
+ "negative_prompt": "doll opened mouth toy, text, sculpture pixar, cartoon, anime, low quality, plastic, 2 heads, 2 faces, poorly drawn, ugly, poorly drawn face, extra arms, extra legs, ugly, bad anatomy, bad fingers, ugly, deformed, noisy, blurry, distorted, grainy, nudity, nude",
34
+ # "negative_prompt": "text, watermark, blurry, haze, low contrast, low quality, underexposed, ugly, deformed, boring, bad quality, cartoon, ((disfigured)), ((bad art)), ((deformed)), ((poorly drawn)), ((extra limbs)), ((close up)), ((b&w)), weird colors, blurry, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, low detail, low quality, double face, 2 faces, cropped, ugly, low-res, tiling, grainy, cropped, ostentatious, ugly, oversaturated, grain, low resolution, disfigured, blurry, bad anatomy, disfigured, poorly drawn face, mutant, mutated, extra limb, ugly, poorly drawn hands, missing limbs, blurred, floating limbs, disjointed limbs, deformed hands, blurred, out of focus, long neck, long body, ugly, disgusting, childish, cut off cropped, distorted, imperfect, surreal, bad hands, text, error, extra digit, fewer digits, cropped , worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, Lots of hands, extra limbs, extra fingers, conjoined fingers, deformed fingers, old, ugly eyes, imperfect eyes, skewed eyes , unnatural face, stiff face, stiff body, unbalanced body, unnatural body, lacking body, details are not clear, cluttered, details are sticky, details are low, distorted details, ugly hands, imperfect hands, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2) bad hands, fused ha nd, missing hand, disappearing arms, hands, disappearing thigh, disappearing calf, disappearing legs, ui, missing fingers",
35
  "num_inference_steps": 25,
36
  },
37
+ # "input": {
38
+ # "prompt": payload,
39
+ # # "aspect_ratio": "9:16",
40
+ # # "output_quality": 79,
41
+ # # "negative_prompt": "doll opened mouth toy, text, sculpture pixar, cartoon, anime, low quality, plastic, 2 heads, 2 faces, poorly drawn, ugly, poorly drawn face, extra arms, extra legs, ugly, bad anatomy, bad fingers, ugly, deformed, noisy, blurry, distorted, grainy, nudity, nude",
42
+ # },
43
  "path": "models/playgroundai/playground-v2.5-1024px-aesthetic/versions/a45f82a1382bed5c7aeb861dac7c7d191b0fdf74d8d57c4a0e6ed7d4d0bf7d24",
44
+ # "path": "models/stability-ai/stable-diffusion-3",
45
+ # "path": "models/lucataco/proteus-v0.4/versions/34a427535a3c45552b94369280b823fcd0e5c9710e97af020bf445c033d4569e",
46
+ # "path": "models/lucataco/juggernaut-xl-v9/versions/bea09cf018e513cef0841719559ea86d2299e05448633ac8fe270b5d5cd6777e",
47
  }
48
 
49
  async with self.session.post(url, json=data) as response:
 
115
  return results
116
 
117
 
118
+ # # # Example payloads
119
  # payloads = [
120
  # """
121
+
122
+ # [Underpainting sketch] [Abstract expressive ginger arcane girl fortune teller portrait] [Detailed room with candles, vines, stars] [Mystical scene with crystal orb, herbs, potions] [Burned paper, beautiful tender elements, mannerism, jewels, detailed eyes, celestial, shadow play, rough textures, light on perfect face, focus on detailed face, smoke, dynamic movement, rim lighting, mystical, magic, complex background, by Lockwood, Kuindzhi, Rockwell] high-quality portrait photography style 8K
123
+
124
+
125
  # """
126
  # ]
127
 
128
 
129
+ # # # Run the asyncio event loop
130
  # async def main():
131
  # results = await process_images(payloads)
132
  # pprint.pprint(results)