Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -452,7 +452,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
452 |
|
453 |
seq=512
|
454 |
image_steps=30
|
455 |
-
img_accu=
|
456 |
|
457 |
# ui data
|
458 |
|
@@ -527,8 +527,8 @@ torch.cuda.empty_cache()
|
|
527 |
@spaces.GPU(duration=300)
|
528 |
def upscaler(
|
529 |
input_image: Image.Image,
|
530 |
-
prompt: str = "Masterpiece, Best Quality, Hyper-Realistic, Super-Realistic.",
|
531 |
-
negative_prompt: str = "Blurry, Shiny,
|
532 |
seed: int = random.randint(0, MAX_SEED),
|
533 |
upscale_factor: int = 2,
|
534 |
controlnet_scale: float = 0.6,
|
@@ -1319,9 +1319,9 @@ def handle_generation(h,w,d):
|
|
1319 |
d = re.sub(r"([ \t]){1,}", " ", d)
|
1320 |
d = re.sub(r"(\. \.)", ".", d).lower().strip()
|
1321 |
|
1322 |
-
neg = f"Textual, Text, Blurry, Shiny,
|
1323 |
q = "\""
|
1324 |
-
pos = f'Masterpiece, Best Quality, Hyper-Realistic, Super-Realistic{ d if d == "" else ", " + d }'
|
1325 |
|
1326 |
print(f"""
|
1327 |
Positive: {pos}
|
|
|
452 |
|
453 |
seq=512
|
454 |
image_steps=30
|
455 |
+
img_accu=9.0
|
456 |
|
457 |
# ui data
|
458 |
|
|
|
527 |
@spaces.GPU(duration=300)
|
528 |
def upscaler(
|
529 |
input_image: Image.Image,
|
530 |
+
prompt: str = "Masterpiece, Best Quality, Hyper-Realistic, Super-Realistic, Natural, Reasonable, Logical.",
|
531 |
+
negative_prompt: str = "Blurry, Distorted, Exceptional, Irregular, Unusual, Shiny, Smoothed, Polished, Low Quality, Worst Quality, Normal Quality, Anime Quality, Movies Quality.",
|
532 |
seed: int = random.randint(0, MAX_SEED),
|
533 |
upscale_factor: int = 2,
|
534 |
controlnet_scale: float = 0.6,
|
|
|
1319 |
d = re.sub(r"([ \t]){1,}", " ", d)
|
1320 |
d = re.sub(r"(\. \.)", ".", d).lower().strip()
|
1321 |
|
1322 |
+
neg = f"Textual, Text, Blurry, Distorted, Exceptional, Irregular, Unusual, Shiny, Smoothed, Polished, Low Quality, Worst Quality, Normal Quality, Anime Quality, Movies Quality."
|
1323 |
q = "\""
|
1324 |
+
pos = f'Masterpiece, Best Quality, Hyper-Realistic, Super-Realistic, Natural, Reasonable, Logical, { d if d == "" else ", " + d }'
|
1325 |
|
1326 |
print(f"""
|
1327 |
Positive: {pos}
|