Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -176,8 +176,6 @@ tag_model.to(device, dtype=weight_dtype)
|
|
| 176 |
def process(
|
| 177 |
input_image: Image.Image,
|
| 178 |
user_prompt: str,
|
| 179 |
-
positive_prompt: str,
|
| 180 |
-
negative_prompt: str,
|
| 181 |
num_inference_steps: int,
|
| 182 |
scale_factor: int,
|
| 183 |
cfg_scale: float,
|
|
@@ -186,6 +184,8 @@ def process(
|
|
| 186 |
latent_tiled_overlap: int,
|
| 187 |
sample_times: int
|
| 188 |
) -> List[np.ndarray]:
|
|
|
|
|
|
|
| 189 |
process_size = 512
|
| 190 |
resize_preproc = transforms.Compose([
|
| 191 |
transforms.Resize(process_size, interpolation=transforms.InterpolationMode.BILINEAR),
|
|
@@ -290,8 +290,6 @@ with block:
|
|
| 290 |
[
|
| 291 |
"preset/datasets/test_datasets/179.png",
|
| 292 |
"",
|
| 293 |
-
"clean, high-resolution, 8k, best quality, masterpiece",
|
| 294 |
-
"dotted, noise, blur, lowres, oversmooth, longbody, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
|
| 295 |
50,
|
| 296 |
4,
|
| 297 |
7.5,
|
|
@@ -303,8 +301,6 @@ with block:
|
|
| 303 |
[
|
| 304 |
"preset/datasets/test_datasets/apologise.png",
|
| 305 |
"",
|
| 306 |
-
"clean, high-resolution, 8k, best quality, masterpiece",
|
| 307 |
-
"dotted, noise, blur, lowres, oversmooth, longbody, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
|
| 308 |
50,
|
| 309 |
4,
|
| 310 |
7.5,
|
|
@@ -317,8 +313,6 @@ with block:
|
|
| 317 |
inputs=[
|
| 318 |
input_image,
|
| 319 |
user_prompt,
|
| 320 |
-
positive_prompt,
|
| 321 |
-
negative_prompt,
|
| 322 |
num_inference_steps,
|
| 323 |
scale_factor,
|
| 324 |
cfg_scale,
|
|
@@ -334,8 +328,6 @@ with block:
|
|
| 334 |
inputs = [
|
| 335 |
input_image,
|
| 336 |
user_prompt,
|
| 337 |
-
positive_prompt,
|
| 338 |
-
negative_prompt,
|
| 339 |
num_inference_steps,
|
| 340 |
scale_factor,
|
| 341 |
cfg_scale,
|
|
|
|
| 176 |
def process(
|
| 177 |
input_image: Image.Image,
|
| 178 |
user_prompt: str,
|
|
|
|
|
|
|
| 179 |
num_inference_steps: int,
|
| 180 |
scale_factor: int,
|
| 181 |
cfg_scale: float,
|
|
|
|
| 184 |
latent_tiled_overlap: int,
|
| 185 |
sample_times: int
|
| 186 |
) -> List[np.ndarray]:
|
| 187 |
+
positive_prompt = "clean, high-resolution, 8k, best quality, masterpiece",
|
| 188 |
+
negative_prompt = "dotted, noise, blur, lowres, oversmooth, longbody, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
|
| 189 |
process_size = 512
|
| 190 |
resize_preproc = transforms.Compose([
|
| 191 |
transforms.Resize(process_size, interpolation=transforms.InterpolationMode.BILINEAR),
|
|
|
|
| 290 |
[
|
| 291 |
"preset/datasets/test_datasets/179.png",
|
| 292 |
"",
|
|
|
|
|
|
|
| 293 |
50,
|
| 294 |
4,
|
| 295 |
7.5,
|
|
|
|
| 301 |
[
|
| 302 |
"preset/datasets/test_datasets/apologise.png",
|
| 303 |
"",
|
|
|
|
|
|
|
| 304 |
50,
|
| 305 |
4,
|
| 306 |
7.5,
|
|
|
|
| 313 |
inputs=[
|
| 314 |
input_image,
|
| 315 |
user_prompt,
|
|
|
|
|
|
|
| 316 |
num_inference_steps,
|
| 317 |
scale_factor,
|
| 318 |
cfg_scale,
|
|
|
|
| 328 |
inputs = [
|
| 329 |
input_image,
|
| 330 |
user_prompt,
|
|
|
|
|
|
|
| 331 |
num_inference_steps,
|
| 332 |
scale_factor,
|
| 333 |
cfg_scale,
|