Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faceswap crashes #1063

Closed
sondresorbye opened this issue Nov 29, 2023 · 6 comments
Closed

Faceswap crashes #1063

sondresorbye opened this issue Nov 29, 2023 · 6 comments

Comments

@sondresorbye
Copy link

Describe the problem
The program crashes when trying to use an image as prompt and selecting the faceswap advanced option

Full Console Log
Requirement already satisfied: pygit2==1.12.2 in /usr/local/lib/python3.10/dist-packages (1.12.2)
Requirement already satisfied: cffi>=1.9.1 in /usr/local/lib/python3.10/dist-packages (from pygit2==1.12.2) (1.16.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.9.1->pygit2==1.12.2) (2.21)
/content
fatal: destination path 'Fooocus' already exists and is not an empty directory.
/content/Fooocus
Already up-to-date
Update succeeded.
[System ARGV] ['entry_with_update.py', '--preset', 'realistic', '--share']
Loaded preset: /content/Fooocus/presets/realistic.json
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Fooocus version: 2.1.824
Running on local URL: http://127.0.0.1:7865/
Running on public URL: https://fb6371be5d9ced0c1d.gradio.live/

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run gradio deploy from Terminal to deploy to Spaces (https://huggingface.co/spaces)
Total VRAM 15102 MB, total RAM 12983 MB
2023-11-29 21:03:50.202601: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2023-11-29 21:03:50.202658: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2023-11-29 21:03:50.202708: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2023-11-29 21:03:52.244376: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Set vram state to: NORMAL_VRAM
Disabling smart memory management
Device: cuda:0 Tesla T4 : native
VAE dtype: torch.float32
Using pytorch cross attention
Refiner unloaded.
model_type EPS
adm 2816
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra keys {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.logit_scale'}
Base model loaded: /content/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors
Request to load LoRAs [['SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors', 0.25], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/content/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors].
Loaded LoRA [/content/Fooocus/models/loras/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for UNet [/content/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors] with 788 keys at weight 0.25.
Loaded LoRA [/content/Fooocus/models/loras/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for CLIP [/content/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors] with 264 keys at weight 0.25.
Fooocus V2 Expansion: Vocab with 642 words.
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 1.30 seconds
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865 or https://fb6371be5d9ced0c1d.gradio.live/
[Parameters] Adaptive CFG = 7
[Parameters] Sharpness = 2
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 604471590939558783
[Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[Parameters] Steps = 60 - 30
[Fooocus] Initializing ...
[Fooocus] Loading models ...
Refiner unloaded.
[Fooocus] Processing prompts ...
[Fooocus] Preparing Fooocus text #1 ...
[Prompt Expansion] Portrait of a young man on the beach, full light, gorgeous, amazing, elegant, intricate, highly detailed, dynamic, rich deep vivid colors, beautiful, very inspirational, inspiring, thought, fancy, sharp focus, colorful, epic, professional, artistic, new, charismatic, cool, brilliant, awesome, attractive, shiny, fine detail, pretty, focused, creative
[Fooocus] Preparing Fooocus text #2 ...
[Prompt Expansion] Portrait of a young man on the beach, full pretty, attractive, fine detail, intricate, elegant, luxury, elite, dramatic light, highly detailed, cinematic, complex, sharp focus, illuminated, amazing, marvelous, thought, epic, fabulous, colorful, shiny, brilliant, symmetry, great, excellent composition, ambient, dynamic, vibrant colors, relaxed, beautiful
[Fooocus] Encoding positive #1 ...
[Fooocus Model Management] Moving model(s) has taken 0.11 seconds
[Fooocus] Encoding positive #2 ...
[Fooocus] Encoding negative #1 ...
[Fooocus] Encoding negative #2 ...
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (1152, 896)
Preparation time: 3.60 seconds
[Sampler] refiner_swap_method = joint
[Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828
Requested to load SDXL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 2.40 seconds
100% 60/60 [00:55<00:00, 1.09it/s]
Image generated with private log at: /content/Fooocus/outputs/2023-11-29/log.html
Generating and saving time: 60.73 seconds
[Sampler] refiner_swap_method = joint
[Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828
Requested to load SDXL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 2.01 seconds
100% 60/60 [00:56<00:00, 1.06it/s]
Image generated with private log at: /content/Fooocus/outputs/2023-11-29/log.html
Generating and saving time: 61.85 seconds
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 1.57 seconds
Total time: 131.21 seconds
[Parameters] Adaptive CFG = 7
[Parameters] Sharpness = 2
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 7513856776859948774
[Fooocus] Downloading control models ...
[Fooocus] Loading control models ...
extra keys clip vision: ['vision_model.embeddings.position_ids']

@heypratik
Copy link

Same issue on windows. Faceswap crashes the program

@psychonaut97
Copy link

any other tools to use faceswap? thanks for any tipp

@itsachrafmansari
Copy link

@psychonaut97 : any other tools to use faceswap? thanks for any tipp

I found this replica of Fooocus API that has the FaceSwap feature working without errors (Altough you'll have to login with your GitHub account to use it and it's limited to a certain number of images before you have to pay to continue using it) : https://replicate.com/konieshadow/fooocus-api

Also, since the images produced by the FaceSwap feature may not be highly identical, I suggest making and scaling up the images with Fooocus, then using this face swapping service to get almost identical result of the real faces : https://remaker.ai/face-swap-free

Repository owner deleted a comment from stubkan Dec 12, 2023
@ccatty25250
Copy link

I still have this issue on the Colab workbook when using the Faceswap function. I don't know why this would happen.

@tbuyle
Copy link

tbuyle commented Dec 20, 2023

Try changing the last line of the colab with :

!python entry_with_update.py --share --preset --always-high-vram --all-in-fp16
See also #1377

@mashb1t mashb1t closed this as completed Dec 30, 2023
@mashb1t
Copy link
Collaborator

mashb1t commented Dec 30, 2023

see #1377 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants