lshqqytiger / stable-diffusion-webui-amdgpu-forge

Forge for stable-diffusion-webui-amdgpu (formerly stable-diffusion-webui-directml)
GNU Affero General Public License v3.0
50 stars 4 forks source link

21.10.2024 Inpaint does not work with any lora on directml but it works without any lora #46

Closed Harbitos closed 1 day ago

Harbitos commented 3 days ago

This story started from here: 44 — It says in more detail what I have already tried to do.


I tell you: everything works well on ZLUDA, I can use lora in inpaint, but zluda cannot make images larger than 1024*1280, so I switched to directml. And it turned out that zluda and directml generate images at the same time for me.

But on directml inpaint, it doesn't work with any lora, even if I change the model and prompt with resolution. But everything works perfectly without lora! I was even able to make images with a resolution of 2048 2048 in 15-25 minutes in inpaint without lora. And I can also generate 2048 2048 images in 44 minutes in txt2img.


I made pictures in txt2img with arguments: (inpaint works here, but does not change the picture, the result of the picture is unchanged)

--directml --upcast-sampling --theme dark --skip-version-check --opt-sub-quad-attention --disable-nan-check --always-low-vram --all-in-fp16
set CUDA_LAUNCH_BLOCKING=1

I did inpaint with arguments: (crashes, showing press any key to continue...)

--directml --theme dark --no-half --no-half-vae
set CUDA_LAUNCH_BLOCKING=1

I tried to write other (--always-low-vram --all-in-fp16) arguments, but it didn't help.


And there was also [W dml_heap_allocator.cc:120] DML allocator out of memory! when there were arguments:

--directml --upcast-sampling --theme dark --skip-version-check --opt-sub-quad-attention --disable-nan-check --no-half
set CUDA_LAUNCH_BLOCKING=1

I was able to set up the arguments (I don't remember which ones, and I can't reproduce it right now) once in such a way that after that I noticed that the generation in inpaint is going on! There are changes in the picture! But at the end of 100% generation, it also crashed and did not save the picture. All this time, the console was being spammed:

86%|██████████████████████████████████████████████████████████████████████▎ | 12/14 [04:17<00:41, 20.64s/it]ran out of memory while running softmax in _get_attention_scores_no_kv_chunking, trying slower in place softmax insteadit]
ran out of memory while running softmax in _get_attention_scores_no_kv_chunking, trying slower in place softmax instead
ran out of memory while running softmax in _get_attention_scores_no_kv_chunking, trying slower in place softmax instead
ran out of memory while running softmax in _get_attention_scores_no_kv_chunking, trying slower in place softmax instead
100%|██████████████████████████████████████████████████████████████████████████████████| 14/14 [04:54<00:00, 21.05s/it]
Press any key to continue . . .

A clean install of the SD did not help. Windows reinstalled this month. Reinstalling git, python, amd driver (or installing pro) did not help. If anything, the swap file is on automatically and it's about 20GB. Putting the swap file 1.5 times more RAM did not help, but when I made a mistake and put 2 times more, then my generation was 29% and then the PC froze, but the cursor moved, I was able to complete the work.

Since everything works well in zluda, I think that the inpaint problem is not related to my PC.

*MAIN: I need to be able to use inpaint with lora and do it in pictures from 20482048.** It should work, TheFerumn on RX570 4GB has directml inpaint running even with lora.


Changed settings: The optimizations/Batch cond/uncond checkmark has been removed. There are TAESD in VAE/VAE type for decode. They stand at 64 (a screenshot will be attached) in Upscaling/Tile size. Live previews/Live preview display period is set to 2.


Approximately these are the parameters I set every time: Changing gpu weights 0/1024 — no difference. 378306715-d7bdd470-c5b7-4190-8143-24649900c0bd 378306724-0072487a-57f2-4afc-88f8-e606c3239190

Tile size: Screenshot_1

Console after inpainting with any lora:

