Spaces:
Running
Running
yizhangliu
commited on
Commit
•
3079cc3
1
Parent(s):
f73b71e
Update app.py
Browse files
app.py
CHANGED
@@ -93,6 +93,27 @@ def process(init_image, mask):
|
|
93 |
size_limit = int(size_limit)
|
94 |
|
95 |
config = Config(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
'''
|
97 |
ldm_steps=form["ldmSteps"],
|
98 |
ldm_sampler=form["ldmSampler"],
|
@@ -121,9 +142,11 @@ def process(init_image, mask):
|
|
121 |
if config.sd_seed == -1:
|
122 |
config.sd_seed = random.randint(1, 999999999)
|
123 |
|
124 |
-
logger.info(f"Origin image shape: {original_shape}")
|
|
|
125 |
image = resize_max_size(image, size_limit=size_limit, interpolation=interpolation)
|
126 |
-
logger.info(f"Resized image shape: {image.shape}")
|
|
|
127 |
|
128 |
mask, _ = load_img(input["mask"].read(), gray=True)
|
129 |
mask = resize_max_size(mask, size_limit=size_limit, interpolation=interpolation)
|
|
|
93 |
size_limit = int(size_limit)
|
94 |
|
95 |
config = Config(
|
96 |
+
ldm_steps=25,
|
97 |
+
ldm_sampler='plms',
|
98 |
+
zits_wireframe=True,
|
99 |
+
hd_strategy='Original',
|
100 |
+
hd_strategy_crop_margin=196,
|
101 |
+
hd_strategy_crop_trigger_size=1280,
|
102 |
+
hd_strategy_resize_limit=2048,
|
103 |
+
prompt='',
|
104 |
+
use_croper=False,
|
105 |
+
croper_x=0,
|
106 |
+
croper_y=0,
|
107 |
+
croper_height=512,
|
108 |
+
croper_width=512,
|
109 |
+
sd_mask_blur=5,
|
110 |
+
sd_strength=0.75,
|
111 |
+
sd_steps=50,
|
112 |
+
sd_guidance_scale=7.5,
|
113 |
+
sd_sampler='ddim',
|
114 |
+
sd_seed=42,
|
115 |
+
cv2_flag='INPAINT_NS',
|
116 |
+
cv2_radius=5,
|
117 |
'''
|
118 |
ldm_steps=form["ldmSteps"],
|
119 |
ldm_sampler=form["ldmSampler"],
|
|
|
142 |
if config.sd_seed == -1:
|
143 |
config.sd_seed = random.randint(1, 999999999)
|
144 |
|
145 |
+
# logger.info(f"Origin image shape: {original_shape}")
|
146 |
+
print(f"Origin image shape: {original_shape}")
|
147 |
image = resize_max_size(image, size_limit=size_limit, interpolation=interpolation)
|
148 |
+
# logger.info(f"Resized image shape: {image.shape}")
|
149 |
+
print(f"Resized image shape: {image.shape}")
|
150 |
|
151 |
mask, _ = load_img(input["mask"].read(), gray=True)
|
152 |
mask = resize_max_size(mask, size_limit=size_limit, interpolation=interpolation)
|