- entklei.py +14 -10
- handler.py +1 -1
entklei.py
CHANGED
@@ -135,13 +135,13 @@ pipe_with_tit_slider = _.clone_deep(base_pipe)
|
|
135 |
|
136 |
pipe_with_tit_slider.load_lora_weights(os.path.join("/repository" if is_production else ".", "models", "breastsizeslideroffset.safetensors"), weight_name="breastsizeslideroffset.safetensors", adapter_name="breastsizeslideroffset")
|
137 |
|
138 |
-
pipe_with_small_tits = _.clone_deep(pipe_with_tit_slider)
|
139 |
-
pipe_with_small_tits.set_adapters("breastsizeslideroffset", adapter_weights=[-0.8])
|
140 |
|
141 |
-
pipe_with_medium_tits = _.clone_deep(base_pipe)
|
142 |
|
143 |
-
pipe_with_big_tits = _.clone_deep(pipe_with_tit_slider)
|
144 |
-
pipe_with_big_tits.set_adapters("breastsizeslideroffset", adapter_weights=[0.7])
|
145 |
|
146 |
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, get_mask_function=None, with_small_tits=False, with_big_tits=False):
|
147 |
try:
|
@@ -241,11 +241,14 @@ def get_nude(original_pil, original_max_size=2000, generate_max_size=768, positi
|
|
241 |
|
242 |
pipe = base_pipe
|
243 |
|
244 |
-
if with_small_tits:
|
245 |
-
pipe =
|
246 |
|
247 |
-
if
|
248 |
-
|
|
|
|
|
|
|
249 |
|
250 |
end_result_images = pipe(
|
251 |
positive_prompt,
|
@@ -258,7 +261,8 @@ def get_nude(original_pil, original_max_size=2000, generate_max_size=768, positi
|
|
258 |
control_image=dwpose_pil_resized,
|
259 |
num_images_per_prompt=2,
|
260 |
height=round(new_size["height"]),
|
261 |
-
width=round(new_size["width"])
|
|
|
262 |
).images
|
263 |
|
264 |
# Function to create a mask for blurring edges
|
|
|
135 |
|
136 |
pipe_with_tit_slider.load_lora_weights(os.path.join("/repository" if is_production else ".", "models", "breastsizeslideroffset.safetensors"), weight_name="breastsizeslideroffset.safetensors", adapter_name="breastsizeslideroffset")
|
137 |
|
138 |
+
# pipe_with_small_tits = _.clone_deep(pipe_with_tit_slider)
|
139 |
+
# pipe_with_small_tits.set_adapters("breastsizeslideroffset", adapter_weights=[-0.8])
|
140 |
|
141 |
+
# pipe_with_medium_tits = _.clone_deep(base_pipe)
|
142 |
|
143 |
+
# pipe_with_big_tits = _.clone_deep(pipe_with_tit_slider)
|
144 |
+
# pipe_with_big_tits.set_adapters("breastsizeslideroffset", adapter_weights=[0.7])
|
145 |
|
146 |
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, get_mask_function=None, with_small_tits=False, with_big_tits=False):
|
147 |
try:
|
|
|
241 |
|
242 |
pipe = base_pipe
|
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,
|
|
|
261 |
control_image=dwpose_pil_resized,
|
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
|
handler.py
CHANGED
@@ -26,7 +26,7 @@ if is_production:
|
|
26 |
sys.path.insert(0, '/repository')
|
27 |
|
28 |
if install_stuff:
|
29 |
-
result = subprocess.run(['pip', 'install', "-u", 'peft'], check=True)
|
30 |
result = subprocess.run(['pip', 'install', '-e', 'GroundingDINO'], check=True)
|
31 |
print(f'pip install GroundingDINO = {result}')
|
32 |
|
|
|
26 |
sys.path.insert(0, '/repository')
|
27 |
|
28 |
if install_stuff:
|
29 |
+
# result = subprocess.run(['pip', 'install', "-u", 'peft'], check=True)
|
30 |
result = subprocess.run(['pip', 'install', '-e', 'GroundingDINO'], check=True)
|
31 |
print(f'pip install GroundingDINO = {result}')
|
32 |
|