linoyts HF Staff commited on
Commit
e651a6d
·
verified ·
1 Parent(s): 33e374c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -15
app.py CHANGED
@@ -19,21 +19,7 @@ REPO_ID_DISTILLED = "black-forest-labs/FLUX.2-klein-9B"
19
  LORA_REPO_ID = "Alissonerdx/BFS-Best-Face-Swap"
20
  LORA_FILENAME = "bfs_head_v1_flux-klein_9b_step3750_rank64.safetensors"
21
 
22
- FACE_SWAP_PROMPT = """head_swap: start with Picture 1 as the base image, keeping its lighting, environment, and background. Remove the head from Picture 1 completely and replace it with the head from Picture 2.
23
-
24
- FROM PICTURE 1 (strictly preserve):
25
- - Scene: lighting conditions, shadows, highlights, color temperature, environment, background
26
- - Head positioning: exact rotation angle, tilt, direction the head is facing
27
- - Expression: facial expression, micro-expressions, eye gaze direction, mouth position, emotion
28
-
29
- FROM PICTURE 2 (strictly preserve identity):
30
- - Facial structure: face shape, bone structure, jawline, chin
31
- - All facial features: eye color, eye shape, nose structure, lip shape and fullness, eyebrows
32
- - Hair: color, style, texture, hairline
33
- - Skin: texture, tone, complexion
34
-
35
- The replaced head must seamlessly match Picture 1's lighting and expression while maintaining the complete identity from Picture 2. High quality, photorealistic, sharp details, 4k."""
36
-
37
  print("Loading FLUX.2 Klein 9B Distilled model...")
38
  pipe = Flux2KleinPipeline.from_pretrained(REPO_ID_DISTILLED, torch_dtype=dtype)
39
  pipe.to(device)
 
19
  LORA_REPO_ID = "Alissonerdx/BFS-Best-Face-Swap"
20
  LORA_FILENAME = "bfs_head_v1_flux-klein_9b_step3750_rank64.safetensors"
21
 
22
+ FACE_SWAP_PROMPT = "head_swap: start with Picture 1 as the base image, keeping its lighting, environment, and background. remove the head from Picture 1 completely and replace it with the head from Picture 2, strictly preserving the hair, eye color, nose structure of Picture 2. copy the direction of the eye, head rotation, micro expressions from Picture 1, high quality, sharp details, 4k."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  print("Loading FLUX.2 Klein 9B Distilled model...")
24
  pipe = Flux2KleinPipeline.from_pretrained(REPO_ID_DISTILLED, torch_dtype=dtype)
25
  pipe.to(device)