lllyasviel / Fooocus

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

Fooocus crashes when face swap #1709

Closed 7fg44 closed 8 months ago

7fg44 commented 8 months ago

Read Troubleshoot

[x] I admit that I have read the Troubleshoot before making this issue.

Describe the problem A clear and concise description of what the bug is. ==When I use the face swap in Fooocus google colab, it crashes. might be related to SDXLClipModel, as it is one of the last lines before it crashes.

Full Console Log Paste full console log here. You will make our job easier if you give a full log. Running on public URL: https://6841427f9ca1b3dd3c.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) 2024-01-02 06:09:07.040198: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-01-02 06:09:07.040348: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-01-02 06:09:07.168317: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-01-02 06:09:09.586394: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT 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.logit_scale', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.text_projection'} Base model loaded: /content/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/content/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors]. Loaded LoRA [/content/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/content/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors] with 788 keys at weight 0.1. 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 0.81 seconds App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865 or https://6841427f9ca1b3dd3c.gradio.live/ Refiner disabled because base model and refiner are same. [Parameters] Adaptive CFG = 7 [Parameters] Sharpness = 2 [Parameters] ADM Scale = 1.5 : 0.8 : 0.3 [Parameters] CFG = 7.0 [Parameters] Seed = 3218107096 [Fooocus] Downloading control models ... [Fooocus] Loading control models ... extra clip vision: ['vision_model.embeddings.position_ids'] [Parameters] Sampler = dpmpp_sde - karras [Parameters] Steps = 30 - 15 [Fooocus] Initializing ... [Fooocus] Loading models ... Refiner unloaded. [Fooocus] Processing prompts ... [Fooocus] Preparing Fooocus text #1 ... [Prompt Expansion] George Clooney as a beautiful lady, sensual side smile,white hair, hyperdetailed photography, soft light, head and shoulders portrait, cover, highly detailed, sharp focus, bright colors, intricate, elegant, confident, glowing, rich deep aesthetic, cinematic, winning, true classic, romantic, full color, great composition, dynamic dramatic atmosphere, artistic [Fooocus] Preparing Fooocus text #2 ... [Prompt Expansion] George Clooney as a beautiful lady, sensual side smile,white hair, hyperdetailed photography, soft light, head and shoulders portrait, cover, depicted full intricate perfect celestial magical, background, sharp focus, highly detailed, elegant, cinematic, complex, glowing, rich deep colors, surreal, iconic, fine detail, very inspirational, professional, ambient, bright [Fooocus] Encoding positive #1 ... [Fooocus Model Management] Moving model(s) has taken 0.19 seconds [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 2.52 seconds Requested to load Resampler Loading 1 new model [Fooocus Model Management] Moving model(s) has taken 0.60 seconds Requested to load To_KV Loading 1 new model [Fooocus Model Management] Moving model(s) has taken 0.30 seconds [Parameters] Denoising Strength = 1.0 [Parameters] Initial Latent shape: Image Space (1024, 1024) Preparation time: 33.22 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.76 seconds 100% 30/30 [01:13<00:00, 2.44s/it] Requested to load AutoencoderKL Loading 1 new model [Fooocus Model Management] Moving model(s) has taken 0.47 seconds Image generated with private log at: /content/Fooocus/outputs/2024-01-02/log.html Generating and saving time: 81.44 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.45 seconds 73% 22/30 [00:58<00:21, 2.65s/it] User skipped Requested to load SDXLClipModel Requested to load GPT2LMHeadModel Loading 2 new models [Fooocus Model Management] Moving model(s) has taken 1.33 seconds Total time: 179.51 seconds Refiner disabled because base model and refiner are same. [Parameters] Adaptive CFG = 7 [Parameters] Sharpness = 2 [Parameters] ADM Scale = 1.5 : 0.8 : 0.3 [Parameters] CFG = 7.0 [Parameters] Seed = 3218107096 [Fooocus] Downloading control models ... [Fooocus] Loading control models ... [Parameters] Sampler = dpmpp_sde - karras [Parameters] Steps = 30 - 15 [Fooocus] Initializing ... [Fooocus] Loading models ... Refiner unloaded. [Fooocus] Processing prompts ... [Fooocus] Preparing Fooocus text #1 ... [Prompt Expansion] George Clooney as a beautiful lady, sensual side smile,white hair, hyperdetailed photography, soft light, head and shoulders portrait, cover, highly detailed, sharp focus, bright colors, intricate, elegant, confident, glowing, rich deep aesthetic, cinematic, winning, true classic, romantic, full color, great composition, dynamic dramatic atmosphere, artistic [Fooocus] Preparing Fooocus text #2 ... [Prompt Expansion] George Clooney as a beautiful lady, sensual side smile,white hair, hyperdetailed photography, soft light, head and shoulders portrait, cover, depicted full intricate perfect celestial magical, background, sharp focus, highly detailed, elegant, cinematic, complex, glowing, rich deep colors, surreal, iconic, fine detail, very inspirational, professional, ambient, bright [Fooocus] Encoding positive #1 ... [Fooocus Model Management] Moving model(s) has taken 0.15 seconds [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 1.27 seconds Requested to load Resampler Loading 1 new model [Fooocus Model Management] Moving model(s) has taken 0.61 seconds Requested to load To_KV Loading 1 new model [Fooocus Model Management] Moving model(s) has taken 0.30 seconds [Parameters] Denoising Strength = 1.0 [Parameters] Initial Latent shape: Image Space (1024, 1024) Preparation time: 9.31 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.83 seconds 100% 30/30 [02:53<00:00, 5.78s/it] Requested to load AutoencoderKL Loading 1 new model [Fooocus Model Management] Moving model(s) has taken 0.47 seconds Image generated with private log at: /content/Fooocus/outputs/2024-01-02/log.html Generating and saving time: 183.21 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.35 seconds 53% 16/30 [00:48<00:42, 3.02s/it] User skipped Requested to load SDXLClipModel Requested to load GPT2LMHeadModel Loading 2 new models [Fooocus Model Management] Moving model(s) has taken 1.08 seconds Total time: 247.10 seconds Refiner disabled because base model and refiner are same. [Parameters] Adaptive CFG = 7 [Parameters] Sharpness = 2 [Parameters] ADM Scale = 1.5 : 0.8 : 0.3 [Parameters] CFG = 7.0 [Parameters] Seed = 3218107096 [Fooocus] Downloading upscale models ... [Fooocus] Downloading inpainter ... Downloading: "https://huggingface.co/lllyasviel/fooocus_inpaint/resolve/main/fooocus_inpaint_head.pth" to /content/Fooocus/models/inpaint/fooocus_inpaint_head.pth

