Astridkraft commited on
Commit
be56025
·
verified ·
1 Parent(s): 4723b2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -67,7 +67,7 @@ def auto_negative_prompt(positive_prompt):
67
  "model", "actor", "actress", "celebrity", "avatar", "group"]):
68
  negatives.append(
69
  "blurry face, lowres face, deformed pupils, bad anatomy, malformed hands, extra fingers, uneven eyes, distorted face, "
70
- "unrealistic skin, mutated, ugly, disfigured, poorly drawn face, "
71
  "missing limbs, extra limbs, fused fingers, too many fingers, bad teeth, "
72
  "mutated hands, long neck, extra wings, multiple wings,grainy face, noisy face, "
73
  "compression artifacts, rendering artifacts, digital artifacts, overprocessed face, oversmoothed face "
@@ -421,7 +421,10 @@ def enhanced_composite_with_sam(original_image, inpaint_result, original_mask,
421
  edited_rgba = edited_region_fullsize.convert("RGBA")
422
  # Dadurch werden in die Folie der weichen SAM-Maske wieder an den Stellen schwarze/transparente Löcher
423
  # gerissen wo der Hintergrund innerhalb der BBox bleiben muß!
424
- mask_rgba = soft_mask.convert("L") # SAM-Maske als Alpha-Kanal
 
 
 
425
 
426
  # generiere hiermit ein neues transparantes Bild in original BBox-Größe (unsichtbare Trägerfolie)
427
  temp_image = Image.new("RGBA", original_bbox_size, (0, 0, 0, 0))
 
67
  "model", "actor", "actress", "celebrity", "avatar", "group"]):
68
  negatives.append(
69
  "blurry face, lowres face, deformed pupils, bad anatomy, malformed hands, extra fingers, uneven eyes, distorted face, "
70
+ "unrealisticy skin, mutated, ugly, disfigured, poorly drawn face, "
71
  "missing limbs, extra limbs, fused fingers, too many fingers, bad teeth, "
72
  "mutated hands, long neck, extra wings, multiple wings,grainy face, noisy face, "
73
  "compression artifacts, rendering artifacts, digital artifacts, overprocessed face, oversmoothed face "
 
421
  edited_rgba = edited_region_fullsize.convert("RGBA")
422
  # Dadurch werden in die Folie der weichen SAM-Maske wieder an den Stellen schwarze/transparente Löcher
423
  # gerissen wo der Hintergrund innerhalb der BBox bleiben muß!
424
+ mask_rgba = soft_mask.convert("L") # SAM-Maske als Alpha-Kanal also als Löcherfolie
425
+
426
+ print(f"🔍 Alpha-Maske Werte: min={np.array(mask_rgba).min()}, max={np.array(mask_rgba).max()}")
427
+ print(f"🔍 Generierte Person Alpha: {edited_rgba.getchannel('A').getextrema()}")
428
 
429
  # generiere hiermit ein neues transparantes Bild in original BBox-Größe (unsichtbare Trägerfolie)
430
  temp_image = Image.new("RGBA", original_bbox_size, (0, 0, 0, 0))