Cookie not loading when downloading instagram videos

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm asking a question and **not** reporting a bug or requesting a feature
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Please make sure the question is worded well enough to be understood

I tried to download instagram videos with this code but the cookie does not load.

But with ```yt-dlp --cookies instagram_cookie.txt "https://www.instagram.com/p/C9SEsmYCx_M/?hl=ja"``` it does.
Is there something wrong with my code? If so, please let me know the solution.
Sorry if I have missed something.

```
from yt_dlp import YoutubeDL
import subprocess

def download_video(url):
    if url in ".m3u8":
        subprocess.run(f'ffmpeg -i {url} -c copy "%name%.mp4"', shell=True)
        print("m3u8ファイルをダウンロードました")
    else:
        ydl_opts = {
          'format': 'best[ext=mp4]',
          'outtmpl': '%(title)s.%(ext)s',
          'verbose': True,
        }

        if "instagram.com" in url:
            ydl_opts["cookies"] = "instagram_cookie.txt"
            print(ydl_opts)

        with YoutubeDL(ydl_opts) as ydl:
            result = ydl.extract_info(url, download=True)
            file_path = ydl.prepare_filename(result)
            print(f"{file_path}をダウンロードました")

        return file_path

if __name__ == "__main__":
    download_video(input("URL:"))
```

### Provide verbose output that clearly demonstrates the problem

- [ ] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
URL:https://www.instagram.com/p/C9SEsmYCx_M/?hl=ja
{'format': 'best[ext=mp4]', 'outtmpl': '%(title)s.%(ext)s', 'verbose': True, 'cookies': 'instagram_cookie.txt'}
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.07.13.232701 from yt-dlp/yt-dlp-nightly-builds [150ecc45d] (pip) API
[debug] params: {'format': 'best[ext=mp4]', 'outtmpl': '%(title)s.%(ext)s', 'verbose': True, 'cookies': 'instagram_cookie.txt', 'compat_opts': set(), 'http_headers': {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'en-us,en;q=0.5', 'Sec-Fetch-Mode': 'navigate'}}
[debug] Python 3.10.14 (CPython x86_64 64bit) - Linux-6.5.0-1023-gcp-x86_64-with-glibc2.39 (OpenSSL 3.0.13 30 Jan 2024, glibc 2.39)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, mutagen-1.47.0, requests-2.32.3, sqlite3-3.45.3, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1834 extractors
[Instagram] Extracting URL: https://www.instagram.com/p/C9SEsmYCx_M/?hl=ja
[Instagram] C9SEsmYCx_M: Setting up session
[Instagram] C9SEsmYCx_M: Downloading JSON metadata
WARNING: [Instagram] C9SEsmYCx_M: General metadata extraction failed (some metadata might be missing).
[Instagram] C9SEsmYCx_M: Downloading webpage
WARNING: [Instagram] unable to extract shared data; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
WARNING: [Instagram] Main webpage is locked behind the login page. Retrying with embed webpage (some metadata might be missing).
[Instagram] C9SEsmYCx_M: Downloading embed webpage
WARNING: [Instagram] unable to extract additional data; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
ERROR: [Instagram] C9SEsmYCx_M: Requested content is not available, rate-limit reached or login required. Use --cookies, --cookies-from-browser, --username and --password, --netrc-cmd, or --netrc (instagram) to provide account credentials
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 740, in extract
    ie_result = self._real_extract(url)
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/extractor/instagram.py", line 460, in _real_extract
    self.raise_login_required('Requested content is not available, rate-limit reached or login required')
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1245, in raise_login_required
    raise ExtractorError(msg, expected=True)

Traceback (most recent call last):
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1622, in wrapper
    return func(self, *args, **kwargs)
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1757, in __extract_info
    ie_result = ie.extract(url)
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 740, in extract
    ie_result = self._real_extract(url)
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/extractor/instagram.py", line 460, in _real_extract
    self.raise_login_required('Requested content is not available, rate-limit reached or login required')
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1245, in raise_login_required
    raise ExtractorError(msg, expected=True)
yt_dlp.utils.ExtractorError: [Instagram] C9SEsmYCx_M: Requested content is not available, rate-limit reached or login required. Use --cookies, --cookies-from-browser, --username and --password, --netrc-cmd, or --netrc (instagram) to provide account credentials

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/moive-download-exe/main.py", line 27, in <module>
    download_video(input("URL:"))
  File "/home/runner/moive-download-exe/main.py", line 20, in download_video
    result = ydl.extract_info(url, download=True)
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1611, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1640, in wrapper
    self.report_error(str(e), e.format_traceback())
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1088, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "/home/runner/moive-download-exe/.pythonlibs/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1027, in trouble
    raise DownloadError(message, exc_info)
yt_dlp.utils.DownloadError: ERROR: [Instagram] C9SEsmYCx_M: Requested content is not available, rate-limit reached or login required. Use --cookies, --cookies-from-browser, --username and --password, --netrc-cmd, or --netrc (instagram) to provide account credentials
```


How to use --merge-output-format?

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm asking a question and **not** reporting a bug or requesting a feature
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Please make sure the question is worded well enough to be understood

Hello,

This is the first time I'm trying to use the "--merge-output-format" option to download and merge a video stream with an audio stream… and it failed:

```
youtube-dlp.exe -qF
youtube-dlp.exe -f '160+140' --merge-output-format mp4 https://www.youtube.com/watch?v=123ABC
Requested format is not available. Use --list-formats for a list of available formats
```

What is the right way to use that switch?

Thank you.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.08.06 from yt-dlp/yt-dlp [4d9231208] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2024-06-13-git-0060a368b1-essentials_build-www.gyan.dev (setts), ffprobe 2024-06-13-git-0060a368b1-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.35.5, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1830 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
[debug] Downloading _update_spec from https://github.com/yt-dlp/yt-dlp/releases/latest/download/_update_spec
[debug] Downloading SHA2-256SUMS from https://github.com/yt-dlp/yt-dlp/releases/download/2024.09.27/SHA2-256SUMS
Current version: stable@2024.08.06 from yt-dlp/yt-dlp
Latest version: stable@2024.09.27 from yt-dlp/yt-dlp
Current Build Hash: 468a6f8bf1d156ad173e000a40f696d4fbd69c5aa7360229329b9063a388e7d0
Updating to stable@2024.09.27 from yt-dlp/yt-dlp ...
[debug] Downloading yt-dlp.exe from https://github.com/yt-dlp/yt-dlp/releases/download/2024.09.27/yt-dlp.exe
Updated yt-dlp to stable@2024.09.27 from yt-dlp/yt-dlp
```


Workflow that can follow different paths and skip some of them.

### Feature Idea

Hi.
I am very interested in the ability to create a workflow that can follow different paths and skip some if they are not needed.

For example, I want to create an image and save it under a fixed name (unique). But tomorrow (or after restart) I want to run this workflow again and work with the already created image, which I created and saved earlier, and not waste time on its creation (upscale, modification, etc.), but just check if this image is in my folder, and if it is, then just load it and work with the loaded image, and the branch that creates the image will not run at all (skip this branch).
But it's important that the script does this by itself (without MUTE or BYPASS).

