ehristoforu commited on
Commit
d1bba2d
1 Parent(s): 2e647cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -12,7 +12,7 @@ import torch
12
  from diffusers import StableDiffusionXLPipeline, KDPM2AncestralDiscreteScheduler, AutoencoderKL
13
 
14
  DESCRIPTION = """
15
- # Proteus V0.1
16
 
17
  Model by [dataautogpt3](https://huggingface.co/dataautogpt3)
18
 
@@ -80,18 +80,17 @@ def generate(
80
  seed = int(randomize_seed_fn(seed, randomize_seed))
81
 
82
  if not use_negative_prompt:
83
- negative_prompt = None # type: ignore
84
- with torch.no_grad():
85
- images = pipe(
86
- prompt=prompt,
87
- negative_prompt=negative_prompt,
88
- width=width,
89
- height=height,
90
- guidance_scale=guidance_scale,
91
- num_inference_steps=25,
92
- num_images_per_prompt=1,
93
- output_type="pil",
94
- ).images
95
 
96
  image_paths = [save_image(img) for img in images]
97
  print(image_paths)
 
12
  from diffusers import StableDiffusionXLPipeline, KDPM2AncestralDiscreteScheduler, AutoencoderKL
13
 
14
  DESCRIPTION = """
15
+ # Proteus ```V0.1```
16
 
17
  Model by [dataautogpt3](https://huggingface.co/dataautogpt3)
18
 
 
80
  seed = int(randomize_seed_fn(seed, randomize_seed))
81
 
82
  if not use_negative_prompt:
83
+ negative_prompt = "" # type: ignore
84
+ images = pipe(
85
+ prompt=f'''{prompt}, best quality, HD, "*aesthetic*"''',
86
+ negative_prompt=f"{negative_prompt}, bad quality, bad anatomy, worst quality, low quality, low resolutions, extra fingers, blur, blurry, ugly, wrongs proportions, watermark, image artifacts, lowres, ugly, jpeg artifacts, deformed, noisy image",
87
+ width=width,
88
+ height=height,
89
+ guidance_scale=guidance_scale,
90
+ num_inference_steps=20,
91
+ num_images_per_prompt=1,
92
+ output_type="pil",
93
+ ).images
 
94
 
95
  image_paths = [save_image(img) for img in images]
96
  print(image_paths)