100% 51.4k/51.4k [00:00<00:00, 1.53MB/s] Downloading: "https://huggingface.co/lllyasviel/fooocus_inpaint/resolve/main/inpaint_v26.fooocus.patch" to /content/Fooocus/models/inpaint/inpaint_v26.fooocus.patch

100% 1.23G/1.23G [03:33<00:00, 6.20MB/s] [Inpaint] Current inpaint model is /content/Fooocus/models/inpaint/inpaint_v26.fooocus.patch [Parameters] Sampler = dpmpp_sde - karras [Parameters] Steps = 30 - 15 [Fooocus] Initializing ... [Fooocus] Loading models ... Synthetic Refiner Activated Synthetic Refiner Activated Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0], ('/content/Fooocus/models/inpaint/inpaint_v26.fooocus.patch', 1.0)] for model [/content/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors]. Loaded LoRA [/content/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/content/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors] with 788 keys at weight 0.1. Loaded LoRA [/content/Fooocus/models/inpaint/inpaint_v26.fooocus.patch] for UNet [/content/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors] with 960 keys at weight 1.0. Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/content/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors]. Loaded LoRA [/content/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/content/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors] with 788 keys at weight 0.1. Requested to load SDXLClipModel Loading 1 new model unload clone 1 ^C

mashb1t commented 8 months ago

Most likely your RAM is exhausted, which is why your process is cancelled. Please check and upgrade it or your plan.

See #1330, #1574, https://github.com/lllyasviel/Fooocus/issues/1558#issuecomment-1868166226

Closing as duplicate of #1574