- entklei.py +2 -14
entklei.py
CHANGED
@@ -233,24 +233,12 @@ def get_nude(original_pil, original_max_size=2000, generate_max_size=768, positi
|
|
233 |
|
234 |
dwpose_pil = dwpose(person_cropped_pil, 512)
|
235 |
|
236 |
-
|
237 |
expanded_mask_image_width, expanded_mask_image_height = expanded_mask_image.size
|
238 |
|
239 |
dwpose_pil_resized = dwpose_pil.resize(
|
240 |
(int(expanded_mask_image_width), int(expanded_mask_image_height)))
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
if with_big_tits or with_small_tits:
|
245 |
-
pipe = pipe_with_tit_slider
|
246 |
-
|
247 |
-
# if with_small_tits:
|
248 |
-
# pipe = pipe_with_small_tits
|
249 |
-
|
250 |
-
# if with_big_tits:
|
251 |
-
# pipe = pipe_with_big_tits
|
252 |
-
|
253 |
-
end_result_images = pipe(
|
254 |
positive_prompt,
|
255 |
negative_prompt=negative_prompt,
|
256 |
num_inference_steps=steps,
|
@@ -262,7 +250,7 @@ def get_nude(original_pil, original_max_size=2000, generate_max_size=768, positi
|
|
262 |
num_images_per_prompt=2,
|
263 |
height=round(new_size["height"]),
|
264 |
width=round(new_size["width"]),
|
265 |
-
cross_attention_kwargs={"scale": -0.8} if with_small_tits else {"scale": 0.7} if with_big_tits else {}
|
266 |
).images
|
267 |
|
268 |
# Function to create a mask for blurring edges
|
|
|
233 |
|
234 |
dwpose_pil = dwpose(person_cropped_pil, 512)
|
235 |
|
|
|
236 |
expanded_mask_image_width, expanded_mask_image_height = expanded_mask_image.size
|
237 |
|
238 |
dwpose_pil_resized = dwpose_pil.resize(
|
239 |
(int(expanded_mask_image_width), int(expanded_mask_image_height)))
|
240 |
|
241 |
+
end_result_images = pipe_with_tit_slider(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
positive_prompt,
|
243 |
negative_prompt=negative_prompt,
|
244 |
num_inference_steps=steps,
|
|
|
250 |
num_images_per_prompt=2,
|
251 |
height=round(new_size["height"]),
|
252 |
width=round(new_size["width"]),
|
253 |
+
cross_attention_kwargs={"scale": -0.8} if with_small_tits else {"scale": 0.7} if with_big_tits else { "scale": 0 }
|
254 |
).images
|
255 |
|
256 |
# Function to create a mask for blurring edges
|