weijielyu commited on
Commit
e8c4ba0
·
1 Parent(s): e44e69a
Files changed (1) hide show
  1. app.py +14 -11
app.py CHANGED
@@ -1,10 +1,17 @@
1
- # Copyright (C) 2025, FaceLift Research Group
2
- # https://github.com/weijielyu/FaceLift
3
  #
4
- # This software is free for non-commercial, research and evaluation use
5
- # under the terms of the LICENSE.md file.
 
6
  #
7
- # For inquiries contact: wlyu3@ucmerced.edu
 
 
 
 
 
 
 
8
 
9
  """
10
  FaceLift: Single Image 3D Face Reconstruction
@@ -24,9 +31,6 @@ if os.environ.get("HF_HUB_ENABLE_HF_TRANSFER") == "1":
24
  import json
25
  from pathlib import Path
26
  from datetime import datetime
27
- import uuid
28
- import time
29
- import shutil
30
 
31
  import gradio as gr
32
  import numpy as np
@@ -325,8 +329,7 @@ class FaceLiftPipeline:
325
  # Final CUDA cache clear
326
  torch.cuda.empty_cache()
327
 
328
- return str(input_path), str(multiview_path), str(output_path), \
329
- str(turntable_path), str(ply_path)
330
 
331
  except Exception as e:
332
  import traceback
@@ -348,7 +351,7 @@ def main():
348
 
349
  # Wrapper to return outputs for display
350
  def _generate_and_filter_outputs(image_path, auto_crop, guidance_scale, random_seed, num_steps):
351
- input_path, multiview_path, output_path, turntable_path, ply_path = \
352
  pipeline.generate_3d_head(image_path, auto_crop, guidance_scale, random_seed, num_steps)
353
 
354
  return output_path, turntable_path, str(ply_path), ply_path
 
1
+ # Copyright 2025 Adobe Inc.
 
2
  #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
  #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
 
16
  """
17
  FaceLift: Single Image 3D Face Reconstruction
 
31
  import json
32
  from pathlib import Path
33
  from datetime import datetime
 
 
 
34
 
35
  import gradio as gr
36
  import numpy as np
 
329
  # Final CUDA cache clear
330
  torch.cuda.empty_cache()
331
 
332
+ return str(output_path), str(turntable_path), str(ply_path)
 
333
 
334
  except Exception as e:
335
  import traceback
 
351
 
352
  # Wrapper to return outputs for display
353
  def _generate_and_filter_outputs(image_path, auto_crop, guidance_scale, random_seed, num_steps):
354
+ output_path, turntable_path, ply_path = \
355
  pipeline.generate_3d_head(image_path, auto_crop, guidance_scale, random_seed, num_steps)
356
 
357
  return output_path, turntable_path, str(ply_path), ply_path