parent
96c124491e
commit
53f4b3d677
@ -87,12 +87,11 @@ def reactor_api(_: gr.Blocks, app: FastAPI):
|
||||
if result_file_path == "":
|
||||
result_file_path = default_file_path()
|
||||
try:
|
||||
result.save(result_file_path, format='PNG')
|
||||
result[0].save(result_file_path, format='PNG')
|
||||
logger.info("Result has been saved to: %s", result_file_path)
|
||||
except Exception as e:
|
||||
logger.error("Error while saving result: %s",e)
|
||||
finally:
|
||||
logger.info("Result has been saved to: %s", result_file_path)
|
||||
return {"image": api.encode_pil_to_base64(result)}
|
||||
return {"image": api.encode_pil_to_base64(result[0])}
|
||||
|
||||
@app.get("/reactor/models")
|
||||
async def reactor_models():
|
||||
|
||||
@ -246,6 +246,8 @@ class FaceSwapScript(scripts.Script):
|
||||
self.source_faces_index = [0]
|
||||
if len(self.faces_index) == 0:
|
||||
self.faces_index = [0]
|
||||
if self.save_original is None:
|
||||
self.save_original = False
|
||||
|
||||
if self.source is not None:
|
||||
apply_logging_patch(console_logging_level)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user