Example
![Screenshot_1](https://github.com/user-attachments/assets/840c86a0-7944-49ca-95fd-15825a632c7f)

This will help save a lot of time on complex workflows that need to be improved or modernized. And it can also save resources in case of a break or lack of memory - it will be possible to skip large parts of the scheme if they have already been made and saved (without keeping in memory models that have already worked).

### Existing Solutions

I've been trying for a long time to find out if such a possibility exists, but I couldn't find it. If such a feature is already implemented, where can I find it? Thanks.

### Other

_No response_


Hi there,
somehow i cant get unCLIP to work

The .png has the unclip example workflow i tried out, but it gets stuck in the CLIPVisionEncode Module.
What can i do to solve this?

Error occurred when executing CLIPVisionEncode:

'NoneType' object has no attribute 'encode_image'

File "D:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 144, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 67, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\nodes.py", line 742, in encode
output = clip_vision.encode_image(image)

![unclip_2pass](https://github.com/comfyanonymous/ComfyUI/assets/141161676/51b5ed7c-d5d9-4b88-a973-a54882039653)


Problem with ComfyUI workflow "ControlNetApplySD3  'NoneType' object has no attribute 'copy'"

### Your question

I get the following error when running the workflow

I leave a video of what I am working on as a reference.

https://www.youtube.com/watch?v=MbQv8zoNEfY

video of reference

### Logs

```powershell
# ComfyUI Error Report
## Error Details
- **Node Type:** ControlNetApplySD3
- **Exception Type:** AttributeError
- **Exception Message:** 'NoneType' object has no attribute 'copy'
## Stack Trace

  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 848, in apply_controlnet
    c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
            ^^^^^^^^^^^^^^^^

```
## System Information
- **ComfyUI Version:** v0.2.3-3-g6632365
- **Arguments:** ComfyUI\main.py --windows-standalone-build
- **OS:** nt
- **Python Version:** 3.11.9 (tags/v3.11.9:de54cf5, Apr  2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
- **Embedded Python:** true
- **PyTorch Version:** 2.4.1+cu124
## Devices

- **Name:** cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
  - **Type:** cuda
  - **VRAM Total:** 25769148416
  - **VRAM Free:** 19327837688
  - **Torch VRAM Total:** 5100273664
  - **Torch VRAM Free:** 57107960

## Logs
```
2024-10-12 11:47:24,318 - root - INFO - Total VRAM 24575 MB, total RAM 65461 MB
2024-10-12 11:47:24,318 - root - INFO - pytorch version: 2.4.1+cu124
2024-10-12 11:47:24,318 - root - INFO - Set vram state to: NORMAL_VRAM
2024-10-12 11:47:24,318 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
2024-10-12 11:47:26,738 - root - INFO - Using pytorch cross attention
2024-10-12 11:47:32,778 - root - INFO - [Prompt Server] web root: D:\ComfyUI_windows_portable\ComfyUI\web
2024-10-12 11:47:36,818 - root - INFO - Total VRAM 24575 MB, total RAM 65461 MB
2024-10-12 11:47:36,818 - root - INFO - pytorch version: 2.4.1+cu124
2024-10-12 11:47:36,818 - root - INFO - Set vram state to: NORMAL_VRAM
2024-10-12 11:47:36,818 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
2024-10-12 11:47:37,468 - root - INFO -
Import times for custom nodes:
2024-10-12 11:47:37,468 - root - INFO -    0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
2024-10-12 11:47:37,468 - root - INFO -    0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\cg-use-everywhere
2024-10-12 11:47:37,468 - root - INFO -    0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale
2024-10-12 11:47:37,468 - root - INFO -    0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy
2024-10-12 11:47:37,468 - root - INFO -    0.0 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-KJNodes
2024-10-12 11:47:37,468 - root - INFO -    0.1 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_essentials
2024-10-12 11:47:37,468 - root - INFO -    0.1 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux
2024-10-12 11:47:37,468 - root - INFO -    0.3 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-eesahesNodes
2024-10-12 11:47:37,468 - root - INFO -    0.4 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
2024-10-12 11:47:37,468 - root - INFO -    0.4 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack
2024-10-12 11:47:37,468 - root - INFO -    1.1 seconds: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AdvancedLivePortrait
2024-10-12 11:47:37,468 - root - INFO -
2024-10-12 11:47:37,478 - root - INFO - Starting server

2024-10-12 11:47:37,478 - root - INFO - To see the GUI go to: http://127.0.0.1:8188
2024-10-12 12:16:10,093 - root - INFO - got prompt
2024-10-12 12:16:10,103 - root - ERROR - Failed to validate prompt for output 147:
2024-10-12 12:16:10,103 - root - ERROR - * UpscaleModelLoader 83:
2024-10-12 12:16:10,103 - root - ERROR -   - Value not in list: model_name: '4x-ClearRealityV1.pth' not in ['ClearRealityV1\\4x-ClearRealityV1.pth', 'ClearRealityV1\\4x-ClearRealityV1_Soft.pth', 'ClearRealityV1\\BROKEN_NCNN\\4x-ClearRealityV1-fp16.bin', 'ClearRealityV1\\BROKEN_NCNN\\4x-ClearRealityV1-fp32.bin', 'ClearRealityV1\\BROKEN_NCNN\\4x-ClearRealityV1_Soft-fp16.bin', 'ClearRealityV1\\BROKEN_NCNN\\4x-ClearRealityV1_Soft-fp32.bin']
2024-10-12 12:16:10,103 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,103 - root - ERROR - Failed to validate prompt for output 321:
2024-10-12 12:16:10,103 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,103 - root - ERROR - Failed to validate prompt for output 311:
2024-10-12 12:16:10,103 - root - ERROR - * InstantX Flux Union ControlNet Loader 334:
2024-10-12 12:16:10,103 - root - ERROR -   - Value not in list: control_net_name: 'flux\InstantX_flux.safetensors' not in ['flux-canny-controlnet-v3.safetensors', 'flux-canny-controlnet.safetensors', 'flux-canny-controlnet_v2.safetensors', 'flux-depth-controlnet-v3.safetensors', 'flux-depth-controlnet.safetensors', 'flux-depth-controlnet_v2.safetensors', 'flux-hed-controlnet-v3.safetensors', 'flux-hed-controlnet.safetensors', 'flux\\diffusion_pytorch_model.safetensors']
2024-10-12 12:16:10,103 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,103 - root - ERROR - Failed to validate prompt for output 301:
2024-10-12 12:16:10,103 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,108 - root - ERROR - Failed to validate prompt for output 140:
2024-10-12 12:16:10,108 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,108 - root - ERROR - Failed to validate prompt for output 320:
2024-10-12 12:16:10,108 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,108 - root - ERROR - Failed to validate prompt for output 145:
2024-10-12 12:16:10,108 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,108 - root - ERROR - Failed to validate prompt for output 319:
2024-10-12 12:16:10,108 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,108 - root - ERROR - Failed to validate prompt for output 179:
2024-10-12 12:16:10,108 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,108 - root - ERROR - Failed to validate prompt for output 84:
2024-10-12 12:16:10,108 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,108 - root - ERROR - Failed to validate prompt for output 258:
2024-10-12 12:16:10,108 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,108 - root - ERROR - Failed to validate prompt for output 299:
2024-10-12 12:16:10,108 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 138:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 146:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 322:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 317:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 323:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 316:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 300:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 87:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 318:
2024-10-12 12:16:10,113 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,113 - root - ERROR - Failed to validate prompt for output 141:
2024-10-12 12:16:10,118 - root - ERROR - Output will be ignored
2024-10-12 12:16:10,647 - root - INFO - Using pytorch attention in VAE
2024-10-12 12:16:10,647 - root - INFO - Using pytorch attention in VAE
2024-10-12 12:16:18,202 - root - INFO - model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16
2024-10-12 12:16:18,202 - root - INFO - model_type FLUX
2024-10-12 12:27:11,335 - root - ERROR - error could not detect control model type.
2024-10-12 12:27:11,335 - root - ERROR - error checkpoint does not contain controlnet or t2i adapter data D:\ComfyUI_windows_portable\ComfyUI\models\controlnet\flux\diffusion_pytorch_model.safetensors
2024-10-12 12:27:13,290 - root - INFO - Requested to load FluxClipModel_
2024-10-12 12:27:13,294 - root - INFO - Loading 1 new model
2024-10-12 12:27:13,301 - root - INFO - loaded completely 0.0 4777.53759765625 True
2024-10-12 12:27:51,099 - root - WARNING - clip missing: ['text_projection.weight']
2024-10-12 12:27:52,730 - root - ERROR - !!! Exception during processing !!! 'NoneType' object has no attribute 'copy'
2024-10-12 12:27:52,745 - root - ERROR - Traceback (most recent call last):
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 848, in apply_controlnet
    c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
            ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'copy'

2024-10-12 12:27:52,750 - root - INFO - Prompt executed in 702.63 seconds
2024-10-12 12:44:26,904 - root - INFO - got prompt
2024-10-12 12:44:26,917 - root - ERROR - Failed to validate prompt for output 147:
2024-10-12 12:44:26,917 - root - ERROR - * UpscaleModelLoader 83:
2024-10-12 12:44:26,917 - root - ERROR -   - Value not in list: model_name: '4x-ClearRealityV1.pth' not in ['ClearRealityV1\\4x-ClearRealityV1.pth', 'ClearRealityV1\\4x-ClearRealityV1_Soft.pth', 'ClearRealityV1\\BROKEN_NCNN\\4x-ClearRealityV1-fp16.bin', 'ClearRealityV1\\BROKEN_NCNN\\4x-ClearRealityV1-fp32.bin', 'ClearRealityV1\\BROKEN_NCNN\\4x-ClearRealityV1_Soft-fp16.bin', 'ClearRealityV1\\BROKEN_NCNN\\4x-ClearRealityV1_Soft-fp32.bin']
2024-10-12 12:44:26,917 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,917 - root - ERROR - Failed to validate prompt for output 321:
2024-10-12 12:44:26,917 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,917 - root - ERROR - Failed to validate prompt for output 311:
2024-10-12 12:44:26,917 - root - ERROR - * InstantX Flux Union ControlNet Loader 334:
2024-10-12 12:44:26,917 - root - ERROR -   - Value not in list: control_net_name: 'flux\InstantX_flux.safetensors' not in ['flux-canny-controlnet-v3.safetensors', 'flux-canny-controlnet.safetensors', 'flux-canny-controlnet_v2.safetensors', 'flux-depth-controlnet-v3.safetensors', 'flux-depth-controlnet.safetensors', 'flux-depth-controlnet_v2.safetensors', 'flux-hed-controlnet-v3.safetensors', 'flux-hed-controlnet.safetensors', 'flux\\diffusion_pytorch_model.safetensors']
2024-10-12 12:44:26,917 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,917 - root - ERROR - Failed to validate prompt for output 301:
2024-10-12 12:44:26,917 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,917 - root - ERROR - Failed to validate prompt for output 140:
2024-10-12 12:44:26,922 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,922 - root - ERROR - Failed to validate prompt for output 320:
2024-10-12 12:44:26,922 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,922 - root - ERROR - Failed to validate prompt for output 145:
2024-10-12 12:44:26,922 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,922 - root - ERROR - Failed to validate prompt for output 319:
2024-10-12 12:44:26,922 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,922 - root - ERROR - Failed to validate prompt for output 179:
2024-10-12 12:44:26,922 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,922 - root - ERROR - Failed to validate prompt for output 84:
2024-10-12 12:44:26,922 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,922 - root - ERROR - Failed to validate prompt for output 258:
2024-10-12 12:44:26,922 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,922 - root - ERROR - Failed to validate prompt for output 299:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 138:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 146:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 322:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 317:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 323:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 316:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 300:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 87:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,927 - root - ERROR - Failed to validate prompt for output 318:
2024-10-12 12:44:26,927 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,932 - root - ERROR - Failed to validate prompt for output 141:
2024-10-12 12:44:26,932 - root - ERROR - Output will be ignored
2024-10-12 12:44:26,992 - root - ERROR - !!! Exception during processing !!! 'NoneType' object has no attribute 'copy'
2024-10-12 12:44:26,992 - root - ERROR - Traceback (most recent call last):
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 848, in apply_controlnet
    c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
            ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'copy'

2024-10-12 12:44:26,997 - root - INFO - Prompt executed in 0.06 seconds
```
## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.
```
Workflow too large. Please manually upload the workflow from local file system.
```

## Additional Context
(Please add any additional context or steps to reproduce the error here)
```

### Other

![Screenshot 2024-10-12 at 12-30-54 ComfyUI](https://github.com/user-attachments/assets/f0f76743-0561-4c02-8915-43143904b5b3)
![Screenshot 2024-10-12 at 12-29-58 ComfyUI](https://github.com/user-attachments/assets/91e3539f-aa8b-4e68-bd58-4c4894345ce3)


Feature Request: model and output path setting

Sym linking is not ideal, setting a model folder is pretty standard these days and most of us use more than one software that uses models.
The same for choosing where to put the output images, personally mine go to a portable drive, not sure how to do that with ComfyUI.


error

### Your question

[Errno 2] No such file or directory: 'D:\\ComfyUI_windows_portable_nvidia\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\ckpts\\LiheYoung\\Depth-Anything\\.cache\\huggingface\\download\\checkpoints\\depth_anything_vitl14.pth.6c6a383e33e51c5fdfbf31e7ebcda943973a9e6a1cbef1564afe58d7f2e8fe63.incomplete' is:issue

### Logs

```powershell
.
```

### Other

_No response_


Raspberry Pi Memory Error

* face_recognition version: 02.1
* Python version: 2.7
* Operating System: Raspian

### Description

I installed to face_recognition my raspberry pi successfully for python 3. Now i am trying to install for Python2 because i need it. When i was trying install i am taking a Memory Error. I attached the images from my error. Please help me

![20170821_190454](https://user-images.githubusercontent.com/23421095/29530146-1e98e7be-86ab-11e7-91ea-e17c02170f63.jpg)
![20170821_190501](https://user-images.githubusercontent.com/23421095/29530148-2113ac22-86ab-11e7-934d-e2062359f51a.jpg)


knn neighbors name list?

In **face_recognition_knn.py**
I want name list of 5 neighbors. So I change n_neighbors=5.
`closest_distances = knn_clf.kneighbors(faces_encodings, n_neighbors=5)`
And it returned just 5 values of **distance_threshold** from trained .clf file

I found that `knn_clf.predict(faces_encodings)` return only 1 best match name.

How can I get the name list of all that 5 people?


face_recognization with python

* face_recognition version:
* Python version:3.5
* Operating System:windows

### Description

 I am working with some python face reorganization code in which I want to compare sampleface.jpg which contains a sample face with facegrid.jpg. The facegrid.jpg itself has some 6 faces in it. I am getting results as true for every face while I should be getting only one. The code is below.

```python
import face_recognition
image = face_recognition.load_image_file("faceGrid.jpg")
sample_image = face_recognition.load_image_file("sampleface.jpg")

sample_face_encoding = face_recognition.face_encodings(sample_image)

face_locations = face_recognition.face_locations(image)

print (len(face_locations), " Faces")

for face_location in face_locations:
    top, right, bottom, left = face_location
    face_image = image[top:bottom, left:right]
    face_encodings = face_recognition.face_encodings(face_image)[0]
    if face_recognition.compare_faces(sample_face_encoding,face_encodings)[0]:
      print ("Found!")
```


cv2.imshow error

Hi All,

with the help of docs i am trying to display image with below code and getting error. i tried all possible ways like file extension, path and python version to resolve this error and not able to rectify. So, please do needful,

Note:- 1.image present in the path.
           2. print statement result None as output.
           3. i am using python 3.6 & opencv-python-4.0.0.21

import numpy
import cv2

img = cv2.imread('C:\\Users\\Public\\Pictures\\Sample Pictures\\Penguins.jpeg',0)  # to read an image

cv2.imshow('image',img) # to display image
cv2.waitKey(0)
cv2.destroyAllWindows()

Traceback (most recent call last):
  File "C:/Users/rrmamidi/Desktop/old Desktop/compress_1/python/basic python scripts/about camera_opencv_cv2/about_img_read.py", line 11, in <module>
    cv2.imshow('image',img) # to display image
cv2.error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:350: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

Thanks,
Raja


Train model with more than 1 image per person

* face_recognition version: 1.2.3
* Python version: 2.7.15
* Operating System: Windows 10

### Description

I Would like to train the model with more than 1 image per each person to achieve better recognition results. Is it possible?

One more question is what does [0] mean here:
```
known_face_encoding_user = face_recognition.face_encodings('image.jpg')[0]
```
If I put [1] here I receive "IndexError: list index out of range" error.


* face_recognition version:
* Python version: 3.4
* Operating System: Jesse Raspbian

### Description

Whenever I try to run facerec_from_webcam_faster.py, I get the error below. Note that I have checked my local files, the image to be recognized is place appropriately.

###

```
OpenCV Error: Assertion failed (ssize.area() > 0) in resize, file /home/pi/opencv-3.1.0/modules/imgproc/src/imgwarp.cpp, line 3229
Traceback (most recent call last):
  File "pj_webcam.py", line 31, in <module>
    small_frame = cv2.resize(frame, (1, 1), fx=0.01, fy=0.01)
cv2.error: /home/pi/opencv-3.1.0/modules/imgproc/src/imgwarp.cpp:3229: error: (-215) ssize.area() > 0 in function resize
```


does load_image_file have a version which read from byte[] not just from the disk file

does load_image_file have a version which read from byte array in memory not just from the disk file.


face_locations get wrong result but dlib is correct

* face_recognition version: 1.0.0
* Python version: 3.5
* Operating System: Ubuntu 16.04 LTS

### Description
I run the example find_faces_in_picture_cnn.py to process the image from this link.
https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1507896274082&di=824f7f59943a71e2e9904d22175ce92c&imgtype=0&src=http%3A%2F%2Fwww.moontalk.com.tw%2Fupload%2Fimages%2F20160606angelina-03.jpg
The program detect the hand as a face ,I check the code and run example in dlib from this link ,the result is correct.
http://dlib.net/cnn_face_detector.py.html
So the problem maybe occur in load_image_file ?


IndexError: list index out of range while attempting to automatically recognize faces

* face_recognition version: 1.2.3
* Python version: 3.7.3
* Operating System: Windows 10 x64

### Description

Hello everyone,
I was attempting to modify facerec_from_video_file.py in order to make it save the unknown faces in the video and recognize them based on the first frame they appear on for example if an unknown face appears on the frame 14 it should be recognized as "new 14" but i keep getting the error "IndexError: list index out of range" when a new face appears.
So here is my code and the traceback

### What I Did

```
import face_recognition
import cv2

input_movie = cv2.VideoCapture("video.mp4")
length = int(input_movie.get(cv2.CAP_PROP_FRAME_COUNT))

# Create an output movie file (make sure resolution/frame rate matches input video!)
fourcc = cv2.VideoWriter_fourcc(*'XVID')
output_movie = cv2.VideoWriter('output.avi', fourcc, 29.97, (640, 360))

newimage = face_recognition.load_image_file("anchor.png")
new_face_encoding = face_recognition.face_encodings(newimage)[0]

known_faces = [
    new_face_encoding,

]

# Initialize some variables
face_locations = []
face_encodings = []
face_names = []
frame_number = 0

def recog(frame_number, known_faces, face_names):
    toenc = []

    torec = face_recognition.load_image_file(r"New\Unknown%s.jpg" %str(frame_number))

    #if not len(torec):
     #   print("cannot find image")
    #torec = face_recognition.load_image_file(r"New\Unknown%s.jpg" %str(frame_number))
    toenc.append((face_recognition.face_encodings(torec))[0])
    if not len(toenc):
        print("can't be encoded")
    known_faces.append(toenc.pop())
    face_names.append("new %s" %str(frame_number))

# Load some sample pictures and learn how to recognize them.

while True:
    # Grab a single frame of video
    ret, frame = input_movie.read()
    frame_number += 1

    # Quit when the input video file ends
    if not ret:
        break

    # Convert the image from BGR color (which OpenCV uses) to RGB color (which face_recognition uses)
    rgb_frame = frame[:, :, ::-1]

    # Find all the faces and face encodings in the current frame of video
    face_locations = face_recognition.face_locations(rgb_frame)
    face_encodings = face_recognition.face_encodings(rgb_frame, face_locations)

    #face_names = []
    for face_encoding in face_encodings:
        # See if the face is a match for the known face(s)
        match = face_recognition.compare_faces(known_faces, face_encoding)

        # If you had more than 2 faces, you could make this logic a lot prettier
        # but I kept it simple for the demo
        name = "Unknown"

        face_names.append(name)

    # Label the results
    for (top, right, bottom, left), name in zip(face_locations, face_names):
        if not name:
            continue

        # Draw a box around the face
        unface = cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2)
        if name == "Unknown":
            res = frame[top:bottom, left:right]
            cv2.imwrite(r"New\Unknown%s.jpg" %str(frame_number), res)
            recog(frame_number, known_faces, face_names)

        cv2.rectangle(frame, (left, bottom - 25), (right, bottom), (0, 0, 255), cv2.FILLED)
        font = cv2.FONT_HERSHEY_DUPLEX
        cv2.putText(frame, name, (left + 6, bottom - 6), font, 0.5, (255, 255, 255), 1)

    # Write the resulting image to the output video file
    print("Processing frame {} / {}".format(frame_number, length))
    #output_movie.write(frame)
    cv2.imshow("frame", frame)
    if( cv2.waitKey(27) & 0xFF == ord('q')):
        break

# All done!
input_movie.release()
cv2.destroyAllWindows()

```
### Output
```
In [1]: runfile('D:/project_new/facerec_from_video_file.py', wdir='D:/project_new')
Processing frame 1 / 3291
Processing frame 2 / 3291
Processing frame 3 / 3291
Processing frame 4 / 3291
Processing frame 5 / 3291
Processing frame 6 / 3291
Processing frame 7 / 3291
Processing frame 8 / 3291
Processing frame 9 / 3291
Processing frame 10 / 3291
Processing frame 11 / 3291
Processing frame 12 / 3291
Traceback (most recent call last):

  File "<ipython-input-1-4b2c69ca71f8>", line 1, in <module>
    runfile('D:/project_new/facerec_from_video_file.py', wdir='D:/project_new')

  File "C:\Users\saber\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
    execfile(filename, namespace)

  File "C:\Users\saber\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "D:/project_new/facerec_from_video_file.py", line 81, in <module>
    recog(frame_number, known_faces, face_names)

  File "D:/project_new/facerec_from_video_file.py", line 35, in recog
    toenc.append((face_recognition.face_encodings(torec))[0])

IndexError: list index out of range
```


IndexError: list index out of range

IndexError: list index out of range

my code:

import face_recognition
known_image = face_recognition.load_image_file("D:/1.jpg")
unknown_image = face_recognition.load_image_file("D:/2.jpg")
biden_encoding = face_recognition.face_encodings(known_image)[0]


how to do live face recognition with RPi

* Operating System: Debian

### Description

i want to use the example ```facerec_from_webcam_faster.py```
but i don't know how to change the video_output source to the PiCam

### What I Did

```
camera = picamera.PiCamera()
camera.resolution = (320, 240)
output = np.empty((240, 320, 3), dtype=np.uint8)

while True:
    # Grab a single frame of video
    ret, frame = camera.capture(output, format="rgb")
```
but i got erros, so how can i use the picam as source?


文本检测完的图片怎么进行文本识别啊？

是要把边界框框出的图片剪裁下来，送进识别模型吗？关于这个的代码在哪里啊


PaddleServing怎样修改相关参数

根据  [**基于PaddleServing的服务部署**](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.4/deploy/pdserving/README_CN.md) 后，怎样对模型及服务的一些参数进行修改呢？
例如如下参数：
use_tensorrt
batch_size
det_limit_side_len
batch_num
total_process_num
...

疑惑：
1、[**PaddleHub Serving部署**](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.4/deploy/hubserving/readme.md)，支持一些参数修改
2、[**基于Python引擎的PP-OCR模型库推理**](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.4/doc/doc_ch/inference_ppocr.md)，也支持参数修改

上面列举的几个参数都极其重要，但是PaddleServing方法却不支持，请指示！是否是哪里可以设置而我没找到


轻量模型的推断中，每隔几行就会出现一行识别为乱码

![image](https://user-images.githubusercontent.com/62594309/113710560-73095c00-9716-11eb-828d-40026f37715e.png)
就像这里蓝色圈起来的这行

但是通用模型就没有这个问题
这是什么原因引起的呢？


rknn不支持DepthwiseSeparable模块中的ConvBNLayer层参数stride(p1, p2) p1与p2不一致算子，这样涉及到修改网络结构，我看了下stride(p1, p2)中p1与p2不一致的情况是为了做下采样的操作，请问我想保持p1与p2相等的情况下，该如何修改DepthwiseSeparable模块或者更上层模块的参数呢？


PaddleOCR加载自己的识别模型进行图像检测+识别与仅使用识别模型时效果不一致

先用PaddleOCR的图像检测功能，按照得到的识别框带文字的小图裁剪出来，标注用做训练集，对文字识别模型进行了训练，然后推理测试了一下没有问题，于是使用PaddleOCR加载新训练的文字识别模型跑检测 + 识别的整体流程，结果发现出现了识别结果不一致的情况。

- 系统环境/System Environment：CenOS7
- 版本号/Version：Paddle：2.3.1.post112  PaddleOCR：2.6 问题相关组件/Related components：PaddleOCR
- python/Version: 3.9.12
- 使用模型ppocrv3

问题图片：
![image](https://user-images.githubusercontent.com/34825635/189260271-ee896330-02ea-4290-a6da-a8b16a644be2.png)

* 单用识别模型进行推理时：（有敏感信息此处我遮挡了）
`前言－客户（“甲方”）和XXXXX（“乙方”）所签订的业务约定书（“业务约定书”）及本业务条款其同构成`
* 使用PaddleOCR时：
`（，）（7，）是时（，）－`

- 推理命令：
```
python3 tools/infer/predict_rec.py --image_dir=/home/hr/projects/ppocr/PaddleOCR/data/train_data/rec/train/XXXXX.png --rec_model_dir=/home/hr/projects/ppocr/PaddleOCR/output/inference/rec_ppocr_v3_distillation/Teacher --rec_image_shape="3, 48, 640" --rec_char_dict_path=/home/hr/projects/ppocr/PaddleOCR/ppocr/utils/ppocr_keys_v1.txt
```
- 配置文件的参数：
```
# 对image_shape进行了更改
image_shape: [3, 48, 640]
```
- PaddleOCR的加载参数设置：
```
paddle_ocr_engine = PaddleOCR(
                        use_angle_cls=True,
                        lang="ch",
                        rec_model_dir="./output/inference/rec_ppocr_v3_distillation/Teacher",
                        rec_image_shape="3, 48, 640",
                        rec_char_dict_path="./ppocr/utils/ppocr_keys_v1.txt")
```

如果能够提供一些帮助或者建议，非常感谢！


pdserving 最后怎么返回文本以及文本坐标

目前pdserving 只返回了 文本没有返回文本坐标，请问如何返回文本坐标呢


做数字训练的图像。在把检测和识别串起来的时候，识别出来的为什么是中文？

自己训练数字模型，用到检测和识别，在转inference模型前，识别的是数字。但将检测和识别串联的时候，按照官方教程，转换成inference模型，为什么识别出来的是中文？


Can ch_PP-OCRv4_rec_server_infer's support for english be put into the documentation?

I notice if I am calling

```
from paddleocr import PaddleOCR
ocr = Paddle.OCR(
det_model_dir=ch_PP-OCRv4_det_server_infer,
rec_model_dir=ch_PP-OCRv4_rec_infer
lang='en')
...
result = ocr.ocr(my_image)
```
this works fine. However, If i set the rec model to the server version as well (`ch_PP-OCRv4_rec_server_infer`), then I get the following error:

```
  File "/opt/conda/lib/python3.10/site-packages/paddleocr/paddleocr.py", line 661, in ocr
    dt_boxes, rec_res, _ = self.__call__(img, cls)
  File "/opt/conda/lib/python3.10/site-packages/paddleocr/tools/infer/predict_system.py", line 105, in __call__
    rec_res, elapse = self.text_recognizer(img_crop_list)
  File "/opt/conda/lib/python3.10/site-packages/paddleocr/tools/infer/predict_rec.py", line 628, in __call__
    rec_result = self.postprocess_op(preds)
  File "/opt/conda/lib/python3.10/site-packages/paddleocr/ppocr/postprocess/rec_postprocess.py", line 121, in __call__
    text = self.decode(preds_idx, preds_prob, is_remove_duplicate=True)
  File "/opt/conda/lib/python3.10/site-packages/paddleocr/ppocr/postprocess/rec_postprocess.py", line 83, in decode
    char_list = [
  File "/opt/conda/lib/python3.10/site-packages/paddleocr/ppocr/postprocess/rec_postprocess.py", line 84, in <listcomp>
    self.character[text_id]
IndexError: list index out of range
```

Which I'm guessing is because it's trying to output Chinese, which has an 8000 character dict, whereas English only has 90 or so. Because it says english is supported by the server model (https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/models_list.md), is it possible to get the ppocrv4 server model to output english successfully?
<img width="1274" alt="Screen Shot 2024-03-11 at 10 12 15 PM" src="https://github.com/PaddlePaddle/PaddleOCR/assets/21298347/f0b204ea-c7d3-4368-a939-4c9f99b111fb">


检测和识别怎么连接

想用轻量化的检测模型配合RCNN识别，不知道怎么将两个阶段连接在一起。


请制作PP-Structure的PaddleServing例子吧

要写PP-Structure在paddle_serving_server.web_service中的Op类，感觉我这个新手做不到啊。
有没有大神做好例子，让新手复用呢


HOW TO RESUME TRAINING FROM LAST CHECKPOINT?

Hi,
I have been training a model on my own dataset, How I can resume the training from last checkpoint saved? And also when I train the model does it save Best weights automatically  to some path or we need to provide some argument to do it.
Please help me on this.

Thanks..


模型库404

ch_ppocr_mobile_slim_v2.1_det 推理模型
ch_ppocr_mobile_v2.1_det 推理和训练模型
上面的到目前是404状态，无法下载


Mac M1 Pro can't install paddleOCR2.0.1~2.5.0.3, but I can install paddleOCR 1.1.1 and run successful.

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

- 系统环境/System Environment：MacBook Pro（14英寸，2021年），Apple M1 Pro 16 GB，
- 版本号/Version：Pycharm2022.1.2 and Anaconda create Python 3.8 environment.
- Paddle：  Monterey 12.3
- PaddleOCR：2.0.1~2.5.0.3
- 问题相关组件/Related components：PaddleOCR、Numpy
- 运行指令/Command Code：

1. python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple （运行正常，Run OK !）
2. pip install "paddleocr>=2.0.1"（运行失败，报错，Too much ERROR！）（如果我不指定paddleOCR1的版本号，会自动安装paddleOCR 1.1.1，并且可以正常运行使用，即2.0.1版本开始全部安装失败）

- 完整报错/Complete Error Message（详见markdown文档，太长了，这里传不上来）
[【Error Log】Mac M1 Pro can't install paddleOCR2.0.1~2.5.0.3.md](https://github.com/PaddlePaddle/PaddleOCR/files/9075892/Error.Log.Mac.M1.Pro.can.t.install.paddleOCR2.0.1.2.5.0.3.md)
：
- `ERROR: Cannot install paddleocr==2.0.1, paddleocr==2.0.2, paddleocr==2.0.3, paddleocr==2.0.4, paddleocr==2.0.5, paddleocr==2.0.6, paddleocr==2.2, paddleocr==2.2.0.1, paddleocr==2.2.0.2, paddleocr==2.3, paddleocr==2.3.0.1, paddleocr==2.3.0.2, paddleocr==2.4, paddleocr==2.4.0.1, paddleocr==2.4.0.2, paddleocr==2.4.0.3, paddleocr==2.4.0.4, paddleocr==2.5, paddleocr==2.5.0.2 and paddleocr==2.5.0.3 because these package versions have conflicting dependencies.

The conflict is caused by:
    paddleocr 2.5.0.3 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.5.0.2 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.5 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.4.0.4 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.4.0.3 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.4.0.2 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.4.0.1 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.4 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.3.0.2 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.3.0.1 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.3 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.2.0.2 depends on opencv-contrib-python==4.4.0.46
    paddleocr 2.2.0.1 depends on opencv-contrib-python==4.2.0.32
    paddleocr 2.2 depends on opencv-contrib-python==4.2.0.32
    paddleocr 2.0.6 depends on opencv-python==4.2.0.32
    paddleocr 2.0.5 depends on opencv-python==4.2.0.32
    paddleocr 2.0.4 depends on opencv-python==4.2.0.32
    paddleocr 2.0.3 depends on opencv-python==4.2.0.32
    paddleocr 2.0.2 depends on opencv-python==4.2.0.32
    paddleocr 2.0.1 depends on opencv-python==4.2.0.32

To fix this you could try to:

1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies`
<img width="1544" alt="image" src="https://user-images.githubusercontent.com/29346824/178091955-5d71f63b-6bd5-477e-88e4-cb29cb161124.png">


train warning

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

- 系统环境/System Environment：ubantu
- 版本号/Version：Paddle：  PaddleOCR： 问题相关组件/Related components：paddle develop  0.0.0.post116

- 运行指令/Command Code：
- 完整报错/Complete Error Message：
一直有好多这种警告
I0705 11:55:13.443581 28582 eager_method.cc:140] Warning:: 0D Tensor cannot be used as 'Tensor.numpy()[0]' . In order to avoid this problem, 0D Tensor will be changed to 1D numpy currently, but it's not correct and will be removed in release 2.6. For Tensor contain only one element, Please modify  'Tensor.numpy()[0]' to 'float(Tensor)' as soon as possible, otherwise 'Tensor.numpy()[0]' will raise error in release 2.6.


gpt 3

hi
can we use gpt 3 api free key ?


main.py is missing?

main.py is missing?


Error with Promtfile

When I try to run the example file I get this error even though there is something in the prompt file, which you can see from the screenshots is in the example folder. Does anyone know how I can solve this problem?

![Screenshot_Error](https://github.com/AntonOsika/gpt-engineer/assets/62028361/cf8c7992-eca9-4bed-b258-bc1bf279082b)

![Screenshot_of_promt](https://github.com/AntonOsika/gpt-engineer/assets/62028361/a3d573b1-b9da-4201-9980-709c543dadde)

![image](https://github.com/AntonOsika/gpt-engineer/assets/62028361/dd8edc0d-3248-4d1c-9813-c388f4b81fb5)


urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party..

Hello Guys.
This is the error I'm getting when I am trying to use the image prompt issue

urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
Total time: 21.12 seconds

Do you happen to know what could be the problem?

thanks in advance!


[BUG]Memory Issue when generating images for the second time

When I generate images first time with one image prompt, everything works fine.
However, at the second generation, the GPU memory run out.

Here is the error

`Preparation time: 19.46 seconds
loading new
ERROR diffusion_model.output_blocks.0.1.transformer_blocks.4.ff.net.0.proj.weight CUDA out of memory. Tried to allocate 50.00 MiB (GPU 0; 22.41 GiB total capacity; 21.52 GiB already allocated; 11.69 MiB free; 22.21 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
ERROR diffusion_model.output_blocks.0.1.transformer_blocks.5.attn1.to_v.weight CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 22.41 GiB total capacity; 21.56 GiB already allocated; 11.69 MiB free; 22.21 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
ERROR diffusion_model.output_blocks.0.1.transformer_blocks.5.attn1.to_out.0.weight CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 22.41 GiB total capacity; 21.56 GiB already allocated; 11.69 MiB free; 22.21 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Traceback (most recent call last):
  File "D:\Repos\Fooocus\modules\async_worker.py", line 551, in worker
    handler(task)
  File "D:\Repos\Fooocus\venv\Lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Repos\Fooocus\venv\Lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Repos\Fooocus\modules\async_worker.py", line 460, in handler
    comfy.model_management.load_models_gpu([pipeline.final_unet])
  File "D:\Repos\Fooocus\repositories\ComfyUI-from-StabilityAI-Official\comfy\model_management.py", line 397, in load_models_gpu
    cur_loaded_model = loaded_model.model_load(lowvram_model_memory)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Repos\Fooocus\repositories\ComfyUI-from-StabilityAI-Official\comfy\model_management.py", line 286, in model_load
    raise e
  File "D:\Repos\Fooocus\repositories\ComfyUI-from-StabilityAI-Official\comfy\model_management.py", line 282, in model_load
    self.real_model = self.model.patch_model(device_to=patch_model_to) #TODO: do something with loras and offloading to CPU
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Repos\Fooocus\repositories\ComfyUI-from-StabilityAI-Official\comfy\model_patcher.py", line 161, in patch_model
    temp_weight = comfy.model_management.cast_to_device(weight, device_to, torch.float32, copy=True)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Repos\Fooocus\repositories\ComfyUI-from-StabilityAI-Official\comfy\model_management.py", line 498, in cast_to_device
    return tensor.to(device, copy=copy).to(dtype)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 50.00 MiB (GPU 0; 22.41 GiB total capacity; 21.56 GiB already allocated; 11.69 MiB free; 22.21 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Total time: 209.24 seconds
Keyboard interruption in main thread... closing server.

Process finished with exit code -1
`
At my second attempt to track this error, I add an endpoint. When I clicked generate and it meet the endpoint, I found 6 models have been loaded into memory. May be this is the issue?

![image](https://github.com/lllyasviel/Fooocus/assets/93906313/bb31e548-3a5c-4a85-9a63-251fdf7584fb)
![47760ff1859b15fa74cf9dea3aa17a5](https://github.com/lllyasviel/Fooocus/assets/93906313/314e07a3-7112-438a-a6f9-bcb24ae4e5a9)

Thanks for help~


Problems with installation and correct operation.

Hello, I had problems installing Fooocus on a GNU/Linux system, many errors occurred during the installation and they were all different.  I was not able to capture some of them, but in general terms the errors were as follows: "could not find versions of python packages that satisfy dependencies (error during installation)","(when clicking the "generate" button) "nvidia drivers were not available  found, make sure you have them installed "link to official website".

I managed to save the output of the following errors:

ERROR: Could not find a version that satisfies the requirement accelerate==0.21.0 (from -r requirements_versions.txt (line 5)) (from versions: 0.0.1, 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.7.0, 0.7.1, 0.8.0, 0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.13.2, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.17.1, 0.18.0, 0.19.0, 0.20.0, 0.20.1, 0.20.2, 0.20.3)
ERROR: No matching distribution found for accelerate==0.21.0 (from -r requirements_versions.txt (line 5))

python entry_with_update.py
Already up-to-date
Update succeeded.
[System ARGV] ['entry_with_update.py']
Python 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0]
Fooocus version: 2.1.853
Running on local URL:  http://127.0.0.1:7865

To create a public link, set share=True in launch().
Total VRAM 12006 MB, total RAM 31850 MB
xformers version: 0.0.16
Traceback (most recent call last):
  File "/home/dragon_flow/Fooocus/ldm_patched/modules/model_management.py", line 222, in <module>
    import accelerate
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/__init__.py", line 3, in <module>
    from .accelerator import Accelerator
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/accelerator.py", line 35, in <module>
    from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/checkpointing.py", line 24, in <module>
    from .utils import (
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/utils/__init__.py", line 131, in <module>
    from .bnb import has_4bit_bnb_layers, load_and_quantize_model
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/utils/bnb.py", line 42, in <module>
    import bitsandbytes as bnb
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/__init__.py", line 6, in <module>
    from .autograd._functions import (
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 5, in <module>
    import bitsandbytes.functional as F
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/functional.py", line 13, in <module>
    from .cextension import COMPILED_WITH_CUDA, lib
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 113, in <module>
    lib = CUDASetup.get_instance().lib
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 109, in get_instance
    cls._instance.initialize()
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 59, in initialize
    binary_name, cudart_path, cuda, cc, cuda_version_string = evaluate_cuda_setup()
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py", line 125, in evaluate_cuda_setup
    cuda_version_string = get_cuda_version(cuda, cudart_path)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py", line 45, in get_cuda_version
    check_cuda_result(cuda, cudart.cudaRuntimeGetVersion(ctypes.byref(version)))
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/ctypes/__init__.py", line 387, in getattr
    func = self.getitem(name)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/ctypes/__init__.py", line 392, in getitem
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: python: undefined symbol: cudaRuntimeGetVersion

ERROR: LOW VRAM MODE NEEDS accelerate.
Set vram state to: NORMAL_VRAM
Always offload VRAM
Device: cuda:0 NVIDIA GeForce RTX 4070 :
VAE dtype: torch.float32
Using xformers cross attention
Exception in thread Thread-2 (worker):
Traceback (most recent call last):
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1086, in _get_module
    return importlib.import_module("." + module_name, self.name)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/transformers/models/clip/modeling_clip.py", line 27, in <module>
    from ...modeling_utils import PreTrainedModel
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/transformers/modeling_utils.py", line 85, in <module>
    from accelerate import version as accelerate_version
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/__init__.py", line 3, in <module>
    from .accelerator import Accelerator
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/accelerator.py", line 35, in <module>
    from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/checkpointing.py", line 24, in <module>
    from .utils import (
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/utils/__init__.py", line 131, in <module>
    from .bnb import has_4bit_bnb_layers, load_and_quantize_model
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/accelerate/utils/bnb.py", line 42, in <module>
    import bitsandbytes as bnb
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/__init__.py", line 6, in <module>
    from .autograd._functions import (
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)

File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 5, in <module>
    import bitsandbytes.functional as F
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/functional.py", line 13, in <module>
    from .cextension import COMPILED_WITH_CUDA, lib
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 113, in <module>
    lib = CUDASetup.get_instance().lib
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 109, in get_instance
    cls._instance.initialize()
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 59, in initialize
    binary_name, cudart_path, cuda, cc, cuda_version_string = evaluate_cuda_setup()
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py", line 125, in evaluate_cuda_setup
    cuda_version_string = get_cuda_version(cuda, cudart_path)
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py", line 45, in get_cuda_version
    check_cuda_result(cuda, cudart.cudaRuntimeGetVersion(ctypes.byref(version)))
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/ctypes/__init__.py", line 387, in getattr
    func = self.getitem(name)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/ctypes/__init__.py", line 392, in getitem
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: python: undefined symbol: cudaRuntimeGetVersion

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/dragon_flow/Fooocus/modules/async_worker.py", line 25, in worker
    import modules.default_pipeline as pipeline
  File "/home/dragon_flow/Fooocus/modules/default_pipeline.py", line 1, in <module>
    import modules.core as core
  File "/home/dragon_flow/Fooocus/modules/core.py", line 1, in <module>
    from modules.patch import patch_all
  File "/home/dragon_flow/Fooocus/modules/patch.py", line 29, in <module>
    from modules.patch_clip import patch_all_clip
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/dragon_flow/Fooocus/modules/patch_clip.py", line 23, in <module>
    from transformers import CLIPTextModel, CLIPTextConfig, modeling_utils, CLIPVisionConfig, CLIPVisionModelWithProjection
  File "/home/dragon_flow/.local/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1077, in getattr
    value = getattr(module, name)
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1076, in getattr
    module = self._get_module(self._class_to_module[name])
  File "/home/dragon_flow/anaconda3/envs/fooocus/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1088, in _get_module
    raise RuntimeError(

RuntimeError: Failed to import transformers.models.clip.modeling_clip because of the following error (look up to see its traceback):
python: undefined symbol: cudaRuntimeGetVersion


is this a local model or not

is this a local model or not

i dont get how it could show someone elses promts if its local


[Bug]: Exits upon attempting to load a model on Windows

### Checklist

- [X] The issue has not been resolved by following the [troubleshooting guide](https://github.com/lllyasviel/Fooocus/blob/main/troubleshoot.md)
- [X] The issue exists on a clean installation of Fooocus
- [X] The issue exists in the current version of Fooocus
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

Attempting to run Fooocus on Windows 11 (and possibly 10, haven't tested) simply exits when attempting to load the default model, no error or nothing.

### Steps to reproduce the problem

1. Install Fooocus on Windows 11 with a NVIDIA GPU
2. Attempt to run it.

### What should have happened?

It should've loaded the model successfully.

### What browsers do you use to access Fooocus?

Mozilla Firefox

### Where are you running Fooocus?

Locally

### What operating system are you using?

Windows 11 (23H2)

### Console logs

```Shell
(fooocus_env) D:\Misc4\Fooocus>python entry_with_update.py
Already up-to-date
Update succeeded.
[System ARGV] ['entry_with_update.py']
Python 3.12.7 (tags/v3.12.7:0b05ead, Oct  1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]
Fooocus version: 2.5.5
[Cleanup] Attempting to delete content of temp dir C:\Users\hkcu\AppData\Local\Temp\fooocus
[Cleanup] Cleanup successful
Total VRAM 12281 MB, total RAM 16317 MB
Set vram state to: NORMAL_VRAM
Always offload VRAM
Device: cuda:0 NVIDIA GeForce RTX 4070 : native
VAE dtype: torch.bfloat16
Using pytorch cross attention
Refiner unloaded.
IMPORTANT: You are using gradio version 3.41.2, however version 4.44.1 is available, please upgrade.
--------
Running on local URL:  http://127.0.0.1:7865

To create a public link, set `share=True` in `launch()`.

(fooocus_env) D:\Misc4\Fooocus>
```

### Additional information

Using Fooocus on the exact same machine, with the exact same amount of swap configured (4Gb) works as normal.


关于public url

![Screenshot 2023-04-08 170556](https://user-images.githubusercontent.com/78332286/230713429-e0cc9a3f-1da9-4e76-b24a-67c35624a866.png)

这个public url 是经过博主自己搭建的服务器的吗？我本地搭建之后在手机打开这个url也能用


[Bug]: Qwen1.5-14B-chat 运行不了

### Installation Method | 安装方法与平台

OneKeyInstall (一键安装脚本-windows)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Windows

### Describe the bug | 简述

Traceback (most recent call last):
  File ".\request_llms\local_llm_class.py", line 158, in run
    for response_full in self.llm_stream_generator(**kwargs):
  File ".\request_llms\bridge_qwen_local.py", line 46, in llm_stream_generator
    for response in self._model.chat_stream(self._tokenizer, query, history=history):
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\anaconda3\envs\GPT_academic371\Lib\site-packages\torch\nn\modules\module.py", line 1688, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'Qwen2ForCausalLM' object has no attribute 'chat_stream'

### Screen Shot | 有帮助的截图

Traceback (most recent call last):
  File ".\request_llms\local_llm_class.py", line 158, in run
    for response_full in self.llm_stream_generator(**kwargs):
  File ".\request_llms\bridge_qwen_local.py", line 46, in llm_stream_generator
    for response in self._model.chat_stream(self._tokenizer, query, history=history):
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\anaconda3\envs\GPT_academic371\Lib\site-packages\torch\nn\modules\module.py", line 1688, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'Qwen2ForCausalLM' object has no attribute 'chat_stream'

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_


[Bug]: 代理配置成功，代理所在地查询超时，代理可能无效

### Installation Method | 安装方法与平台

Docker（Windows/Mac）

### Version | 版本

Latest | 最新版

### OS | 操作系统

Mac

### Describe the bug | 简述

按照要求修改代理配置文件`config.py`，基于`Dockerfile`构建之后运行出现，`代理配置成功，代理所在地查询超时，代理可能无效`的警告⚠，实际运行报错`ConnectionRefusedError: [Errno 111] Connection refused`，请帮帮我哪里配置可能有误
ps.代理服务地址端口配置正确，且运行正常，可以访问外网

### Screen Shot | 有帮助的截图

<img width="921" alt="截屏2023-07-21 21 12 53" src="https://github.com/binary-husky/gpt_academic/assets/97352201/5f54b0b4-a515-4ae6-8360-1b1504683688">

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_


[Feature]: 请问是否成功修改 api2d-gpt-3.5-turbo-16k 系列模型 max_token 为 16385

### Class | 类型

大语言模型

### Feature Request | 功能请求

_No response_


[Bug]: Json异常 “error”:

### Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Mac

### Describe the bug | 简述

Traceback (most recent call last):
  File "./request_llm/bridge_chatgpt.py", line 189, in predict
    if ('data: [DONE]' in chunk_decoded) or (len(json.loads(chunk_decoded[6:])['choices'][0]["delta"]) == 0):
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Json异常 “error”: { “message”: “”, “type”: “invalid_request_error”, “param”: null, “code”: “invalid_api_key” }}

### Screen Shot | 有帮助的截图

<img width="1341" alt="image" src="https://github.com/binary-husky/gpt_academic/assets/125801419/c448d538-e762-4bbe-b76a-05d921c34ded">

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

gpt-3.5-turbo : 0 : 1 ..........
Traceback (most recent call last):
  File "/Users/zihengli/chatgpt_academic/request_llm/bridge_chatgpt.py", line 189, in predict
    if ('data: [DONE]' in chunk_decoded) or (len(json.loads(chunk_decoded[6:])['choices'][0]["delta"]) == 0):
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


[Bug]: Connection errored out

### Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Linux

### Describe the bug | 简述

你好, 版本3.54
部署在vps上, os是ubuntu 20.04
挂在了公网, 此前均可正常使用
但是突然出现了这样的问题, 如下图

请问这是什么原因呢? 是该vps的ip不行, 被openai ban了么? 还是什么别的原因, 谢谢

### Screen Shot | 有帮助的截图

![Snipaste_2023-09-30_15-01-00](https://github.com/binary-husky/gpt_academic/assets/59535777/9567364a-6bff-4878-b92a-94087a02c655)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_


**Describe the bug 简述**
ERROR: Invalid requirement: '__pycache__/' (from line 2 of requirements.txt)
**Screen Shot 截图**
![image](https://user-images.githubusercontent.com/46212839/231796758-e537f323-bb03-4fb1-97c8-3b80fddc8476.png)

![image](https://user-images.githubusercontent.com/46212839/231796688-14d0eb47-8ea7-4d73-9ccd-259b1b10f5df.png)

**Terminal Traceback 终端traceback（如果有）**

Before submitting an issue 提交issue之前：
- Please try to upgrade your code. 如果您的代码不是最新的，建议您先尝试更新代码
- Please check project wiki for common problem solutions.项目[wiki](https://github.com/binary-husky/chatgpt_academic/wiki)有一些常见问题的解决方法


上传文件时重复上传


[Bug]: 虽然PDF生成失败了, 但请查收结果（压缩包）, 内含已经翻译的Tex文档, 您可以到Github Issue区, 用该压缩包进行反馈。如系统是Linux，请检查系统字体（见Github wiki） ...

### Installation Method | 安装方法与平台

Anaconda (I used latest requirements.txt)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Windows

### Describe the bug | 简述

由于最为关键的转化PDF编译失败, 将根据报错信息修正tex源文件并重试, 当前报错的latex代码处于第[-1]行 ...

虽然PDF生成失败了, 但请查收结果（压缩包）, 内含已经翻译的Tex文档, 您可以到Github Issue区, 用该压缩包进行反馈。如系统是Linux，请检查系统字体（见Github wiki） ...

报告已经添加到右侧“文件上传区”（可能处于折叠状态），请查收。
[gpt_log\default_user\shared\2024-01-18-14-25-51-result.zip](http://localhost:50649/file=C:/Users/admin/gpt_academic/gpt_log/default_user/shared/2024-01-18-14-25-51-result.zip)
[gpt_log\default_user\shared\2024-01-18-14-25-41.trans.html](http://localhost:50649/file=C:/Users/admin/gpt_academic/gpt_log/default_user/shared/2024-01-18-14-25-41.trans.html)

### Screen Shot | 有帮助的截图

![image](https://github.com/binary-husky/gpt_academic/assets/102421741/01fc2c02-ea15-4717-af77-e89797e407d1)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

[2024-01-18-14-25-51-result.zip](https://github.com/binary-husky/gpt_academic/files/13973247/2024-01-18-14-25-51-result.zip)


### Describe the bug

启动程序后，能打开页面正常显示，但是上传文档或者发送提问法会出错“Something went wrong Connection errored out.”

### Is there an existing issue for this?

- [ ] I have searched the existing issues

### Reproduction

按照正常步骤：
git clone https://github.com/binary-husky/chatgpt_academic.git
cd chatgpt_academic
python -m pip install -r requirements.txt
python main.py

config.py的配置是：
USE_PROXY = True

### Screenshot

给出了正确的API key，却发现从没使用过

### Logs

```shell
控制台报错[Error] WebSocket connection to 'ws://localhost:62694/queue/join' failed: There was a bad response from the server. (x4)
```

### System Info

```shell
gradio:3.24.1
ProductName:macOS
ProductVersion:13.3
BuildVersion:22E252
```

### Severity

annoying


能不能使用azure openai key?

代理服务器不够稳定，更麻烦的是给openai续费，还要个美国信用卡

非常好的应用，希望出更多的插件功能，谢谢


[Bug]: 精准翻译PDF文档(NOUGAT)功能出错，

### Installation Method | 安装方法与平台

Others (Please Describe)

### Version | 版本

Please choose | 请选择

### OS | 操作系统

Please choose | 请选择

### Describe the bug | 简述

测试服务器，精准翻译PDF文档(NOUGAT)功能出错，但是可以使用精准翻译PDF的功能

![image](https://github.com/binary-husky/gpt_academic/assets/51499671/b9a0db8c-282a-4e02-a527-97fcf63eaaa0)

报错信息如下
![image](https://github.com/binary-husky/gpt_academic/assets/51499671/b40e4d8b-ade9-4e27-86e5-75f6027fbbb0)

### Screen Shot | 有帮助的截图

![image](https://github.com/binary-husky/gpt_academic/assets/51499671/ac4995d5-0a68-433b-aa44-2b3c82bbc1e3)
Traceback (most recent call last):
  File "./toolbox.py", line 159, in decorated
    yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs)
  File "./crazy_functions/批量翻译PDF文档_NOUGAT.py", line 93, in 批量翻译PDF文档
    yield from 解析PDF_基于NOUGAT(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt)
  File "./crazy_functions/批量翻译PDF文档_NOUGAT.py", line 111, in 解析PDF_基于NOUGAT
    fpp = yield from nougat_handle.NOUGAT_parse_pdf(fp, chatbot, history)
  File "./crazy_functions/crazy_utils.py", line 761, in NOUGAT_parse_pdf
    raise RuntimeError("Nougat解析论文失败。")
RuntimeError: Nougat解析论文失败。

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_


[一些建议]input框还是太小了

RT 多行输入还是不方便，如果适当调整会更好用。

希望采纳，感谢分享。


[Bug]: 浮动输入框在拖至顶部后，无法重新移位

### Installation Method | 安装方法与平台

Others (Please Describe)

### Version | 版本

Please choose | 请选择

### OS | 操作系统

Mac

### Describe the bug | 简述

浮动输入框在拖至顶部后，无法重新移位

期望：重新勾选后，应该回到初始位置

### Screen Shot | 有帮助的截图

![2024-01-02 14 36 52](https://github.com/binary-husky/gpt_academic/assets/46100050/86a648dc-ab38-486f-9a0b-7f71dde0bd57)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_

{'base_commit': 'fb67dd12f58aa53c75a90378cddbc811ac3c01d2', 'files': [{'path': 'js/app/src/components/Floating/StaticFloating.svelte', 'status': 'modified', 'Loc': {'(None, None, 48)': {'add': [48]}}}]}


想问问newbing的cookies怎么填写，我从javascript:alert(document.cookie)找到了cookies但是一直显示cookies有错


有没有完全部署成功的大神出个详细的部署步骤呀？Windows 有截图，跪求

Windows安装部署
基本环：安装anaconda
1.下载项目 CMD
选择路径
git clone https://github.com/binary-husky/chatgpt_academic.git
cd chatgpt_academic
我们建议将config.py复制为config_private.py并将后者用作个性化配置文件以避免config.py中的变更影响你的使用或不小心将包含你的OpenAI API KEY的config.py提交至本项目。
cp config.py config_private.py
2.创建虚拟环境 python 3.11
conda create -n chatgpt python=3.11.0 #新建环境、
3.进入项目下载路径
例如 cd  G:\python\Program\chatgpt_academic
4.启动虚拟环境
conda activate chatgpt
5. 安装 gradio>=3.23
（1）到https://pypi.org/project/gradio/ 下载whl版本
（2）pip install  G:\python\Program\chatgpt_academic\gradio-3.23.0-py3-none-any.whl
6.配置其他环境
（1）打开requirements.txt，注释掉gradio，然后保存
（2）运行 python -m pip install -r requirements.txt
7.启动代理
8. 配置config_private.py
（1）添加API_KEY
（2）修改USE_PROXY = Ture
（3）修改proxies
在浏览器输入: https://ipapi.co/json/
浏览器上右键->检查->网络->ctrl+r
打开json，将远程地址修改到proxies = { "http": "104.26.9.44:443", "https": "104.26.9.44:443", }
9.启动程序
python main.py


能否增加聊天内容导出功能？


[Bug]:

### Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt and python>=3.8)

### Describe the bug | 简述

只有出去的消息，没有返回消息，试过了ap2id和newbing

### Screen Shot | 有帮助的截图

![微信截图_20230517095200](https://github.com/binary-husky/gpt_academic/assets/43396544/32d9bc41-351b-4ceb-a7d2-99e09b21ddb5)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_


Please provide the code for your model architecture.

**Is your feature request related to a problem? Please describe.**
This repo only provides weights. It makes it difficult to confirm claims from the article.

**Describe the solution you'd like**
 A repo where the code to the model architecture is provided.

**Describe alternatives you've considered**
Clearly state that the model is not open source.

**Additional context**
None


[BUG]convert后运行错误

**Describe the bug**
[rank0]: ValueError: Unrecognized model in ../DV3-hf-32/. Should have a `model_type` key in its config.json, or contain one of the following strings in its name: albert, align, altclip, audio-spectrogram-transformer, autoformer, bark, bart, beit, bert, bert-generation, big_bird, bigbird_pegasus, biogpt, bit, blenderbot, blenderbot-small, blip, blip-2, bloom, bridgetower, bros, camembert, canine, chameleon, chinese_clip, chinese_clip_vision_model, clap, clip, clip_text_model, clip_vision_model, clipseg, clvp, code_llama, codegen, cohere, conditional_detr, convbert, convnext, convnextv2, cpmant, ctrl, cvt, dac, data2vec-audio, data2vec-text, data2vec-vision, dbrx, deberta, deberta-v2, decision_transformer, deformable_detr, deit, depth_anything, deta, detr, dinat, dinov2, distilbert, donut-swin, dpr, dpt, efficientformer, efficientnet, electra, encodec, encoder-decoder, ernie, ernie_m, esm, falcon, falcon_mamba, fastspeech2_conformer, flaubert, flava, fnet, focalnet, fsmt, funnel, fuyu, gemma, gemma2, git, glm, glpn, gpt-sw3, gpt2, gpt_bigcode, gpt_neo, gpt_neox, gpt_neox_japanese, gptj, gptsan-japanese, granite, granitemoe, graphormer, grounding-dino, groupvit, hiera, hubert, ibert, idefics, idefics2, idefics3, imagegpt, informer, instructblip, instructblipvideo, jamba, jetmoe, jukebox, kosmos-2, layoutlm, layoutlmv2, layoutlmv3, led, levit, lilt, llama, llava, llava_next, llava_next_video, llava_onevision, longformer, longt5, luke, lxmert, m2m_100, mamba, mamba2, marian, markuplm, mask2former, maskformer, maskformer-swin, mbart, mctct, mega, megatron-bert, mgp-str, mimi, mistral, mixtral, mllama, mobilebert, mobilenet_v1, mobilenet_v2, mobilevit, mobilevitv2, moshi, mpnet, mpt, mra, mt5, musicgen, musicgen_melody, mvp, nat, nemotron, nezha, nllb-moe, nougat, nystromformer, olmo, olmoe, omdet-turbo, oneformer, open-llama, openai-gpt, opt, owlv2, owlvit, paligemma, patchtsmixer, patchtst, pegasus, pegasus_x, perceiver, persimmon, phi, phi3, phimoe, pix2struct, pixtral, plbart, poolformer, pop2piano, prophetnet, pvt, pvt_v2, qdqbert, qwen2, qwen2_audio, qwen2_audio_encoder, qwen2_moe, qwen2_vl, rag, realm, recurrent_gemma, reformer, regnet, rembert, resnet, retribert, roberta, roberta-prelayernorm, roc_bert, roformer, rt_detr, rt_detr_resnet, rwkv, sam, seamless_m4t, seamless_m4t_v2, segformer, seggpt, sew, sew-d, siglip, siglip_vision_model, speech-encoder-decoder, speech_to_text, speech_to_text_2, speecht5, splinter, squeezebert, stablelm, starcoder2, superpoint, swiftformer, swin, swin2sr, swinv2, switch_transformers, t5, table-transformer, tapas, time_series_transformer, timesformer, timm_backbone, trajectory_transformer, transfo-xl, trocr, tvlt, tvp, udop, umt5, unispeech, unispeech-sat, univnet, upernet, van, video_llava, videomae, vilt, vipllava, vision-encoder-decoder, vision-text-dual-encoder, visual_bert, vit, vit_hybrid, vit_mae, vit_msn, vitdet, vitmatte, vits, vivit, wav2vec2, wav2vec2-bert, wav2vec2-conformer, wavlm, whisper, xclip, xglm, xlm, xlm-prophetnet, xlm-roberta, xlm-roberta-xl, xlnet, xmod, yolos, yoso, zamba, zoedepth

**To Reproduce**
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.


IndexError: list index out of range on training

```
# python3.6 faceswap.py train -A ~/faceswap/data/trump -B ~/faceswap/data/stalone -m ~/faceswap/models/
Model A Directory: /root/faceswap/data/trump
Model B Directory: /root/faceswap/data/stalone
Training data directory: /root/faceswap/models
Loading data, this may take a while...
Loading Model from Model_Original plugin...
/usr/local/lib/python3.6/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
Failed loading existing training data.
Unable to open file (unable to open file: name = '/root/faceswap/models/encoder.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Loading Trainer from Model_Original plugin...
Starting. Press "Enter" to stop training and save model
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/root/faceswap/lib/utils.py", line 42, in run
    for item in self.generator:
  File "/root/faceswap/lib/training_data.py", line 43, in minibatch
    rtn = numpy.float32([read_image(data[j]) for j in range(i,i+size)])
  File "/root/faceswap/lib/training_data.py", line 43, in <listcomp>
    rtn = numpy.float32([read_image(data[j]) for j in range(i,i+size)])
IndexError: list index out of range
```

## Expected behavior
There shouldn't be "IndexError: list index out of range"

## Actual behavior

*Describe, in some detail, what the program does instead. Be sure to include any error message or screenshots.*

## Steps to reproduce

## Other relevant information
H/W: 4 cores, 16GB, Nvidial P100
S/W: Ubuntu 16.04, NVIDIA binary driver - version 384.111
CUDA 8.0
CuDNN 6
Python 3.6
faceswap commit: 0f8d9db826d7588f9feb151ab234f2aaf0d8ecf2


[Question] Which part of code to implement 'Configure Settings' GUI?

Which part of code to implement 'Configure Settings' GUI?

![a](https://user-images.githubusercontent.com/32773605/152643917-b26f4b16-71e0-4f9a-8209-93206355f1b6.jpg)


do i have to rename the given training data to src?

if not, where to put the unzip data into directory. sorry for asking newby questions.
i am using pycharm and docker. thanks


help me

virtualenv '/home/test/Desktop/faceswap-master'
python3.5 '/home/test/Desktop/faceswap-master/faceswap.py' -h

test@ubuntu:~$ virtualenv '/home/test/Desktop/faceswap-master'
New python executable in /home/test/Desktop/faceswap-master/bin/python
Installing setuptools, pip, wheel...done.
test@ubuntu:~$ python3.5 '/home/test/Desktop/faceswap-master/faceswap.py' -h
Traceback (most recent call last):
  File "/home/test/Desktop/faceswap-master/faceswap.py", line 8, in <module>
    from lib.utils import FullHelpArgumentParser
  File "/home/test/Desktop/faceswap-master/lib/utils.py", line 5, in <module>
    from scandir import scandir
ImportError: No module named 'scandir'
test@ubuntu:~$


Can't Open GUI on Windows

**Describe the bug**
Whenever I try to open the GUI of Faceswap, I get an error and it doesn't open. I am on Windows, and I have uninstalled and reinstalled multiple times, including redoing the conda environment. CLI functions work, but the main GUI does not open, either from the shortcut or a manual terminal run. I have also tried running with and without admin

**To Reproduce**
Steps to reproduce the behavior:
1. Uninstall old Faceswap versions
2. Install the latest windows version
3. Run the Faceswap program in GUI mode
4. See error

**Expected behavior**
I want the Faceswap GUI to open. It doesn't.

**Screenshots**
![image](https://user-images.githubusercontent.com/63259343/183342692-6f1c1bec-df9b-4f71-8a23-f2f77fccc008.png)
![image](https://user-images.githubusercontent.com/63259343/183342835-998834e0-66d6-4751-84e9-a1c150e22063.png)

**Desktop:**
 - OS: [Windows 11]
 - Python Version [3.9.12]
 - Conda Version [4.13.0]
 - Commit ID [6b2aac6]

**Crash Report**
[crash_report.2022.08.07.224753577271.log](https://github.com/deepfakes/faceswap/files/9278810/crash_report.2022.08.07.224753577271.log)


Modify extractor to focus on mouth

I'd like to modify the extractor script to focus on the lower half of the face - specifically the mouth area.

I'm experimenting with changing people's mouth movements, and I want to train a higher resolution "mouth only" network, so I can create new speech patterns that are re-composited onto the original footage.

Is there a way to modify which facial landmarks the extractor looks at so it just takes the mouth?


Not showing graph in gui

in log gui:
`Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.6/tkinter/__init__.py", line 1705, in __call__
    return self.func(*args)
  File "/home/telecast/Documents/faceswap/lib/gui/command.py", line 461, in <lambda>
    command=lambda cmd=action: cmd(self.command))
  File "/home/telecast/Documents/faceswap/lib/gui/utils.py", line 550, in load
    self.add_to_recent(cfgfile.name, command)
  File "/home/telecast/Documents/faceswap/lib/gui/utils.py", line 596, in add_to_recent
    recent_files = self.serializer.unmarshal(inp.read().decode("utf-8"))
  File "/home/telecast/Documents/faceswap/lib/Serializer.py", line 61, in unmarshal
    return json.loads(input_string)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
`

 faceswap.log:
`03/10/2019 00:02:36 MainProcess     training_0      train           training                  INFO     Loading data, this may take a while...
03/10/2019 00:02:36 MainProcess     training_0      plugin_loader   _import                   INFO     Loading Model from Villain plugin...
03/10/2019 00:02:40 MainProcess     training_0      config          load_config               INFO     Loading config: '/home/telecast/Documents/faceswap/config/train.ini'
03/10/2019 00:02:40 MainProcess     training_0      _base           replace_config            INFO     Using configuration saved in state file
03/10/2019 00:02:40 MainProcess     training_0      deprecation     new_func                  WARNING  From /home/telecast/Documents/faceswap_env/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\nInstructions for updating:\nColocations handled automatically by placer.
03/10/2019 00:02:49 MainProcess     training_0      _base           load                      WARNING  Failed loading existing training data. Generating new models
03/10/2019 00:02:52 MainProcess     training_0      plugin_loader   _import                   INFO     Loading Trainer from Original plugin...
03/10/2019 00:02:54 MainProcess     training_0      _base           set_tensorboard           INFO     Enabled TensorBoard Logging
03/10/2019 00:02:54 MainProcess     training_0      deprecation     new_func                  WARNING  From /home/telecast/Documents/faceswap_env/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\nInstructions for updating:\nUse tf.cast instead.
03/10/2019 00:03:35 MainProcess     training_0      _base           save_models               INFO     saved models
03/10/2019 00:04:29 MainProcess     MainThread      train           end_thread                INFO     Exit requested! The trainer will complete its current cycle, save the models and quit (it can take up a couple of seconds depending on your training speed). If you want to kill it now, press Ctrl + c
03/10/2019 00:04:31 MainProcess     training_0      _base           save_models               INFO     saved models`

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.10

$ pip3 list
Package                 Version
----------------------- --------
absl-py                 0.7.0
astor                   0.7.1
Click                   7.0
cloudpickle             0.8.0
cmake                   3.13.3
cycler                  0.10.0
dask                    1.1.3
decorator               4.3.2
dlib                    19.16.0
face-recognition        1.2.3
face-recognition-models 0.3.0
ffmpy                   0.2.2
gast                    0.2.2
grpcio                  1.19.0
h5py                    2.9.0
Keras                   2.2.4
Keras-Applications      1.0.7
Keras-Preprocessing     1.0.9
kiwisolver              1.0.1
Markdown                3.0.1
matplotlib              2.2.2
mock                    2.0.0
networkx                2.2
numpy                   1.15.4
nvidia-ml-py3           7.352.0
opencv-python           4.0.0.21
pathlib                 1.0.1
pbr                     5.1.3
Pillow                  5.4.1
pip                     19.0.3
protobuf                3.7.0
psutil                  5.6.0
pyparsing               2.3.1
python-dateutil         2.8.0
pytz                    2018.9
PyWavelets              1.0.2
PyYAML                  3.13
scikit-image            0.14.2
scikit-learn            0.20.3
scipy                   1.2.1
setuptools              40.8.0
six                     1.12.0
tensorboard             1.13.1
tensorflow-estimator    1.13.0
tensorflow-gpu          1.13.1
termcolor               1.1.0
toolz                   0.9.0
tqdm                    4.31.1
Werkzeug                0.14.1
wheel                   0.33.1

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

 cudnn v7.4.1.5