diff --git a/language/en.json b/language/en.json
index 7e8b27da..e7ce075b 100644
--- a/language/en.json
+++ b/language/en.json
@@ -203,7 +203,6 @@
"Photo Film Noir": "Photo Film Noir",
"Photo Glamour": "Photo Glamour",
"Photo Hdr": "Photo Hdr",
- "Photo Iphone Photographic": "Photo Iphone Photographic",
"Photo Long Exposure": "Photo Long Exposure",
"Photo Neon Noir": "Photo Neon Noir",
"Photo Silhouette": "Photo Silhouette",
@@ -222,7 +221,6 @@
"Bauhaus Style Poster": "Bauhaus Style Poster",
"Blueprint Schematic Drawing": "Blueprint Schematic Drawing",
"Caricature": "Caricature",
- "Cel Shaded Art": "Cel Shaded Art",
"Character Design Sheet": "Character Design Sheet",
"Classicism Art": "Classicism Art",
"Color Field Painting": "Color Field Painting",
@@ -230,7 +228,6 @@
"Conceptual Art": "Conceptual Art",
"Constructivism": "Constructivism",
"Cubism": "Cubism",
- "Dadaism": "Dadaism",
"Dark Fantasy": "Dark Fantasy",
"Dark Moody Atmosphere": "Dark Moody Atmosphere",
"Dmt Art Style": "Dmt Art Style",
@@ -482,4 +479,4 @@
"hair": "hair",
"hand": "hand",
"body": "body"
-}
\ No newline at end of file
+}
diff --git a/launch.py b/launch.py
index eae5b19e..d7935a73 100644
--- a/launch.py
+++ b/launch.py
@@ -29,7 +29,7 @@ TRY_INSTALL_XFORMERS = False
def prepare_environment():
torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://download.pytorch.org/whl/cu121")
torch_command = os.environ.get('TORCH_COMMAND',
- f"pip install torch==2.1.0 torchvision==0.16.0 --extra-index-url {torch_index_url}")
+ f"pip install torch==2.7.1+cu128 orchvision==0.22.1+cu128 --extra-index-url {torch_index_url}")
requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")
print(f"Python {sys.version}")
diff --git a/readme.md b/readme.md
index 6f34a950..0a4edf22 100644
--- a/readme.md
+++ b/readme.md
@@ -1,486 +1,24 @@
-
-

-
+thx lllyasviel for a basic Fooocus version.
-# Fooocus
+I noticed a rapidly growing trend where people are actively switching to RTX 5090, RTX 5070, 5080, etc., and suddenly realise that their familiar software does not work due to CUDA incompatibility.
-[>>> Click Here to Install Fooocus <<<](#download)
+This applies to stable-diffusion-webui, fooocus, and a number of other popular programmes. What to do in this situation? Install CUDA 12.8, install library versions that support it, such as torch nightly, and compile packages yourself if they do not yet have native support for the Broadwell generation (RTX 50xx).
-Fooocus is an image generating software (based on [Gradio](https://www.gradio.app/)
).
+What to do with portatives is more complicated.
-Fooocus presents a rethinking of image generator designs. The software is offline, open source, and free, while at the same time, similar to many online image generators like Midjourney, the manual tweaking is not needed, and users only need to focus on the prompts and images. Fooocus has also simplified the installation: between pressing "download" and generating the first image, the number of needed mouse clicks is strictly limited to less than 3. Minimal GPU memory requirement is 4GB (Nvidia).
+After spending more than 20 hours testing different versions of CUDA, torch, torchvision, and various versions of wheels, I finally found a working setup.
-**Recently many fake websites exist on Google when you search “fooocus”. Do not trust those – here is the only official source of Fooocus.**
+Important: it works for me on RTX 5060TI 16GB, but I cannot guarantee that it will work on other 50x versions of NVIDIA.
-# Project Status: Limited Long-Term Support (LTS) with Bug Fixes Only
+Working combination:
+Python: 3.12.10
-The Fooocus project, built entirely on the **Stable Diffusion XL** architecture, is now in a state of limited long-term support (LTS) with bug fixes only. As the existing functionalities are considered as nearly free of programmartic issues (Thanks to [mashb1t](https://github.com/mashb1t)'s huge efforts), future updates will focus exclusively on addressing any bugs that may arise.
+ONNXRuntime GPU: onnxruntime-gpu==1.22.0 (whl: onnxruntime_gpu-1.22.0-cp312-cp312-win_amd64.whl)
-**There are no current plans to migrate to or incorporate newer model architectures.** However, this may change during time with the development of open-source community. For example, if the community converge to one single dominant method for image generation (which may really happen in half or one years given the current status), Fooocus may also migrate to that exact method.
+CUDA: 12.2
-For those interested in utilizing newer models such as **Flux**, we recommend exploring alternative platforms such as [WebUI Forge](https://github.com/lllyasviel/stable-diffusion-webui-forge) (also from us), [ComfyUI/SwarmUI](https://github.com/comfyanonymous/ComfyUI). Additionally, several [excellent forks of Fooocus](https://github.com/lllyasviel/Fooocus?tab=readme-ov-file#forks) are available for experimentation.
+cuDNN: 8.9.x (also dll-s should be send at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin)
-Again, recently many fake websites exist on Google when you search “fooocus”. Do **NOT** get Fooocus from those websites – this page is the only official source of Fooocus. We never have any website like such as “fooocus.com”, “fooocus.net”, “fooocus.co”, “fooocus.ai”, “fooocus.org”, “fooocus.pro”, “fooocus.one”. Those websites are ALL FAKE. **They have ABSOLUTLY no relationship to us. Fooocus is a 100% non-commercial offline open-source software.**
+PATH written at bin and libnvvp CUDA
-# Features
-
-Below is a quick list using Midjourney's examples:
-
-| Midjourney | Fooocus |
-| - | - |
-| High-quality text-to-image without needing much prompt engineering or parameter tuning.
(Unknown method) | High-quality text-to-image without needing much prompt engineering or parameter tuning.
(Fooocus has an offline GPT-2 based prompt processing engine and lots of sampling improvements so that results are always beautiful, no matter if your prompt is as short as “house in garden” or as long as 1000 words) |
-| V1 V2 V3 V4 | Input Image -> Upscale or Variation -> Vary (Subtle) / Vary (Strong)|
-| U1 U2 U3 U4 | Input Image -> Upscale or Variation -> Upscale (1.5x) / Upscale (2x) |
-| Inpaint / Up / Down / Left / Right (Pan) | Input Image -> Inpaint or Outpaint -> Inpaint / Up / Down / Left / Right
(Fooocus uses its own inpaint algorithm and inpaint models so that results are more satisfying than all other software that uses standard SDXL inpaint method/model) |
-| Image Prompt | Input Image -> Image Prompt
(Fooocus uses its own image prompt algorithm so that result quality and prompt understanding are more satisfying than all other software that uses standard SDXL methods like standard IP-Adapters or Revisions) |
-| --style | Advanced -> Style |
-| --stylize | Advanced -> Advanced -> Guidance |
-| --niji | [Multiple launchers: "run.bat", "run_anime.bat", and "run_realistic.bat".](https://github.com/lllyasviel/Fooocus/discussions/679)
Fooocus support SDXL models on Civitai
(You can google search “Civitai” if you do not know about it) |
-| --quality | Advanced -> Quality |
-| --repeat | Advanced -> Image Number |
-| Multi Prompts (::) | Just use multiple lines of prompts |
-| Prompt Weights | You can use " I am (happy:1.5)".
Fooocus uses A1111's reweighting algorithm so that results are better than ComfyUI if users directly copy prompts from Civitai. (Because if prompts are written in ComfyUI's reweighting, users are less likely to copy prompt texts as they prefer dragging files)
To use embedding, you can use "(embedding:file_name:1.1)" |
-| --no | Advanced -> Negative Prompt |
-| --ar | Advanced -> Aspect Ratios |
-| InsightFace | Input Image -> Image Prompt -> Advanced -> FaceSwap |
-| Describe | Input Image -> Describe |
-
-Below is a quick list using LeonardoAI's examples:
-
-| LeonardoAI | Fooocus |
-| - | - |
-| Prompt Magic | Advanced -> Style -> Fooocus V2 |
-| Advanced Sampler Parameters (like Contrast/Sharpness/etc) | Advanced -> Advanced -> Sampling Sharpness / etc |
-| User-friendly ControlNets | Input Image -> Image Prompt -> Advanced |
-
-Also, [click here to browse the advanced features.](https://github.com/lllyasviel/Fooocus/discussions/117)
-
-# Download
-
-### Windows
-
-You can directly download Fooocus with:
-
-**[>>> Click here to download <<<](https://github.com/lllyasviel/Fooocus/releases/download/v2.5.0/Fooocus_win64_2-5-0.7z)**
-
-After you download the file, please uncompress it and then run the "run.bat".
-
-
-
-The first time you launch the software, it will automatically download models:
-
-1. It will download [default models](#models) to the folder "Fooocus\models\checkpoints" given different presets. You can download them in advance if you do not want automatic download.
-2. Note that if you use inpaint, at the first time you inpaint an image, it will download [Fooocus's own inpaint control model from here](https://huggingface.co/lllyasviel/fooocus_inpaint/resolve/main/inpaint_v26.fooocus.patch) as the file "Fooocus\models\inpaint\inpaint_v26.fooocus.patch" (the size of this file is 1.28GB).
-
-After Fooocus 2.1.60, you will also have `run_anime.bat` and `run_realistic.bat`. They are different model presets (and require different models, but they will be automatically downloaded). [Check here for more details](https://github.com/lllyasviel/Fooocus/discussions/679).
-
-After Fooocus 2.3.0 you can also switch presets directly in the browser. Keep in mind to add these arguments if you want to change the default behavior:
-* Use `--disable-preset-selection` to disable preset selection in the browser.
-* Use `--always-download-new-model` to download missing models on preset switch. Default is fallback to `previous_default_models` defined in the corresponding preset, also see terminal output.
-
-
-
-If you already have these files, you can copy them to the above locations to speed up installation.
-
-Note that if you see **"MetadataIncompleteBuffer" or "PytorchStreamReader"**, then your model files are corrupted. Please download models again.
-
-Below is a test on a relatively low-end laptop with **16GB System RAM** and **6GB VRAM** (Nvidia 3060 laptop). The speed on this machine is about 1.35 seconds per iteration. Pretty impressive – nowadays laptops with 3060 are usually at very acceptable price.
-
-
-
-Besides, recently many other software report that Nvidia driver above 532 is sometimes 10x slower than Nvidia driver 531. If your generation time is very long, consider download [Nvidia Driver 531 Laptop](https://www.nvidia.com/download/driverResults.aspx/199991/en-us/) or [Nvidia Driver 531 Desktop](https://www.nvidia.com/download/driverResults.aspx/199990/en-us/).
-
-Note that the minimal requirement is **4GB Nvidia GPU memory (4GB VRAM)** and **8GB system memory (8GB RAM)**. This requires using Microsoft’s Virtual Swap technique, which is automatically enabled by your Windows installation in most cases, so you often do not need to do anything about it. However, if you are not sure, or if you manually turned it off (would anyone really do that?), or **if you see any "RuntimeError: CPUAllocator"**, you can enable it here:
-
-
-Click here to see the image instructions.
-
-
-
-**And make sure that you have at least 40GB free space on each drive if you still see "RuntimeError: CPUAllocator" !**
-
-
-
-Please open an issue if you use similar devices but still cannot achieve acceptable performances.
-
-Note that the [minimal requirement](#minimal-requirement) for different platforms is different.
-
-See also the common problems and troubleshoots [here](troubleshoot.md).
-
-### Colab
-
-(Last tested - 2024 Aug 12 by [mashb1t](https://github.com/mashb1t))
-
-| Colab | Info
-| --- | --- |
-[](https://colab.research.google.com/github/lllyasviel/Fooocus/blob/main/fooocus_colab.ipynb) | Fooocus Official
-
-In Colab, you can modify the last line to `!python entry_with_update.py --share --always-high-vram` or `!python entry_with_update.py --share --always-high-vram --preset anime` or `!python entry_with_update.py --share --always-high-vram --preset realistic` for Fooocus Default/Anime/Realistic Edition.
-
-You can also change the preset in the UI. Please be aware that this may lead to timeouts after 60 seconds. If this is the case, please wait until the download has finished, change the preset to initial and back to the one you've selected or reload the page.
-
-Note that this Colab will disable refiner by default because Colab free's resources are relatively limited (and some "big" features like image prompt may cause free-tier Colab to disconnect). We make sure that basic text-to-image is always working on free-tier Colab.
-
-Using `--always-high-vram` shifts resource allocation from RAM to VRAM and achieves the overall best balance between performance, flexibility and stability on the default T4 instance. Please find more information [here](https://github.com/lllyasviel/Fooocus/pull/1710#issuecomment-1989185346).
-
-Thanks to [camenduru](https://github.com/camenduru) for the template!
-
-### Linux (Using Anaconda)
-
-If you want to use Anaconda/Miniconda, you can
-
- git clone https://github.com/lllyasviel/Fooocus.git
- cd Fooocus
- conda env create -f environment.yaml
- conda activate fooocus
- pip install -r requirements_versions.txt
-
-Then download the models: download [default models](#models) to the folder "Fooocus\models\checkpoints". **Or let Fooocus automatically download the models** using the launcher:
-
- conda activate fooocus
- python entry_with_update.py
-
-Or, if you want to open a remote port, use
-
- conda activate fooocus
- python entry_with_update.py --listen
-
-Use `python entry_with_update.py --preset anime` or `python entry_with_update.py --preset realistic` for Fooocus Anime/Realistic Edition.
-
-### Linux (Using Python Venv)
-
-Your Linux needs to have **Python 3.10** installed, and let's say your Python can be called with the command **python3** with your venv system working; you can
-
- git clone https://github.com/lllyasviel/Fooocus.git
- cd Fooocus
- python3 -m venv fooocus_env
- source fooocus_env/bin/activate
- pip install -r requirements_versions.txt
-
-See the above sections for model downloads. You can launch the software with:
-
- source fooocus_env/bin/activate
- python entry_with_update.py
-
-Or, if you want to open a remote port, use
-
- source fooocus_env/bin/activate
- python entry_with_update.py --listen
-
-Use `python entry_with_update.py --preset anime` or `python entry_with_update.py --preset realistic` for Fooocus Anime/Realistic Edition.
-
-### Linux (Using native system Python)
-
-If you know what you are doing, and your Linux already has **Python 3.10** installed, and your Python can be called with the command **python3** (and Pip with **pip3**), you can
-
- git clone https://github.com/lllyasviel/Fooocus.git
- cd Fooocus
- pip3 install -r requirements_versions.txt
-
-See the above sections for model downloads. You can launch the software with:
-
- python3 entry_with_update.py
-
-Or, if you want to open a remote port, use
-
- python3 entry_with_update.py --listen
-
-Use `python entry_with_update.py --preset anime` or `python entry_with_update.py --preset realistic` for Fooocus Anime/Realistic Edition.
-
-### Linux (AMD GPUs)
-
-Note that the [minimal requirement](#minimal-requirement) for different platforms is different.
-
-Same with the above instructions. You need to change torch to the AMD version
-
- pip uninstall torch torchvision torchaudio torchtext functorch xformers
- pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6
-
-AMD is not intensively tested, however. The AMD support is in beta.
-
-Use `python entry_with_update.py --preset anime` or `python entry_with_update.py --preset realistic` for Fooocus Anime/Realistic Edition.
-
-### Windows (AMD GPUs)
-
-Note that the [minimal requirement](#minimal-requirement) for different platforms is different.
-
-Same with Windows. Download the software and edit the content of `run.bat` as:
-
- .\python_embeded\python.exe -m pip uninstall torch torchvision torchaudio torchtext functorch xformers -y
- .\python_embeded\python.exe -m pip install torch-directml
- .\python_embeded\python.exe -s Fooocus\entry_with_update.py --directml
- pause
-
-Then run the `run.bat`.
-
-AMD is not intensively tested, however. The AMD support is in beta.
-
-For AMD, use `.\python_embeded\python.exe Fooocus\entry_with_update.py --directml --preset anime` or `.\python_embeded\python.exe Fooocus\entry_with_update.py --directml --preset realistic` for Fooocus Anime/Realistic Edition.
-
-### Mac
-
-Note that the [minimal requirement](#minimal-requirement) for different platforms is different.
-
-Mac is not intensively tested. Below is an unofficial guideline for using Mac. You can discuss problems [here](https://github.com/lllyasviel/Fooocus/pull/129).
-
-You can install Fooocus on Apple Mac silicon (M1 or M2) with macOS 'Catalina' or a newer version. Fooocus runs on Apple silicon computers via [PyTorch](https://pytorch.org/get-started/locally/) MPS device acceleration. Mac Silicon computers don't come with a dedicated graphics card, resulting in significantly longer image processing times compared to computers with dedicated graphics cards.
-
-1. Install the conda package manager and pytorch nightly. Read the [Accelerated PyTorch training on Mac](https://developer.apple.com/metal/pytorch/) Apple Developer guide for instructions. Make sure pytorch recognizes your MPS device.
-1. Open the macOS Terminal app and clone this repository with `git clone https://github.com/lllyasviel/Fooocus.git`.
-1. Change to the new Fooocus directory, `cd Fooocus`.
-1. Create a new conda environment, `conda env create -f environment.yaml`.
-1. Activate your new conda environment, `conda activate fooocus`.
-1. Install the packages required by Fooocus, `pip install -r requirements_versions.txt`.
-1. Launch Fooocus by running `python entry_with_update.py`. (Some Mac M2 users may need `python entry_with_update.py --disable-offload-from-vram` to speed up model loading/unloading.) The first time you run Fooocus, it will automatically download the Stable Diffusion SDXL models and will take a significant amount of time, depending on your internet connection.
-
-Use `python entry_with_update.py --preset anime` or `python entry_with_update.py --preset realistic` for Fooocus Anime/Realistic Edition.
-
-### Docker
-
-See [docker.md](docker.md)
-
-### Download Previous Version
-
-See the guidelines [here](https://github.com/lllyasviel/Fooocus/discussions/1405).
-
-## Minimal Requirement
-
-Below is the minimal requirement for running Fooocus locally. If your device capability is lower than this spec, you may not be able to use Fooocus locally. (Please let us know, in any case, if your device capability is lower but Fooocus still works.)
-
-| Operating System | GPU | Minimal GPU Memory | Minimal System Memory | [System Swap](troubleshoot.md) | Note |
-|-------------------|------------------------------|------------------------------|---------------------------|--------------------------------|----------------------------------------------------------------------------|
-| Windows/Linux | Nvidia RTX 4XXX | 4GB | 8GB | Required | fastest |
-| Windows/Linux | Nvidia RTX 3XXX | 4GB | 8GB | Required | usually faster than RTX 2XXX |
-| Windows/Linux | Nvidia RTX 2XXX | 4GB | 8GB | Required | usually faster than GTX 1XXX |
-| Windows/Linux | Nvidia GTX 1XXX | 8GB (* 6GB uncertain) | 8GB | Required | only marginally faster than CPU |
-| Windows/Linux | Nvidia GTX 9XX | 8GB | 8GB | Required | faster or slower than CPU |
-| Windows/Linux | Nvidia GTX < 9XX | Not supported | / | / | / |
-| Windows | AMD GPU | 8GB (updated 2023 Dec 30) | 8GB | Required | via DirectML (* ROCm is on hold), about 3x slower than Nvidia RTX 3XXX |
-| Linux | AMD GPU | 8GB | 8GB | Required | via ROCm, about 1.5x slower than Nvidia RTX 3XXX |
-| Mac | M1/M2 MPS | Shared | Shared | Shared | about 9x slower than Nvidia RTX 3XXX |
-| Windows/Linux/Mac | only use CPU | 0GB | 32GB | Required | about 17x slower than Nvidia RTX 3XXX |
-
-* AMD GPU ROCm (on hold): The AMD is still working on supporting ROCm on Windows.
-
-* Nvidia GTX 1XXX 6GB uncertain: Some people report 6GB success on GTX 10XX, but some other people report failure cases.
-
-*Note that Fooocus is only for extremely high quality image generating. We will not support smaller models to reduce the requirement and sacrifice result quality.*
-
-## Troubleshoot
-
-See the common problems [here](troubleshoot.md).
-
-## Default Models
-
-
-Given different goals, the default models and configs of Fooocus are different:
-
-| Task | Windows | Linux args | Main Model | Refiner | Config |
-|-----------| --- | --- |-----------------------------| --- |--------------------------------------------------------------------------------|
-| General | run.bat | | juggernautXL_v8Rundiffusion | not used | [here](https://github.com/lllyasviel/Fooocus/blob/main/presets/default.json) |
-| Realistic | run_realistic.bat | --preset realistic | realisticStockPhoto_v20 | not used | [here](https://github.com/lllyasviel/Fooocus/blob/main/presets/realistic.json) |
-| Anime | run_anime.bat | --preset anime | animaPencilXL_v500 | not used | [here](https://github.com/lllyasviel/Fooocus/blob/main/presets/anime.json) |
-
-Note that the download is **automatic** - you do not need to do anything if the internet connection is okay. However, you can download them manually if you (or move them from somewhere else) have your own preparation.
-
-## UI Access and Authentication
-In addition to running on localhost, Fooocus can also expose its UI in two ways:
-* Local UI listener: use `--listen` (specify port e.g. with `--port 8888`).
-* API access: use `--share` (registers an endpoint at `.gradio.live`).
-
-In both ways the access is unauthenticated by default. You can add basic authentication by creating a file called `auth.json` in the main directory, which contains a list of JSON objects with the keys `user` and `pass` (see example in [auth-example.json](./auth-example.json)).
-
-## List of "Hidden" Tricks
-
-
-
-Click to see a list of tricks. Those are based on SDXL and are not very up-to-date with latest models.
-
-1. GPT2-based [prompt expansion as a dynamic style "Fooocus V2".](https://github.com/lllyasviel/Fooocus/discussions/117#raw) (similar to Midjourney's hidden pre-processing and "raw" mode, or the LeonardoAI's Prompt Magic).
-2. Native refiner swap inside one single k-sampler. The advantage is that the refiner model can now reuse the base model's momentum (or ODE's history parameters) collected from k-sampling to achieve more coherent sampling. In Automatic1111's high-res fix and ComfyUI's node system, the base model and refiner use two independent k-samplers, which means the momentum is largely wasted, and the sampling continuity is broken. Fooocus uses its own advanced k-diffusion sampling that ensures seamless, native, and continuous swap in a refiner setup. (Update Aug 13: Actually, I discussed this with Automatic1111 several days ago, and it seems that the “native refiner swap inside one single k-sampler” is [merged]( https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12371) into the dev branch of webui. Great!)
-3. Negative ADM guidance. Because the highest resolution level of XL Base does not have cross attentions, the positive and negative signals for XL's highest resolution level cannot receive enough contrasts during the CFG sampling, causing the results to look a bit plastic or overly smooth in certain cases. Fortunately, since the XL's highest resolution level is still conditioned on image aspect ratios (ADM), we can modify the adm on the positive/negative side to compensate for the lack of CFG contrast in the highest resolution level. (Update Aug 16, the IOS App [Draw Things](https://apps.apple.com/us/app/draw-things-ai-generation/id6444050820) will support Negative ADM Guidance. Great!)
-4. We implemented a carefully tuned variation of Section 5.1 of ["Improving Sample Quality of Diffusion Models Using Self-Attention Guidance"](https://arxiv.org/pdf/2210.00939.pdf). The weight is set to very low, but this is Fooocus's final guarantee to make sure that the XL will never yield an overly smooth or plastic appearance (examples [here](https://github.com/lllyasviel/Fooocus/discussions/117#sharpness)). This can almost eliminate all cases for which XL still occasionally produces overly smooth results, even with negative ADM guidance. (Update 2023 Aug 18, the Gaussian kernel of SAG is changed to an anisotropic kernel for better structure preservation and fewer artifacts.)
-5. We modified the style templates a bit and added the "cinematic-default".
-6. We tested the "sd_xl_offset_example-lora_1.0.safetensors" and it seems that when the lora weight is below 0.5, the results are always better than XL without lora.
-7. The parameters of samplers are carefully tuned.
-8. Because XL uses positional encoding for generation resolution, images generated by several fixed resolutions look a bit better than those from arbitrary resolutions (because the positional encoding is not very good at handling int numbers that are unseen during training). This suggests that the resolutions in UI may be hard coded for best results.
-9. Separated prompts for two different text encoders seem unnecessary. Separated prompts for the base model and refiner may work, but the effects are random, and we refrain from implementing this.
-10. The DPM family seems well-suited for XL since XL sometimes generates overly smooth texture, but the DPM family sometimes generates overly dense detail in texture. Their joint effect looks neutral and appealing to human perception.
-11. A carefully designed system for balancing multiple styles as well as prompt expansion.
-12. Using automatic1111's method to normalize prompt emphasizing. This significantly improves results when users directly copy prompts from civitai.
-13. The joint swap system of the refiner now also supports img2img and upscale in a seamless way.
-14. CFG Scale and TSNR correction (tuned for SDXL) when CFG is bigger than 10.
-
-
-## Customization
-
-After the first time you run Fooocus, a config file will be generated at `Fooocus\config.txt`. This file can be edited to change the model path or default parameters.
-
-For example, an edited `Fooocus\config.txt` (this file will be generated after the first launch) may look like this:
-
-```json
-{
- "path_checkpoints": "D:\\Fooocus\\models\\checkpoints",
- "path_loras": "D:\\Fooocus\\models\\loras",
- "path_embeddings": "D:\\Fooocus\\models\\embeddings",
- "path_vae_approx": "D:\\Fooocus\\models\\vae_approx",
- "path_upscale_models": "D:\\Fooocus\\models\\upscale_models",
- "path_inpaint": "D:\\Fooocus\\models\\inpaint",
- "path_controlnet": "D:\\Fooocus\\models\\controlnet",
- "path_clip_vision": "D:\\Fooocus\\models\\clip_vision",
- "path_fooocus_expansion": "D:\\Fooocus\\models\\prompt_expansion\\fooocus_expansion",
- "path_outputs": "D:\\Fooocus\\outputs",
- "default_model": "realisticStockPhoto_v10.safetensors",
- "default_refiner": "",
- "default_loras": [["lora_filename_1.safetensors", 0.5], ["lora_filename_2.safetensors", 0.5]],
- "default_cfg_scale": 3.0,
- "default_sampler": "dpmpp_2m",
- "default_scheduler": "karras",
- "default_negative_prompt": "low quality",
- "default_positive_prompt": "",
- "default_styles": [
- "Fooocus V2",
- "Fooocus Photograph",
- "Fooocus Negative"
- ]
-}
-```
-
-Many other keys, formats, and examples are in `Fooocus\config_modification_tutorial.txt` (this file will be generated after the first launch).
-
-Consider twice before you really change the config. If you find yourself breaking things, just delete `Fooocus\config.txt`. Fooocus will go back to default.
-
-A safer way is just to try "run_anime.bat" or "run_realistic.bat" - they should already be good enough for different tasks.
-
-~Note that `user_path_config.txt` is deprecated and will be removed soon.~ (Edit: it is already removed.)
-
-### All CMD Flags
-
-```
-entry_with_update.py [-h] [--listen [IP]] [--port PORT]
- [--disable-header-check [ORIGIN]]
- [--web-upload-size WEB_UPLOAD_SIZE]
- [--hf-mirror HF_MIRROR]
- [--external-working-path PATH [PATH ...]]
- [--output-path OUTPUT_PATH]
- [--temp-path TEMP_PATH] [--cache-path CACHE_PATH]
- [--in-browser] [--disable-in-browser]
- [--gpu-device-id DEVICE_ID]
- [--async-cuda-allocation | --disable-async-cuda-allocation]
- [--disable-attention-upcast]
- [--all-in-fp32 | --all-in-fp16]
- [--unet-in-bf16 | --unet-in-fp16 | --unet-in-fp8-e4m3fn | --unet-in-fp8-e5m2]
- [--vae-in-fp16 | --vae-in-fp32 | --vae-in-bf16]
- [--vae-in-cpu]
- [--clip-in-fp8-e4m3fn | --clip-in-fp8-e5m2 | --clip-in-fp16 | --clip-in-fp32]
- [--directml [DIRECTML_DEVICE]]
- [--disable-ipex-hijack]
- [--preview-option [none,auto,fast,taesd]]
- [--attention-split | --attention-quad | --attention-pytorch]
- [--disable-xformers]
- [--always-gpu | --always-high-vram | --always-normal-vram | --always-low-vram | --always-no-vram | --always-cpu [CPU_NUM_THREADS]]
- [--always-offload-from-vram]
- [--pytorch-deterministic] [--disable-server-log]
- [--debug-mode] [--is-windows-embedded-python]
- [--disable-server-info] [--multi-user] [--share]
- [--preset PRESET] [--disable-preset-selection]
- [--language LANGUAGE]
- [--disable-offload-from-vram] [--theme THEME]
- [--disable-image-log] [--disable-analytics]
- [--disable-metadata] [--disable-preset-download]
- [--disable-enhance-output-sorting]
- [--enable-auto-describe-image]
- [--always-download-new-model]
- [--rebuild-hash-cache [CPU_NUM_THREADS]]
-```
-
-## Inline Prompt Features
-
-### Wildcards
-
-Example prompt: `__color__ flower`
-
-Processed for positive and negative prompt.
-
-Selects a random wildcard from a predefined list of options, in this case the `wildcards/color.txt` file.
-The wildcard will be replaced with a random color (randomness based on seed).
-You can also disable randomness and process a wildcard file from top to bottom by enabling the checkbox `Read wildcards in order` in Developer Debug Mode.
-
-Wildcards can be nested and combined, and multiple wildcards can be used in the same prompt (example see `wildcards/color_flower.txt`).
-
-### Array Processing
-
-Example prompt: `[[red, green, blue]] flower`
-
-Processed only for positive prompt.
-
-Processes the array from left to right, generating a separate image for each element in the array. In this case 3 images would be generated, one for each color.
-Increase the image number to 3 to generate all 3 variants.
-
-Arrays can not be nested, but multiple arrays can be used in the same prompt.
-Does support inline LoRAs as array elements!
-
-### Inline LoRAs
-
-Example prompt: `flower `
-
-Processed only for positive prompt.
-
-Applies a LoRA to the prompt. The LoRA file must be located in the `models/loras` directory.
-
-## Advanced Features
-
-[Click here to browse the advanced features.](https://github.com/lllyasviel/Fooocus/discussions/117)
-
-## Forks
-
-Below are some Forks to Fooocus:
-
-| Fooocus' forks |
-| - |
-| [fenneishi/Fooocus-Control](https://github.com/fenneishi/Fooocus-Control) [runew0lf/RuinedFooocus](https://github.com/runew0lf/RuinedFooocus) [MoonRide303/Fooocus-MRE](https://github.com/MoonRide303/Fooocus-MRE) [mashb1t/Fooocus](https://github.com/mashb1t/Fooocus) and so on ... |
-
-## Thanks
-
-Many thanks to [twri](https://github.com/twri) and [3Diva](https://github.com/3Diva) and [Marc K3nt3L](https://github.com/K3nt3L) for creating additional SDXL styles available in Fooocus.
-
-The project starts from a mixture of [Stable Diffusion WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) and [ComfyUI](https://github.com/comfyanonymous/ComfyUI) codebases.
-
-Also, thanks [daswer123](https://github.com/daswer123) for contributing the Canvas Zoom!
-
-## Update Log
-
-The log is [here](update_log.md).
-
-## Localization/Translation/I18N
-
-You can put json files in the `language` folder to translate the user interface.
-
-For example, below is the content of `Fooocus/language/example.json`:
-
-```json
-{
- "Generate": "生成",
- "Input Image": "入力画像",
- "Advanced": "고급",
- "SAI 3D Model": "SAI 3D Modèle"
-}
-```
-
-If you add `--language example` arg, Fooocus will read `Fooocus/language/example.json` to translate the UI.
-
-For example, you can edit the ending line of Windows `run.bat` as
-
- .\python_embeded\python.exe -s Fooocus\entry_with_update.py --language example
-
-Or `run_anime.bat` as
-
- .\python_embeded\python.exe -s Fooocus\entry_with_update.py --language example --preset anime
-
-Or `run_realistic.bat` as
-
- .\python_embeded\python.exe -s Fooocus\entry_with_update.py --language example --preset realistic
-
-For practical translation, you may create your own file like `Fooocus/language/jp.json` or `Fooocus/language/cn.json` and then use flag `--language jp` or `--language cn`. Apparently, these files do not exist now. **We need your help to create these files!**
-
-Note that if no `--language` is given and at the same time `Fooocus/language/default.json` exists, Fooocus will always load `Fooocus/language/default.json` for translation. By default, the file `Fooocus/language/default.json` does not exist.
+pip install torch==2.7.1+cu128 torchvision==0.22.1+cu128 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128
diff --git a/requirements_docker.txt b/requirements_docker.txt
index 21883adf..a2cbe47b 100644
--- a/requirements_docker.txt
+++ b/requirements_docker.txt
@@ -1,2 +1,2 @@
-torch==2.1.0
-torchvision==0.16.0
+torch==2.7.1
+torchvision==0.22.1
diff --git a/requirements_versions.txt b/requirements_versions.txt
index 9147db47..ebcd3fb8 100644
--- a/requirements_versions.txt
+++ b/requirements_versions.txt
@@ -14,7 +14,7 @@ gradio==3.41.2
pygit2==1.15.1
opencv-contrib-python-headless==4.10.0.84
httpx==0.27.0
-onnxruntime==1.18.1
+onnxruntime==1.22.0
timm==1.0.7
numpy==1.26.4
tokenizers==0.19.1
diff --git a/run.bat b/run.bat
new file mode 100644
index 00000000..05b1a1e5
--- /dev/null
+++ b/run.bat
@@ -0,0 +1,2 @@
+.\python_embeded\python.exe -s Fooocus\entry_with_update.py
+pause
diff --git a/sdxl_styles/sdxl_styles_twri.json b/sdxl_styles/sdxl_styles_twri.json
index 687a19d2..cc532b7f 100644
--- a/sdxl_styles/sdxl_styles_twri.json
+++ b/sdxl_styles/sdxl_styles_twri.json
@@ -299,16 +299,6 @@
"prompt": "lovecraftian horror {prompt} . eldritch, cosmic horror, unknown, mysterious, surreal, highly detailed",
"negative_prompt": "light-hearted, mundane, familiar, simplistic, realistic"
},
- {
- "name": "misc-macabre",
- "prompt": "macabre style {prompt} . dark, gothic, grim, haunting, highly detailed",
- "negative_prompt": "bright, cheerful, light-hearted, cartoonish, cute"
- },
- {
- "name": "misc-manga",
- "prompt": "manga style {prompt} . vibrant, high-energy, detailed, iconic, Japanese comic style",
- "negative_prompt": "ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, Western comic style"
- },
{
"name": "misc-metropolis",
"prompt": "metropolis-themed {prompt} . urban, cityscape, skyscrapers, modern, futuristic, highly detailed",
@@ -344,11 +334,6 @@
"prompt": "techwear fashion {prompt} . futuristic, cyberpunk, urban, tactical, sleek, dark, highly detailed",
"negative_prompt": "vintage, rural, colorful, low contrast, realism, sketch, watercolor"
},
- {
- "name": "misc-tribal",
- "prompt": "tribal style {prompt} . indigenous, ethnic, traditional patterns, bold, natural colors, highly detailed",
- "negative_prompt": "modern, futuristic, minimalist, pastel"
- },
{
"name": "misc-zentangle",
"prompt": "zentangle {prompt} . intricate, abstract, monochrome, patterns, meditative, highly detailed",
@@ -419,11 +404,6 @@
"prompt": "HDR photo of {prompt} . High dynamic range, vivid, rich details, clear shadows and highlights, realistic, intense, enhanced contrast, highly detailed",
"negative_prompt": "flat, low contrast, oversaturated, underexposed, overexposed, blurred, noisy"
},
- {
- "name": "photo-iphone photographic",
- "prompt": "iphone photo {prompt} . large depth of field, deep depth of field, highly detailed",
- "negative_prompt": "drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly, shallow depth of field, bokeh"
- },
{
"name": "photo-long exposure",
"prompt": "long exposure photo of {prompt} . Blurred motion, streaks of light, surreal, dreamy, ghosting effect, highly detailed",
@@ -444,4 +424,4 @@
"prompt": "tilt-shift photo of {prompt} . selective focus, miniature effect, blurred background, highly detailed, vibrant, perspective control",
"negative_prompt": "blurry, noisy, deformed, flat, low contrast, unrealistic, oversaturated, underexposed"
}
-]
\ No newline at end of file
+]
diff --git a/troubleshoot.md b/troubleshoot.md
deleted file mode 100644
index 7e079742..00000000
--- a/troubleshoot.md
+++ /dev/null
@@ -1,178 +0,0 @@
-Below are many common problems that people encountered:
-
-### RuntimeError: CPUAllocator
-
-See also the section: **System Swap**
-
-### Model loaded, then paused, then nothing happens
-
-See also the section: **System Swap**
-
-### Segmentation Fault
-
-See also the section: **System Swap**
-
-### Aborted
-
-See also the section: **System Swap**
-
-### core dumped
-
-See also the section: **System Swap**
-
-### Killed
-
-See also the section: **System Swap**
-
-### ^C, then quit
-
-See also the section: **System Swap**
-
-### adm 2816, then stuck
-
-See also the section: **System Swap**
-
-### Connection errored out
-
-See also the section: **System Swap**
-
-### Error 1006
-
-See also the section: **System Swap**
-
-### WinError 10060
-
-See also the section: **System Swap**
-
-### Read timed out
-
-See also the section: **System Swap**
-
-### No error, but the console close in a flash. Cannot find any error.
-
-See also the section: **System Swap**
-
-### Model loading is extremely slow (more than 1 minute)
-
-See also the section: **System Swap**
-
-### System Swap
-
-All above problems are caused by the fact that you do not have enough System Swap.
-
-Please make sure that you have at least 40GB System Swap. In fact, it does not need so much Swap, but 40Gb should be safe for you to run Fooocus in 100% success.
-
-(If you have more than 64GB RAM, then *perhaps* you do not need any System Swap, but we are not exactly sure about this.)
-
-Also, if your system swap is on HDD, the speed of model loading will be very slow. Please try best to put system swap on SSD.
-
-If you are using Linux/Mac, please follow your provider's instructions to set Swap Space. Herein, the "provider" refers to Ubuntu official, CentOS official, Mac official, etc.
-
-If you are using Windows, you can set Swap here:
-
-
-
-If you use both HDD and SSD, you *may* test some settings on the above step 7 to try best to put swap area on SSD, so that the speed of model loading will be faster.
-
-**Important: Microsoft Windows 10/11 by default automate system swap for you so that you do not need to touch this dangerous setting. If you do not have enough system swap, just make sure that you have at least 40GB free space on each disk.** The Microsoft Windows 10/11 will automatically make swap areas for you.
-
-Also, if you obtain Microsoft Windows 10/11 from some unofficial Chinese or Russian provider, they may have modified the default setting of system swap to advertise some "Enhanced Windows 10/11" (but actually they are just making things worse rather than improve things). In those cases, you may need to manually check if your system swap setting is consistent to the above screenshot.
-
-Finally, note that you need to restart computer to activate any changes in system swap.
-
-### MetadataIncompleteBuffer
-
-See also the section: **Model corrupted**
-
-### PytorchStreamReader failed
-
-See also the section: **Model corrupted**
-
-### Model corrupted
-
-If you see Model Corrupted, then your model is corrupted. Fooocus will re-download corrupted models for you if your internet connection is good. Otherwise, you may also manually download models. You can find model url and their local location in the console each time a model download is requested.
-
-### UserWarning: The operator 'aten::std_mean.correction' is not currently supported on the DML
-
-This is a warning that you can ignore.
-
-### Torch not compiled with CUDA enabled
-
-You are not following the official installation guide.
-
-Please do not trust those wrong tutorials on the internet, and please only trust the official installation guide.
-
-### subprocess-exited-with-error
-
-Please use python 3.10
-
-Also, you are not following the official installation guide.
-
-Please do not trust those wrong tutorials on the internet, and please only trust the official installation guide.
-
-### SSL: CERTIFICATE_VERIFY_FAILED
-
-Are you living in China? If yes, please consider turn off VPN, and/or try to download models manually.
-
-If you get this error elsewhere in the world, then you may need to look at [this search](https://www.google.com/search?q=SSL+Certificate+Error). We cannot give very specific guide to fix this since the cause can vary a lot.
-
-### CUDA kernel errors might be asynchronously reported at some other API call
-
-A very small amount of devices does have this problem. The cause can be complicated but usually can be resolved after following these steps:
-
-1. Make sure that you are using official version and latest version installed from [here](https://github.com/lllyasviel/Fooocus#download). (Some forks and other versions are more likely to cause this problem.)
-2. Upgrade your Nvidia driver to the latest version. (Usually the version of your Nvidia driver should be 53X, not 3XX or 4XX.)
-3. If things still do not work, then perhaps it is a problem with CUDA 12. You can use CUDA 11 and Xformers to try to solve this problem. We have prepared all files for you, and please do NOT install any CUDA or other environment on you own. The only one official way to do this is: (1) Backup and delete your `python_embeded` folder (near the `run.bat`); (2) Download the "previous_old_xformers_env.7z" from the [release page](https://github.com/lllyasviel/Fooocus/releases/tag/release), decompress it, and put the newly extracted `python_embeded` folder near your `run.bat`; (3) run Fooocus.
-4. If it still does not work, please open an issue for us to take a look.
-
-### Found no NVIDIA driver on your system
-
-Please upgrade your Nvidia Driver.
-
-If you are using AMD, please follow official installation guide.
-
-### NVIDIA driver too old
-
-Please upgrade your Nvidia Driver.
-
-### I am using Mac, the speed is very slow.
-
-Some MAC users may need `--disable-offload-from-vram` to speed up model loading.
-
-Besides, the current support for MAC is very experimental, and we encourage users to also try Diffusionbee or Drawingthings: they are developed only for MAC.
-
-### I am using Nvidia with 8GB VRAM, I get CUDA Out Of Memory
-
-It is a BUG. Please let us know as soon as possible. Please make an issue. See also [minimal requirements](https://github.com/lllyasviel/Fooocus/tree/main?tab=readme-ov-file#minimal-requirement).
-
-### I am using Nvidia with 6GB VRAM, I get CUDA Out Of Memory
-
-It is very likely a BUG. Please let us know as soon as possible. Please make an issue. See also [minimal requirements](https://github.com/lllyasviel/Fooocus/tree/main?tab=readme-ov-file#minimal-requirement).
-
-### I am using Nvidia with 4GB VRAM with Float16 support, like RTX 3050, I get CUDA Out Of Memory
-
-It is a BUG. Please let us know as soon as possible. Please make an issue. See also [minimal requirements](https://github.com/lllyasviel/Fooocus/tree/main?tab=readme-ov-file#minimal-requirement).
-
-### I am using Nvidia with 4GB VRAM without Float16 support, like GTX 960, I get CUDA Out Of Memory
-
-Supporting GPU with 4GB VRAM without fp16 is extremely difficult, and you may not be able to use SDXL. However, you may still make an issue and let us know. You may try SD1.5 in Automatic1111 or other software for your device. See also [minimal requirements](https://github.com/lllyasviel/Fooocus/tree/main?tab=readme-ov-file#minimal-requirement).
-
-### I am using AMD GPU on Windows, I get CUDA Out Of Memory
-
-Current AMD support is very experimental for Windows. If you see this, then perhaps you cannot use Fooocus on this device on Windows.
-
-However, if you re able to run SDXL on this same device on any other software, please let us know immediately, and we will support it as soon as possible. If no other software can enable your device to run SDXL on Windows, then we also do not have much to help.
-
-Besides, the AMD support on Linux is slightly better because it will use ROCM. You may also try it if you are willing to change OS to linux. See also [minimal requirements](https://github.com/lllyasviel/Fooocus/tree/main?tab=readme-ov-file#minimal-requirement).
-
-### I am using AMD GPU on Linux, I get CUDA Out Of Memory
-
-Current AMD support for Linux is better than that for Windows, but still, very experimental. However, if you re able to run SDXL on this same device on any other software, please let us know immediately, and we will support it as soon as possible. If no other software can enable your device to run SDXL on Windows, then we also do not have much to help. See also [minimal requirements](https://github.com/lllyasviel/Fooocus/tree/main?tab=readme-ov-file#minimal-requirement).
-
-### I tried flags like --lowvram or --gpu-only or --bf16 or so on, and things are not getting any better?
-
-Please remove these flags if you are mislead by some wrong tutorials. In most cases these flags are making things worse and introducing more problems.
-
-### Fooocus suddenly becomes very slow and I have not changed anything
-
-Are you accidentally running two Fooocus at the same time?