venv "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f2.0.1v1.10.1-1.10.1
Commit hash: 93211db60a93840782454cf6f54a62bdc088a7bc
Launching Web UI with arguments: --directml --theme dark --no-half --no-half-vae
Using directml with device:
Total VRAM 1024 MB, total RAM 16328 MB
pytorch version: 2.3.1+cpu
Set vram state to: NORMAL_VRAM
Device: privateuseone
VAE dtype preferences: [torch.float32] -> torch.float32
CUDA Using Stream: False
D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\starlette\formparsers.py:10: FutureWarning: Please use `import python_multipart` instead.
  import multipart
Using sub quadratic optimization for cross attention
Using split attention for VAE
ONNX failed to initialize: module 'optimum.onnxruntime.modeling_diffusion' has no attribute '_ORTDiffusionModelPart'
*** Error loading script: preprocessor_inpaint.py
    Traceback (most recent call last):
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\extensions-builtin\forge_preprocessor_inpaint\scripts\preprocessor_inpaint.py", line 13, in <module>
        from annotator.lama.saicinpainting.training.trainers import load_checkpoint
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\extensions-builtin\forge_preprocessor_inpaint\annotator\lama\saicinpainting\training\trainers\__init__.py", line 3, in <module>
        from annotator.lama.saicinpainting.training.trainers.default import DefaultInpaintingTrainingModule
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\extensions-builtin\forge_preprocessor_inpaint\annotator\lama\saicinpainting\training\trainers\default.py", line 11, in <module>
        from annotator.lama.saicinpainting.training.trainers.base import BaseInpaintingTrainingModule, make_multiscale_noise
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\extensions-builtin\forge_preprocessor_inpaint\annotator\lama\saicinpainting\training\trainers\base.py", line 16, in <module>
        from annotator.lama.saicinpainting.training.modules import make_generator  #, make_discriminator
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\extensions-builtin\forge_preprocessor_inpaint\annotator\lama\saicinpainting\training\modules\__init__.py", line 3, in <module>
        from annotator.lama.saicinpainting.training.modules.ffc import FFCResNetGenerator
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\extensions-builtin\forge_preprocessor_inpaint\annotator\lama\saicinpainting\training\modules\ffc.py", line 11, in <module>
        from annotator.lama.saicinpainting.training.modules.spatial_transform import LearnableSpatialTransformWrapper
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\extensions-builtin\forge_preprocessor_inpaint\annotator\lama\saicinpainting\training\modules\spatial_transform.py", line 4, in <module>
        from kornia.geometry.transform import rotate
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\kornia\__init__.py", line 11, in <module>
        from . import augmentation, color, contrib, core, enhance, feature, io, losses, metrics, morphology, tracking, utils, x
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\kornia\augmentation\__init__.py", line 1, in <module>
        from kornia.augmentation._2d import (
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\kornia\augmentation\_2d\__init__.py", line 3, in <module>
        from kornia.augmentation._2d.mix import *
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\kornia\augmentation\_2d\mix\__init__.py", line 1, in <module>
        from kornia.augmentation._2d.mix.cutmix import RandomCutMix, RandomCutMixV2
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\kornia\augmentation\_2d\mix\cutmix.py", line 7, in <module>
        from kornia.augmentation._2d.mix.base import MixAugmentationBase, MixAugmentationBaseV2
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\kornia\augmentation\_2d\mix\base.py", line 10, in <module>
        from kornia.geometry.boxes import Boxes
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\kornia\geometry\boxes.py", line 582, in <module>
        class Boxes3D:
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\_script.py", line 1375, in script
        _compile_and_register_class(obj, _rcb, qualified_name)
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\_recursive.py", line 61, in _compile_and_register_class
        script_class = torch._C._jit_script_class_compile(
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\_recursive.py", line 1007, in try_compile_fn
        return torch.jit.script(fn, _rcb=rcb)
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\_script.py", line 1395, in script
        fn = torch._C._jit_script_compile(
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\_recursive.py", line 1007, in try_compile_fn
        return torch.jit.script(fn, _rcb=rcb)
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\_script.py", line 1395, in script
        fn = torch._C._jit_script_compile(
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\_recursive.py", line 1007, in try_compile_fn
        return torch.jit.script(fn, _rcb=rcb)
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\_script.py", line 1392, in script
        ast = get_jit_def(obj, obj.__name__)
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\jit\frontend.py", line 331, in get_jit_def
        parsed_def = parse_def(fn) if not isinstance(fn, _ParsedDef) else fn
      File "D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\_sources.py", line 128, in parse_def
        raise RuntimeError(
    RuntimeError: Expected a single top-level function: D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\modules\dml\amp\autocast_mode.py:43

ControlNet preprocessor location: D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\models\ControlNetPreprocessor
Loading additional modules ... done.
2024-10-21 10:22:25,424 - ControlNet - INFO - ControlNet UI callback registered.
Model selected: {'checkpoint_info': {'filename': 'D:\\Stable Diffusion\\stable-diffusion-webui-amdgpu-forge\\models\\Stable-diffusion\\snowpony_v10.safetensors', 'hash': '7a851477'}, 'additional_modules': ['D:\\Stable Diffusion\\stable-diffusion-webui-amdgpu-forge\\models\\VAE\\sdxl.vae.safetensors'], 'unet_storage_dtype': None}
Using online LoRAs in FP16: False
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 38.3s (prepare environment: 1.3s, import torch: 20.2s, initialize shared: 2.6s, load scripts: 3.5s, initialize google blockly: 5.5s, create ui: 3.1s, gradio launch: 1.8s).
Environment vars changed: {'stream': False, 'inference_memory': 1024.0, 'pin_shared_memory': False}
[GPU Setting] You will use 0.00% GPU memory (0.00 MB) to load weights, and use 100.00% GPU memory (1024.00 MB) to do matrix computation.
Loading Model: {'checkpoint_info': {'filename': 'D:\\Stable Diffusion\\stable-diffusion-webui-amdgpu-forge\\models\\Stable-diffusion\\snowpony_v10.safetensors', 'hash': '7a851477'}, 'additional_modules': ['D:\\Stable Diffusion\\stable-diffusion-webui-amdgpu-forge\\models\\VAE\\sdxl.vae.safetensors'], 'unet_storage_dtype': None}
[Unload] Trying to free all memory for privateuseone:0 with 0 models keep loaded ... Done.
StateDict Keys: {'unet': 1680, 'vae': 250, 'text_encoder': 197, 'text_encoder_2': 518, 'ignore': 0}
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
IntegratedAutoencoderKL Unexpected: ['model_ema.decay', 'model_ema.num_updates']
K-Model Created: {'storage_dtype': torch.float32, 'computation_dtype': torch.float32}
Model loaded in 55.8s (unload existing model: 0.3s, forge model load: 55.5s).
[LORA] Loaded D:\Stable Diffusion\stable-diffusion-webui-amdgpu-forge\models\Lora\OMG-Is-DucHaiten_v1.0.safetensors for KModel-UNet with 750 keys at weight 1.0 (skipped 0 keys) with on_the_fly = False
All loaded to GPU.
Moving model(s) has taken 0.02 seconds
[Unload] Trying to free 16058.73 MB for privateuseone:0 with 0 models keep loaded ... Current free memory is 1024.00 MB ... Done.
[Memory Management] Target: KModel, Free GPU: 1024.00 MB, Model Require: 9794.10 MB, Previously Loaded: 0.00 MB, Inference Require: 1024.00 MB, Remaining: -9794.10 MB, CPU Swap Loaded (blocked method): 9794.10 MB, GPU Loaded: 0.00 MB
Moving model(s) has taken 163.81 seconds
  0%|                                                                                           | 0/14 [00:00<?, ?it/s]
Press any key to continue . . .

@lshqqytiger, please help me.

TheFerumn commented 2 days ago

Since everything works well in zluda, I think that the inpaint problem is not related to my PC.

Its not so simple. When you use ZLUDA then SD downloads different packages so your environment is set up differently. It can be totally related to your PC. You said you deleted every package with pip freeze commands ? If you did it correctly then i doubt there is anything we can do about it. Can you show your Sys Info ? Its in Settings/sysinfo

*MAIN: I need to be able to use inpaint with lora and do it in pictures from 20482048.** It should work, TheFerumn on RX570 4GB has directml inpaint running even with lora.

Yes but never on such a big resolutions due to 4GB.

Harbitos commented 2 days ago

Can you show your Sys Info ? Its in Settings/sysinfo

SD settings/system, maybe it: sysinfo from Harbit.txt

TheFerumn commented 2 days ago

image

Can you set this in settings/optimizations and check if its better ? It should be enabled as default but you have it disabled

Also check setting below although you might want to test without it first

image

TheFerumn commented 2 days ago

I checked your installed packages. Looks like you didn't deleted them as i asked. I doubt it would download for you newer versions than i have. You either not switched python versions correctly or not switched backend correctly. I am not sure what happened and which of this packages are responsible for so i suggest you to manually uninstall all of them from the list below and option 1: let SD install them automatically during the launch, option 2: install them manually 1 by 1. This is my versions of packages:

        "aiohappyeyeballs==2.4.0",
        "aiohttp==3.10.6",
    "albucore==Not istalled
        "albumentations==1.4.3",
        "charset-normalizer==3.3.2",
    "eval_type_backport==Not istalled
        "fsspec==2024.9.0",
        "ftfy==6.2.3",
        "imageio==2.35.1",
        "jax==0.4.33",
        "jaxlib==0.4.33",
        "jsonschema-specifications==2023.12.1",
        "lightning-utilities==0.11.7",
        "networkx==3.3",
        "olive-ai==0.6.2",
        "opt-einsum==3.3.0",
        "optimum==1.22.0",
        "orjson==3.10.7",
        "propcache==Not istalled
        "pyparsing==3.1.4",
        "python-multipart==0.0.10",
        "pywin32==306",
        "reportlab==4.2.2",
        "rich==13.8.1",
        "ruff==0.6.7",
        "sounddevice==0.5.0",
        "SQLAlchemy==2.0.35",
        "termcolor==2.4.0",
        "timm==1.0.9",
        "tokenizers==0.19.1",
        "torchmetrics==1.4.2",
        "transformers==4.44.2",
        "trimesh==4.4.9",
        "uvicorn==0.30.6",
        "yarl==1.12.1",

And this is yours:

        "aiohappyeyeballs==2.4.3",
        "aiohttp==3.10.10",
        "albucore==0.0.17",
        "albumentations==1.4.18",
        "charset-normalizer==3.4.0",
        "eval_type_backport==0.2.0",
        "fsspec==2024.10.0",
        "ftfy==6.3.0",
        "imageio==2.36.0",
        "jax==0.4.34",
        "jaxlib==0.4.34",
        "jsonschema-specifications==2024.10.1",
        "lightning-utilities==0.11.8",
        "networkx==3.4.2",
        "olive-ai==0.7.0",
        "opt_einsum==3.4.0",
        "optimum==1.23.1",
        "orjson==3.10.9",
        "propcache==0.2.0",
        "pyparsing==3.2.0",
        "python-multipart==0.0.12",
        "pywin32==308",
        "reportlab==4.2.5",
        "rich==13.9.2",
        "ruff==0.7.0",
        "sounddevice==0.5.1",
        "SQLAlchemy==2.0.36",
        "termcolor==2.5.0",
        "timm==1.0.11",
        "tokenizers==0.20.1",
        "torchmetrics==1.5.0",
        "transformers==4.45.2",
        "trimesh==4.5.0",
        "uvicorn==0.32.0",
        "yarl==1.15.5",

Most of them are probably not important and not related to your issues but i suggest you to start from downgrading optimum, torchmetrics, transformers. Before all of that use pip cache purge and check which version it actually installed for you or do it manually and write version you want.

Harbitos commented 2 days ago

I checked your installed packages. Looks like you didn't deleted them as i asked. I doubt it would download for you newer versions than i have. You either not switched python versions correctly or not switched backend correctly. I am not sure what happened and which of this packages are responsible for so i suggest you to manually uninstall all of them from the list below and option 1: let SD install them automatically during the launch, option 2: install them manually 1 by 1. This is my versions of packages:

Please write me all the commands in turn, I don't understand the screenshot that you sent a little, maybe something didn't work for me.

Can you set this in settings/optimizations and check if its better ? It should be enabled as default but you have it disabled Also check setting below although you might want to test without it first

I'll try it now

TheFerumn commented 2 days ago

Please write me all the commands in turn, I don't understand the screenshot that you sent a little, maybe something didn't work for me. By the way, do you have them installed?

I send you my and your list of packages which have different versions. Downgrade them to the versions from the first list. Open your CMD go into venv/scripts/ then type activate and use command pip uninstall package1 package2 package3 etc. to uninstall them and then use command pip install package name==version of package. For example pip uninstall transformers and then pip install transformers==4.44.2

Harbitos commented 2 days ago

I send you my and your list of packages which have different versions. Downgrade them to the versions from the first list. Open your CMD go into venv/scripts/ then type activate and use command pip uninstall package1 package2 package3 etc. to uninstall them and then use command pip install package name==version of package. For example pip uninstall transformers and then pip install transformers==4.44.2

I didn't understand exactly how to do it. Can you send me the whole list of all the commands? If anything, I haven't changed or reinstalled anything since I sent you sysinfo.

Can you set this in settings/optimizations and check if its better ? It should be enabled as default but you have it disabled Also check setting below although you might want to test without it first

I did it with the --no-half --no-half-vae arguments, but my windows showed different memory errors every time and the browser crashed.

TheFerumn commented 2 days ago

I send you my and your list of packages which have different versions. Downgrade them to the versions from the first list. Open your CMD go into venv/scripts/ then type activate and use command pip uninstall package1 package2 package3 etc. to uninstall them and then use command pip install package name==version of package. For example pip uninstall transformers and then pip install transformers==4.44.2

I didn't understand exactly how to do it. Can you send me the whole list of all the commands?

I don't know how i can explain it to you in a different or more detailed way...

I did it with the --no-half --no-half-vae arguments, but my windows showed different memory errors every time and the browser crashed.

It happens when you don't have enough memory. What resolution you used ? It shouldn't crash on lower resolutions...

Harbitos commented 2 days ago

I checked your installed packages. Looks like you didn't deleted them as i asked. I doubt it would download for you newer versions than i have. You either not switched python versions correctly or not switched backend correctly. I am not sure what happened and which of this packages are responsible for so i suggest you to manually uninstall all of them from the list below and option 1: let SD install them automatically during the launch, option 2: install them manually 1 by 1. Most of them are probably not important and not related to your issues but i suggest you to start from downgrading optimum, torchmetrics, transformers. Before all of that use pip cache purge and check which version it actually installed for you or do it manually and write version you want.

I deleted them all, and installed the ones you have. It didn't help.

I even saved the command that I wrote after deleting it: pip install aiohappyeyeballs==2.4.0 aiohttp==3.10.6 albumentations==1.4.3 charset-normalizer==3.3.2 fsspec==2024.9.0 ftfy==6.2.3 imageio==2.35.1 jax==0.4.33 jaxlib==0.4.33 jsonschema-specifications==2023.12.1 lightning-utilities==0.11.7 networkx==3.3 olive-ai==0.6.2 opt-einsum==3.3.0 optimum==1.22.0 orjson==3.10.7 pyparsing==3.1.4 python-multipart==0.0.10 pywin32==306 reportlab==4.2.2 rich==13.8.1 ruff==0.6.7 sounddevice==0.5.0 SQLAlchemy==2.0.35 termcolor==2.4.0 timm==1.0.9 tokenizers==0.19.1 torchmetrics==1.4.2 transformers==4.44.2 trimesh==4.4.9 uvicorn==0.30.6 yarl==1.12.1

Here is sysinfo if necessary: new sysinfo from Harbit.txt

And at the end of the installation there was this: Screenshot_1


What if you need to put more than 1024mb gpu weights? By the way, [Low VRAM Warning] appears when I set 1024mb.

TheFerumn commented 2 days ago

What if you need to put more than 1024mb gpu weights? By the way, [Low VRAM Warning] appears when I set 1024mb.

your PC will explode

Cmon. I don't understand such a questions from somebody using AI where everything you do is learning and experimenting with different settings. Just check what will happen and you will know instead of asking. You can always google or use chat GPT to check what each setting do. I don't use it on 4GB GPU. Its more of a FLUX model setting.

Harbitos commented 2 days ago

It happens when you don't have enough memory. What resolution you used ? It shouldn't crash on lower resolutions...

I set the resolution to 512*512, it showed me 7%, but then also press any key to continue... But there were no windows errors.


Cmon. I don't understand such a questions from somebody using AI where everything you do is learning and experimenting with different settings. Just check what will happen and you will know instead of asking. You can always google or use chat GPT to check what each setting do. I don't use it on 4GB GPU. Its more of a FLUX model setting.

okay


I created an issue so that @lshqqytiger would notice this and suggest something.

TheFerumn commented 2 days ago

Ok, to sum all up. You had blue screens while using ZLUDA, you obviously has some memory issues, even games need you to restart your GPU drivers. I told you before to check your GPU temperatures but i guess you ignored it. As far as i see your GPU might be defective or something. Its old hardware anyway. Its really hard to tell whats wrong since you literally tried everything i am using just fine... I am going to be honest. I am shocked you are able to generate 2048 images on this GPU xD What we pushed from it is big enough now its time to upgrade for something better :D

Harbitos commented 2 days ago

you obviously has some memory issues, even games need you to restart your GPU drivers

No! Everything is fine with all modern powerful games! For example: Forza Horizon 5 with medium graphics, Minecraft 1.20.1 with powerful shaders (almost).

You had blue screens while using ZLUDA

And there were no blue screens with ZLUDA!

I told you before to check your GPU temperatures but i guess you ignored it.

The CPU temperature when working SD — 55 degrees. The load of the GPU when working SD — 79 degrees. Yeah, of course I haven't cleaned the PC from dust for a long time, all the coolers are dusty, the table is covered with dust because of the PC, one cooler of the system unit needs to be lubricated, quietly farts.

As far as i see your GPU might be defective or something

I don't know, I don't know, the processor pulls inpaint to 2048 2048. I just have a problem with lora on directml. I can switch to zluda and use inpaint normally, but I can use zluda to make inpaint images up to 1280 1024, if I put more, then there won't be enough memory. Maybe I should try experimenting on zluda again, maybe I can optimize everything there and make pictures of huge resolutions like in directml.


I think nothing has to do with arguments, I wrote --directml --upcast-sampling --opt-sub-quad-attention, also 7% and press any key to continue.

I've decided to check something out here... And I found directml >:) Screenshot_1 Screenshot_3 I looked at the GPT Chat, and I can try to put a 40GB swap file.

Harbitos commented 1 day ago

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEES

Harbitos commented 1 day ago

THE PROBLEM IS SOLVED! I've been suffering for a week!

The solution to the problem is to set the swap file to 40GB. (or more)

I realized this because in the windows log I noticed that python.exe allocates 39GB of memory, so I put 40GB of swap files. Probably the windows swap file could not automatically become very large.

Harbitos commented 1 day ago

Yes but never on such a big resolutions due to 4GB.

@TheFerumn what kind of swap file do you have? I'm just curious. Thank you for taking the time and trying to help me. By the way, take a note to yourself, if someone does not write an error in the console, and writes press any key to continue..., remember about the swap file.

TheFerumn commented 1 day ago

Well. I knew its something wrong with your memory but you said you have free space on your drive and already 20GB allocated for the memory. I assumed you have 20GB min ready to use and some more free space in backup to auto-allocate.

Zrzut ekranu 2024-10-23 143812

This is my settings. Never had issues but i haven't tried to generate in 2048x2048. BTW. You said you tried to generate 512x512 with LORA so i don't understand how you could be out of memory but at the same time be able to generate 2048x2048 without inpainting. Is inpainting really using so much memory ?!?! Well at least we have been able to figure out its not Forge issue but your PCs

Harbitos commented 1 day ago

able to generate 2048x2048 without inpainting

Correction: 2048* 2048 could also do inpaint without Lora. Inpainting with Lora takes up a lot of memory only for me.

I have another problem that has always been there.: After any generation, it shows me, then it doesn't, the finished picture in the interface. That is, the image was generated, saved in the outputs folder, but it is not always displayed here:

I've already tried using ChatGPT, nothing helped. On the Internet, they said Add number to filename when saving is checked. The --no-gradio-queue argument didn't seem to help either.

Or maybe I deleted a couple of files in the outputs folder, and the solution to this problem will just be to wait, generate images several times. Screenshot_1

TheFerumn commented 1 day ago

It sometimes bugs out when you delete images from your output folder. I think it has something to do with the files names. It looses track of which image it should show you.