jbilcke-hf HF staff commited on
Commit
3886235
β€’
1 Parent(s): ff96b73

adding some notes and refs in the code

Browse files
Files changed (1) hide show
  1. engine.py +12 -1
engine.py CHANGED
@@ -118,6 +118,7 @@ class Engine:
118
  # Apply modifications based on params
119
  x_d_new = processed_data['x_s_info']['kp'].clone()
120
 
 
121
  modifications = [
122
  ('smile', [
123
  (0, 20, 1, -0.01), (0, 14, 1, -0.02), (0, 17, 1, 0.0065), (0, 17, 2, 0.003),
@@ -152,7 +153,17 @@ class Engine:
152
  (0, 2, 1, -0.001 if params.get('eyebrow', 0) > 0 else -0.0003),
153
  (0, 1, 0, -0.001 if params.get('eyebrow', 0) <= 0 else 0),
154
  (0, 2, 0, 0.001 if params.get('eyebrow', 0) <= 0 else 0)
155
- ])
 
 
 
 
 
 
 
 
 
 
156
  ]
157
 
158
  for param_name, adjustments in modifications:
 
118
  # Apply modifications based on params
119
  x_d_new = processed_data['x_s_info']['kp'].clone()
120
 
121
+ # Adapted from https://github.com/PowerHouseMan/ComfyUI-AdvancedLivePortrait/blob/main/nodes.py#L408-L472
122
  modifications = [
123
  ('smile', [
124
  (0, 20, 1, -0.01), (0, 14, 1, -0.02), (0, 17, 1, 0.0065), (0, 17, 2, 0.003),
 
153
  (0, 2, 1, -0.001 if params.get('eyebrow', 0) > 0 else -0.0003),
154
  (0, 1, 0, -0.001 if params.get('eyebrow', 0) <= 0 else 0),
155
  (0, 2, 0, 0.001 if params.get('eyebrow', 0) <= 0 else 0)
156
+ ]),
157
+ # Some other ones: https://github.com/jbilcke-hf/FacePoke/issues/22#issuecomment-2408708028
158
+ # Still need to check how exactly we would control those in the UI,
159
+ # as we don't have yet segmentation in the frontend UI for those body parts
160
+ #('lower_lip', [
161
+ # (0, 19, 1, 0.02)
162
+ #]),
163
+ #('upper_lip', [
164
+ # (0, 20, 1, -0.01)
165
+ #]),
166
+ #('neck', [(0, 5, 1, 0.01)]),
167
  ]
168
 
169
  for param_name, adjustments in modifications: