mart9992 commited on
Commit
329b71f
1 Parent(s): 176d2d4
Files changed (8) hide show
  1. __pycache__/main.cpython-310.pyc +0 -0
  2. babe.png +0 -0
  3. babe2.png +0 -0
  4. babe3.png +0 -0
  5. babe4.png +0 -0
  6. babe5.png +0 -0
  7. handler.py +0 -2
  8. 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

  • SHA256: de461ef7f240fd6aee0580f14610dfc5c005e636d2c772d07376ecbca1194586
  • Pointer size: 131 Bytes
  • Size of remote file: 752 kB
babe3.png CHANGED

Git LFS Details

  • SHA256: 6cf866d98ecd13767822c86da1be92eb6101ec228d7509d954d83557c7546f10
  • Pointer size: 131 Bytes
  • Size of remote file: 749 kB
babe4.png CHANGED

Git LFS Details

  • SHA256: b9c0e574b076bcee351f80ef7b8424aac8743bda54f46c17bdbcb37c3cf632b3
  • Pointer size: 131 Bytes
  • Size of remote file: 750 kB
babe5.png CHANGED

Git LFS Details

  • SHA256: 75dd5b6ad1a1f7ffa677fc5b678641ad19dca77aaf1813836eab345c98deb88d
  • Pointer size: 131 Bytes
  • Size of remote file: 751 kB
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.5])
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=[1])
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, loras=[], lora_weights=[], 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,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 = _.clone_deep(base_pipe)
293
 
294
  if with_small_tits:
295
- pipe = _.clone_deep(pipe_with_small_tits)
296
 
297
  if with_big_tits:
298
- pipe = _.clone_deep(pipe_with_big_tits)
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)