lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
40.53k stars 5.66k forks source link

[Bug]: Faceswap is not working. #3246

Closed Shahfahad7866 closed 3 months ago

Shahfahad7866 commented 3 months ago

Checklist

What happened?

I am reporting this issue, as I tested this with two different installs. I am unable to create a face-swap in focus. Be it any image. I used this image and tried to do a face-swap, which didn't work. I tried this on two different Foocus installations and even tried a few days ago before installing a fresh Windows 11. Below are two logs where I used the same image for the face swap. However, log.zip the output image is not even close to the input image. And in one case when I choose to stop at 1 and weight 2 it gives some resemblance, but it is not a face swap 2024-07-07_20-14-28_8213

002 2024-07-07_20-00-14_5114 2024-07-07_20-04-09_8379 2024-07-07_20-04-36_4326 2024-07-07_20-12-44_6588 2024-07-07_20-13-10_2856 2024-07-07_20-14-01_4329

Steps to reproduce the problem

Tried two installs Also Tested on a freshly Installed Windows.

What should have happened?

Please check and see if it's a bug or if I am doing something incorrect.

What browsers do you use to access Fooocus?

Brave

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 11

Console logs

model_type EPS
UNet ADM Dimension 2816
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'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: D:\GenAI\SD Forge\webui\models\Stable-diffusion\realisticStockPhoto_v20.safetensors
VAE loaded: None
Request to load LoRAs [('SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors', 0.25)] for model [D:\GenAI\SD Forge\webui\models\Stable-diffusion\realisticStockPhoto_v20.safetensors].
Loaded LoRA [D:\GenAI\SD Forge\webui\models\Lora\SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for UNet [D:\GenAI\SD Forge\webui\models\Stable-diffusion\realisticStockPhoto_v20.safetensors] with 788 keys at weight 0.25.
Loaded LoRA [D:\GenAI\SD Forge\webui\models\Lora\SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for CLIP [D:\GenAI\SD Forge\webui\models\Stable-diffusion\realisticStockPhoto_v20.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.74 seconds
Started worker with PID 21908
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865
[Parameters] Adaptive CFG = 7
[Parameters] CLIP Skip = 2
[Parameters] Sharpness = 2
[Parameters] ControlNet Softness = 0.25
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 6134738731951851010
[Fooocus] Downloading control models ...
[Fooocus] Loading control models ...
extra clip vision: ['vision_model.embeddings.position_ids']
[Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[Parameters] Steps = 60 - 30
[Fooocus] Initializing ...
[Fooocus] Loading models ...
Refiner unloaded.
model_type EPS
UNet ADM Dimension 2816
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'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: D:\GenAI\SD Forge\webui\models\Stable-diffusion\EfficArt Studio SDXL 1.0.safetensors
VAE loaded: None
Request to load LoRAs [('SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors', 0.25), ('sdxl1.0_realastic_female_lora.safetensors', 0.8)] for model [D:\GenAI\SD Forge\webui\models\Stable-diffusion\EfficArt Studio SDXL 1.0.safetensors].
Loaded LoRA [D:\GenAI\SD Forge\webui\models\Lora\SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for UNet [D:\GenAI\SD Forge\webui\models\Stable-diffusion\EfficArt Studio SDXL 1.0.safetensors] with 788 keys at weight 0.25.
Loaded LoRA [D:\GenAI\SD Forge\webui\models\Lora\SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for CLIP [D:\GenAI\SD Forge\webui\models\Stable-diffusion\EfficArt Studio SDXL 1.0.safetensors] with 264 keys at weight 0.25.
Loaded LoRA [D:\GenAI\SD Forge\webui\models\Lora\sdxl1.0_realastic_female_lora.safetensors] for UNet [D:\GenAI\SD Forge\webui\models\Stable-diffusion\EfficArt Studio SDXL 1.0.safetensors] with 560 keys at weight 0.8.
Requested to load SDXLClipModel
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 4.06 seconds
[Fooocus] Processing prompts ...
[Fooocus] Preparing Fooocus text #1 ...
[Prompt Expansion] Indian girl with a curvy figure and long dark wet hair, sitting relaxed in a swimming Maldives sea, enjoying the water and the ambiance, wearing a black floral swimming costume, portrait shot, late evening environment, soft ambient moon lighting, serene and inviting atmosphere, water reflecting lights with a shimmering effect, relaxed and candid expression, high-quality, photorealistic, cinematic lighting, warm color scheme, digital art, trending on ArtStation, highly detailed, epic composition, intricate, elegant, dynamic, vibrant, rich deep colors, perfect, aesthetic, very inspirational, stunning, creative, positive, cute, innocent, beautiful, confident, passionate, pretty, attractive, inspiring, extremely handsome, agile, cool, smart, elite
[Fooocus] Encoding positive #1 ...
[Fooocus Model Management] Moving model(s) has taken 0.19 seconds
[Fooocus] Encoding negative #1 ...
[Fooocus] Image processing ...
Detected 1 faces
Requested to load CLIPVisionModelWithProjection
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 1.18 seconds
Requested to load Resampler
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.84 seconds
Requested to load To_KV
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.39 seconds
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (1152, 896)
Preparation time: 99.99 seconds
[Fooocus] Preparing task 1/1 ...
[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 5.96 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 60/60 [00:24<00:00,  2.47it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.17 seconds
[Fooocus] Saving image 1/1 to system ...
Image generated with private log at: D:\GenAI\Fooocus\Fooocus\outputs\2024-07-07\log.html
Generating and saving time: 31.73 seconds
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 0.50 seconds
[Parameters] Adaptive CFG = 7
[Parameters] CLIP Skip = 2
[Parameters] Sharpness = 2
[Parameters] ControlNet Softness = 0.25
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 998904957634675147
[Fooocus] Downloading control models ...
[Fooocus] Loading control models ...
[Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[Parameters] Steps = 60 - 30
[Fooocus] Initializing ...
[Fooocus] Loading models ...
Refiner unloaded.
model_type EPS
UNet ADM Dimension 2816
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'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: D:\GenAI\SD Forge\webui\models\Stable-diffusion\realisticStockPhoto_v20.safetensors
VAE loaded: None
Request to load LoRAs [('SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors', 0.25)] for model [D:\GenAI\SD Forge\webui\models\Stable-diffusion\realisticStockPhoto_v20.safetensors].
Loaded LoRA [D:\GenAI\SD Forge\webui\models\Lora\SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for UNet [D:\GenAI\SD Forge\webui\models\Stable-diffusion\realisticStockPhoto_v20.safetensors] with 788 keys at weight 0.25.
Loaded LoRA [D:\GenAI\SD Forge\webui\models\Lora\SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for CLIP [D:\GenAI\SD Forge\webui\models\Stable-diffusion\realisticStockPhoto_v20.safetensors] with 264 keys at weight 0.25.
Requested to load SDXLClipModel
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 1.24 seconds
[Fooocus] Processing prompts ...
[Fooocus] Preparing Fooocus text #1 ...
[Prompt Expansion] Indian girl with a curvy figure and long dark wet hair, sitting relaxed in a swimming Maldives sea, highly detailed, sharp focus, intricate, elegant, light glowing, translucent, transparent, cinematic, sublime, radiant, directed, full color, very inspirational, bright, spiritual, shiny, strong, amazing, epic, thought, futuristic, magical, vibrant, flowing
[Fooocus] Preparing Fooocus text #2 ...
[Prompt Expansion] Indian girl with a curvy figure and long dark wet hair, sitting relaxed in a swimming Maldives sea, highly detailed, lush romantic, elegant, intricate, dramatic light, sharp focus, elaborate, clear, artistic, fine detail, cinematic, sublime, iconic, brilliant, divine, unique, epic, coherent, imposing, extremely attractive, very creative, color rich, amazing
[Fooocus] Encoding positive #1 ...
[Fooocus] Encoding positive #2 ...
[Fooocus] Encoding negative #1 ...
[Fooocus] Encoding negative #2 ...
[Fooocus] Image processing ...
Detected 1 faces
Requested to load CLIPVisionModelWithProjection
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.66 seconds
Requested to load Resampler
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.21 seconds
Requested to load To_KV
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.11 seconds
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (1152, 896)
Preparation time: 45.27 seconds
[Fooocus] Preparing task 1/2 ...
[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 1.21 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 60/60 [00:24<00:00,  2.42it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.14 seconds
[Fooocus] Saving image 1/2 to system ...
Image generated with private log at: D:\GenAI\Fooocus\Fooocus\outputs\2024-07-07\log.html
Generating and saving time: 27.03 seconds
[Fooocus] Preparing task 2/2 ...
[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 1.04 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 60/60 [00:24<00:00,  2.42it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.13 seconds
[Fooocus] Saving image 2/2 to system ...
Image generated with private log at: D:\GenAI\Fooocus\Fooocus\outputs\2024-07-07\log.html
Generating and saving time: 26.77 seconds
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
Total time: 99.16 seconds
[Fooocus Model Management] Moving model(s) has taken 0.58 seconds
[Parameters] Adaptive CFG = 7
[Parameters] CLIP Skip = 2
[Parameters] Sharpness = 2
[Parameters] ControlNet Softness = 0.25
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 5187349796254084235
[Fooocus] Downloading control models ...
[Fooocus] Loading control models ...
[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] Indian girl with a curvy figure and long dark wet hair, sitting relaxed in a swimming Maldives sea, futuristic beautiful, detailed intricate stunning fine detail directed light, full color, gorgeous cinematic atmosphere, dynamic dramatic perfect professional composition, elegant, very inspirational, ambient aesthetic,, inspired, deep royal, glowing, rich vivid colors, creative, positive, vibrant, majestic, epic
[Fooocus] Preparing Fooocus text #2 ...
[Prompt Expansion] Indian girl with a curvy figure and long dark wet hair, sitting relaxed in a swimming Maldives sea, futuristic cool color luxurious contemporary shiny surreal lush new luxury stunning breathtaking royal great modern built imposing complex highly detailed cinematic light delicate perfect epic composition, complete deep rich colors, magic ambient background, amazing dynamic dramatic colorful vivid artistic, positive emotional, pure aesthetic, very inspirational, inspiring
[Fooocus] Encoding positive #1 ...
[Fooocus] Encoding positive #2 ...
[Fooocus] Encoding negative #1 ...
[Fooocus] Encoding negative #2 ...
[Fooocus] Image processing ...
Detected 1 faces
Requested to load CLIPVisionModelWithProjection
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.65 seconds
Requested to load Resampler
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.17 seconds
Requested to load To_KV
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.12 seconds
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (1152, 896)
Preparation time: 10.14 seconds
[Fooocus] Preparing task 1/2 ...
[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 1.16 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 60/60 [00:23<00:00,  2.55it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.13 seconds
[Fooocus] Saving image 1/2 to system ...
Image generated with private log at: D:\GenAI\Fooocus\Fooocus\outputs\2024-07-07\log.html
Generating and saving time: 25.72 seconds
[Fooocus] Preparing task 2/2 ...
[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 0.99 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 60/60 [00:24<00:00,  2.50it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.13 seconds
[Fooocus] Saving image 2/2 to system ...
Image generated with private log at: D:\GenAI\Fooocus\Fooocus\outputs\2024-07-07\log.html
Generating and saving time: 26.01 seconds
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
Total time: 61.95 seconds
[Fooocus Model Management] Moving model(s) has taken 0.56 seconds
[Parameters] Adaptive CFG = 7
[Parameters] CLIP Skip = 2
[Parameters] Sharpness = 2
[Parameters] ControlNet Softness = 0.25
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 3859180455763751590
[Fooocus] Downloading control models ...
[Fooocus] Loading control models ...
[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] Indian girl with a curvy figure and long dark wet hair, sitting relaxed in a swimming Maldives sea, intricate, elegant, highly detailed, lush, sharp focus, light shining, dramatic, expressive, cinematic, fine detail, professional still, full, exposed background, cute, dynamic, complex, rich, vibrant, color, illuminated, determined, attractive, futuristic, thought
[Fooocus] Preparing Fooocus text #2 ...
[Prompt Expansion] Indian girl with a curvy figure and long dark wet hair, sitting relaxed in a swimming Maldives sea, confident, full detail, sharp focus, graceful, elegant, sublime, highly detailed, dramatic light, beautiful background, cinematic, reflected, deep rich colors, radiant illumination, aesthetic, very inspirational, majestic, fascinating, thought, inspiring, complex, vibrant, iconic
[Fooocus] Encoding positive #1 ...
[Fooocus] Encoding positive #2 ...
[Fooocus] Encoding negative #1 ...
[Fooocus] Encoding negative #2 ...
[Fooocus] Image processing ...
Detected 1 faces
Requested to load CLIPVisionModelWithProjection
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.62 seconds
Requested to load Resampler
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.17 seconds
Requested to load To_KV
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.10 seconds
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (1152, 896)
Preparation time: 10.18 seconds
[Fooocus] Preparing task 1/2 ...
[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 1.05 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 60/60 [00:26<00:00,  2.28it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.13 seconds
[Fooocus] Saving image 1/2 to system ...
Image generated with private log at: D:\GenAI\Fooocus\Fooocus\outputs\2024-07-07\log.html
Generating and saving time: 28.31 seconds
[Fooocus] Preparing task 2/2 ...
[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 1.00 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 60/60 [00:25<00:00,  2.33it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.13 seconds
[Fooocus] Saving image 2/2 to system ...
Image generated with private log at: D:\GenAI\Fooocus\Fooocus\outputs\2024-07-07\log.html
Generating and saving time: 27.71 seconds
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
Total time: 66.27 seconds
[Fooocus Model Management] Moving model(s) has taken 0.48 seconds

Additional information

No response

kalle07 commented 3 months ago

for me it works fine (win10) fooocus 2.4.3 ...

usual 0.9 stop is okay and weight up to 1.1

but it dont swap the face like "face-swapper" or "reactor", it works different

mashb1t commented 3 months ago

Works for me. Please consider downscaling the input image to SDXL resolution for thr SI to better understand the content.