- __pycache__/main.cpython-310.pyc +0 -0
- babe.png +0 -0
- babe2.png +0 -0
- babe3.png +0 -0
- babe4.png +0 -0
- babe5.png +0 -0
- handler.py +0 -2
- main.py +6 -10
__pycache__/main.cpython-310.pyc
CHANGED
Binary files a/__pycache__/main.cpython-310.pyc and b/__pycache__/main.cpython-310.pyc differ
|
|
babe.png
DELETED
Binary file (753 kB)
|
|
babe2.png
CHANGED
Git LFS Details
|
babe3.png
CHANGED
Git LFS Details
|
babe4.png
CHANGED
Git LFS Details
|
babe5.png
CHANGED
Git LFS Details
|
handler.py
CHANGED
@@ -64,8 +64,6 @@ class EndpointHandler():
|
|
64 |
|
65 |
replicate_api_key = data.get("replicate_api_key", "")
|
66 |
|
67 |
-
print("got repli", replicate_api_key)
|
68 |
-
|
69 |
with_small_tits = data.get("with_small_tits", False)
|
70 |
|
71 |
with_big_tits = data.get("with_big_tits", False)
|
|
|
64 |
|
65 |
replicate_api_key = data.get("replicate_api_key", "")
|
66 |
|
|
|
|
|
67 |
with_small_tits = data.get("with_small_tits", False)
|
68 |
|
69 |
with_big_tits = data.get("with_big_tits", False)
|
main.py
CHANGED
@@ -187,14 +187,14 @@ pipe_with_tit_slider.load_lora_weights(os.path.join(os.environ.get(
|
|
187 |
'path', "."), "models", "breastsizeslideroffset.safetensors"), weight_name="breastsizeslideroffset.safetensors", adapter_name="breastsizeslideroffset")
|
188 |
|
189 |
pipe_with_small_tits = _.clone_deep(pipe_with_tit_slider)
|
190 |
-
pipe_with_small_tits.set_adapters("breastsizeslideroffset", adapter_weights=[-0.
|
191 |
|
192 |
pipe_with_medium_tits = _.clone_deep(base_pipe)
|
193 |
|
194 |
pipe_with_big_tits = _.clone_deep(pipe_with_tit_slider)
|
195 |
-
pipe_with_big_tits.set_adapters("breastsizeslideroffset", adapter_weights=[
|
196 |
|
197 |
-
def get_nude(original_pil, original_max_size=2000, generate_max_size=768, positive_prompt="nude girl, pussy, tits", negative_prompt="ugly", steps=20, cfg_scale=7,
|
198 |
try:
|
199 |
exif_data = original_pil._getexif()
|
200 |
orientation_tag = 274 # The Exif tag for orientation
|
@@ -289,13 +289,13 @@ def get_nude(original_pil, original_max_size=2000, generate_max_size=768, positi
|
|
289 |
dwpose_pil_resized = dwpose_pil.resize(
|
290 |
(int(expanded_mask_image_width), int(expanded_mask_image_height)))
|
291 |
|
292 |
-
pipe =
|
293 |
|
294 |
if with_small_tits:
|
295 |
-
pipe =
|
296 |
|
297 |
if with_big_tits:
|
298 |
-
pipe =
|
299 |
|
300 |
end_result_images = pipe(
|
301 |
positive_prompt,
|
@@ -311,10 +311,6 @@ def get_nude(original_pil, original_max_size=2000, generate_max_size=768, positi
|
|
311 |
width=round(new_size["width"])
|
312 |
).images
|
313 |
|
314 |
-
pipe.disable_lora()
|
315 |
-
|
316 |
-
del pipe
|
317 |
-
|
318 |
# Function to create a mask for blurring edges
|
319 |
def create_blurred_edge_mask(image, blur_radius):
|
320 |
mask = Image.new("L", image.size, 0)
|
|
|
187 |
'path', "."), "models", "breastsizeslideroffset.safetensors"), weight_name="breastsizeslideroffset.safetensors", adapter_name="breastsizeslideroffset")
|
188 |
|
189 |
pipe_with_small_tits = _.clone_deep(pipe_with_tit_slider)
|
190 |
+
pipe_with_small_tits.set_adapters("breastsizeslideroffset", adapter_weights=[-0.8])
|
191 |
|
192 |
pipe_with_medium_tits = _.clone_deep(base_pipe)
|
193 |
|
194 |
pipe_with_big_tits = _.clone_deep(pipe_with_tit_slider)
|
195 |
+
pipe_with_big_tits.set_adapters("breastsizeslideroffset", adapter_weights=[0.7])
|
196 |
|
197 |
+
def get_nude(original_pil, original_max_size=2000, generate_max_size=768, positive_prompt="nude girl, pussy, tits", negative_prompt="ugly", steps=20, cfg_scale=7, replicate_api_key="", with_small_tits=False, with_big_tits=False):
|
198 |
try:
|
199 |
exif_data = original_pil._getexif()
|
200 |
orientation_tag = 274 # The Exif tag for orientation
|
|
|
289 |
dwpose_pil_resized = dwpose_pil.resize(
|
290 |
(int(expanded_mask_image_width), int(expanded_mask_image_height)))
|
291 |
|
292 |
+
pipe = base_pipe
|
293 |
|
294 |
if with_small_tits:
|
295 |
+
pipe = pipe_with_small_tits
|
296 |
|
297 |
if with_big_tits:
|
298 |
+
pipe = pipe_with_big_tits
|
299 |
|
300 |
end_result_images = pipe(
|
301 |
positive_prompt,
|
|
|
311 |
width=round(new_size["width"])
|
312 |
).images
|
313 |
|
|
|
|
|
|
|
|
|
314 |
# Function to create a mask for blurring edges
|
315 |
def create_blurred_edge_mask(image, blur_radius):
|
316 |
mask = Image.new("L", image.size, 0)
|