vladmandic / sd-extension-chainner

SD.Next extension for additional upscalers based on chaiNNer
GNU General Public License v3.0
13 stars 1 forks source link

[Issue]: chaiNNer upscalers give RuntimeWarning and black image #4

Closed ghost closed 11 months ago

ghost commented 1 year ago

Issue Description

Trying to use Second pass with one of the new chaiNNer models, but none of these work. I tried chaiNNer 4x DAT, and this is the error I get. And yes I made a clean git clone and did not just upgrade for the latest big release

Do I have to have chaiNNer (the main program) installed to use these? As "Upscale by" I tried 2x and 4x with 2x and 4x chaiNNer models but this does not seem to influence the error

Version Platform Description

Chrome, Win10 Version: app=sd.next updated=2023-10-21 hash=2f1f9974

Relevant log output

SDnext Version string: Version: app=sd.next updated=2023-10-21 hash=2f1f9974

21:00:20-671520 INFO     Applying free-u: b1=1.2 b2=1.4 s1=0.9 s2=0.2
100%|██████████████████████████████████████████████████████████████████████████████████| 47/47 [00:04<00:00, 11.09it/s]
21:00:27-025563 INFO     Upscaler loaded: type=chaiNNer model='models\chaiNNer\DAT-4x.pth'
Upscaling ---------------------------------------- 100% 0:00:00 0:00:09

P:\vladnew\automatic\extensions-builtin\sd-extension-chainner\scripts\chainner_model.py:107: RuntimeWarning: invalid value encountered in cast
  img = PIL.Image.fromarray(np.uint8(250.0 * upscaled))
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:48<00:00,  2.41s/it]
21:01:38-098563 INFO     Processed: images=1 time=77.42s its=0.61 memory={'ram': {'used': 2.57, 'total': 31.94}, 'gpu':
                         {'used': 12.71, 'total': 23.99}, 'retries': 0, 'oom': 0}

Backend

Original

Model

SD 1.5

Acknowledgements

vladmandic commented 1 year ago
  1. for sd-extension-chainner, please in the future report issues in that repository, not in sdnext (yes, its an extension for sdnext, but still)
  2. no, you don't need chainner installer
  3. run webui --debug and post larger log section.
ghost commented 1 year ago

how do I properly format these logs so it is human-readable here?

add triple-tick before and after log section.

```

vladmandic commented 1 year ago

sorry for editing your answer and deleting log, i meant to reply :( you'll need to post log again.

ghost commented 1 year ago
Using VENV: P:\vladnew\automatic\venv
21:19:26-867751 DEBUG    Logger: file=P:\vladnew\automatic\sdnext.log level=10 size=0 mode=create
21:19:26-873753 INFO     Starting SD.Next
21:19:26-880755 INFO     Python 3.10.6 on Windows
21:19:27-019753 INFO     Version: app=sd.next updated=2023-10-21 hash=2f1f9974
                         url=https://github.com/vladmandic/automatic/tree/master
21:19:27-334895 INFO     Platform: arch=AMD64 cpu=AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD system=Windows
                         release=Windows-10-10.0.19045-SP0 python=3.10.6
21:19:27-338895 DEBUG    Setting environment tuning
21:19:27-340894 DEBUG    Torch overrides: cuda=False rocm=False ipex=False diml=False openvino=False
21:19:27-343895 DEBUG    Torch allowed: cuda=True rocm=True ipex=True diml=True openvino=True
21:19:27-348896 INFO     nVidia CUDA toolkit detected: nvidia-smi present
21:19:27-455895 DEBUG    Repository update time: Sat Oct 21 20:16:16 2023
21:19:27-457895 INFO     Verifying requirements
21:19:27-470894 INFO     Verifying packages
21:19:27-473897 INFO     Verifying repositories
21:19:27-534895 DEBUG    Submodule: P:\vladnew\automatic\repositories\stable-diffusion-stability-ai / main
21:19:28-099020 DEBUG    Submodule: P:\vladnew\automatic\repositories\taming-transformers / master
21:19:29-520374 DEBUG    Submodule: P:\vladnew\automatic\repositories\BLIP / main
21:19:29-979694 INFO     Verifying submodules
21:19:32-252294 DEBUG    Submodule: extensions-builtin/clip-interrogator-ext / main
21:19:32-320295 DEBUG    Submodule: extensions-builtin/sd-extension-chainner / main
21:19:32-389295 DEBUG    Submodule: extensions-builtin/sd-extension-system-info / main
21:19:32-457295 DEBUG    Submodule: extensions-builtin/sd-webui-agent-scheduler / main
21:19:32-526294 DEBUG    Submodule: extensions-builtin/sd-webui-controlnet / main
21:19:32-598294 DEBUG    Submodule: extensions-builtin/stable-diffusion-webui-images-browser / main
21:19:32-664294 DEBUG    Submodule: extensions-builtin/stable-diffusion-webui-rembg / master
21:19:32-730295 DEBUG    Submodule: modules/lora / main
21:19:32-798296 DEBUG    Submodule: wiki / master
21:19:32-969297 DEBUG    Installed packages: 217
21:19:32-971296 DEBUG    Extensions all: ['clip-interrogator-ext', 'Lora', 'sd-extension-chainner',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg']
21:19:32-974294 DEBUG    Running extension installer:
                         P:\vladnew\automatic\extensions-builtin\clip-interrogator-ext\install.py
21:19:39-466351 DEBUG    Running extension installer:
                         P:\vladnew\automatic\extensions-builtin\sd-extension-system-info\install.py
21:19:39-904019 DEBUG    Running extension installer:
                         P:\vladnew\automatic\extensions-builtin\sd-webui-agent-scheduler\install.py
21:19:40-335031 DEBUG    Running extension installer:
                         P:\vladnew\automatic\extensions-builtin\sd-webui-controlnet\install.py
21:19:40-770342 DEBUG    Running extension installer:
                         P:\vladnew\automatic\extensions-builtin\stable-diffusion-webui-images-browser\install.py
21:19:41-201381 DEBUG    Running extension installer:
                         P:\vladnew\automatic\extensions-builtin\stable-diffusion-webui-rembg\install.py
21:19:41-633728 DEBUG    Extensions all: ['sd-webui-supermerger', 'sd_webui_SAG']
21:19:41-635729 DEBUG    Running extension installer: P:\vladnew\automatic\extensions\sd-webui-supermerger\install.py
21:19:44-145820 INFO     Extensions enabled: ['clip-interrogator-ext', 'Lora', 'sd-extension-chainner',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg',
                         'sd-webui-supermerger', 'sd_webui_SAG']
21:19:44-150819 INFO     Verifying requirements
21:19:44-163820 DEBUG    Setup complete without errors: 1697915984
21:19:44-169809 INFO     Extension preload: {'extensions-builtin': 0.0, 'extensions': 0.0}
21:19:44-171819 DEBUG    Starting module: <module 'webui' from 'P:\\vladnew\\automatic\\webui.py'>
21:19:44-174819 INFO     Command line args: ['--debug'] debug=True
21:19:50-299260 DEBUG    Loaded packages: torch=2.1.0+cu121 diffusers=0.21.4 gradio=3.43.2
21:19:50-940590 DEBUG    Reading: config.json len=26
21:19:50-943589 INFO     Engine: backend=Backend.ORIGINAL compute=cuda mode=no_grad device=cuda
                         cross-optimization="Scaled-Dot-Product"
21:19:50-992589 INFO     Device: device=NVIDIA GeForce RTX 4090 n=1 arch=sm_90 cap=(8, 9) cuda=12.1 cudnn=8801
                         driver=531.79
21:19:51-617121 DEBUG    Entering start sequence
21:19:51-621121 DEBUG    Initializing
21:19:51-624122 INFO     Available VAEs: models\VAE items=1
21:19:51-627120 DEBUG    Reading: cache.json len=2
21:19:51-630121 DEBUG    Reading: metadata.json len=64
21:19:51-633121 INFO     Available models: P:\SD_model_safe items=24 time=0.01s
21:19:51-837179 DEBUG    Loading extensions
21:19:51-854179 INFO     Extension: script='scripts\xyz_grid.py' HERE ['UniPC', 'DDIM', 'PLMS', 'Euler', 'Euler a',
                         'Heun', 'LMS', 'DPM Adaptive', 'DPM Fast', 'DPM2', 'DPM2 a', 'DPM++ 2M', 'DPM++ 2M SDE',
                         'DPM++ 2M SDE Heun', 'DPM++ 2S a', 'DPM++ SDE', 'DPM++ 3M SDE']
21:19:53-983044 INFO     Extension: script='extensions-builtin\sd-webui-controlnet\scripts\controlnet.py' Warning:
                         ControlNet failed to load SGM - will use LDM instead.
21:19:53-986045 INFO     Extension: script='extensions-builtin\sd-webui-controlnet\scripts\controlnet.py' ControlNet
                         preprocessor location:
                         P:\vladnew\automatic\extensions-builtin\sd-webui-controlnet\annotator\downloads
21:19:53-996032 INFO     Extension: script='extensions-builtin\sd-webui-controlnet\scripts\hook.py' Warning: ControlNet
                         failed to load SGM - will use LDM instead.
21:19:54-984016 INFO     Extensions time: 3.14s { clip-interrogator-ext=0.86s Lora=0.20s sd-extension-chainner=0.09s
                         sd-webui-agent-scheduler=0.38s sd-webui-controlnet=0.57s
                         stable-diffusion-webui-images-browser=0.10s stable-diffusion-webui-rembg=0.63s
                         sd-webui-supermerger=0.24s }
21:19:55-101017 DEBUG    Reading: html/upscalers.json len=4
21:19:55-106015 DEBUG    Loaded upscalers: total=41 downloaded=4 user=0 ['None', 'Lanczos', 'Nearest', 'ChaiNNer',
                         'ESRGAN', 'LDSR', 'RealESRGAN', 'SCUNet', 'SD', 'SwinIR']
21:19:55-115016 DEBUG    Loaded styles: folder=models\styles items=288
21:19:55-120016 DEBUG    Creating UI
21:19:55-205407 INFO     Loading UI theme: name=black-teal style=Auto base=style.css
21:19:55-269398 DEBUG    Extra networks: page='model' items=24 subdirs=2 tab=txt2img dirs=['P:\\SD_model_safe',
                         'models\\Diffusers', 'P:\\vladnew\\automatic\\models\\Stable-diffusion'] time=0.02s
21:19:55-287397 DEBUG    Extra networks: page='style' items=288 subdirs=2 tab=txt2img dirs=['models\\styles', 'html']
                         time=0.0s
21:19:55-292257 DEBUG    Extra networks: page='embedding' items=0 subdirs=0 tab=txt2img dirs=['models\\embeddings']
                         time=0.0s
21:19:55-296256 DEBUG    Extra networks: page='hypernetwork' items=0 subdirs=0 tab=txt2img
                         dirs=['models\\hypernetworks'] time=0.0s
21:19:55-300246 DEBUG    Extra networks: page='vae' items=1 subdirs=0 tab=txt2img dirs=['models\\VAE'] time=0.0s
21:19:55-304247 DEBUG    FS walk error: [WinError 3] The system cannot find the path specified:
                         'P:\\vladnew\\automatic\\models\\LyCORIS' P:\vladnew\automatic\models\LyCORIS
21:19:55-309245 DEBUG    Extra networks: page='lora' items=39 subdirs=1 tab=txt2img dirs=['models\\Lora',
                         'models\\LyCORIS'] time=0.02s
21:19:55-539259 DEBUG    Reading: ui-config.json len=13
21:19:55-618251 DEBUG    Themes: builtin=6 default=5 external=55
21:19:56-205258 DEBUG    Script: 0.51s ui_tabs
                         P:\vladnew\automatic\extensions-builtin\stable-diffusion-webui-images-browser\scripts\image_br
                         owser.py
21:19:56-261258 DEBUG    Reading: P:\vladnew\automatic\html\extensions.json len=308
21:19:57-173245 DEBUG    Extension list: processed=293 installed=10 enabled=10 disabled=0 visible=293 hidden=0
21:19:57-523382 INFO     Local URL: http://127.0.0.1:7860/
21:19:57-525393 DEBUG    Gradio registered functions: 2120
21:19:57-527394 INFO     Initializing middleware
21:19:57-531394 DEBUG    Creating API
21:19:57-732393 INFO     [AgentScheduler] Task queue is empty
21:19:57-733393 INFO     [AgentScheduler] Registering APIs
21:19:58-166381 DEBUG    Script: 0.3s app_started
                         P:\vladnew\automatic\extensions-builtin\sd-webui-agent-scheduler\scripts\task_scheduler.py
21:19:58-169381 DEBUG    Scripts setup: ['X/Y/Z Grid:0.007s', 'ControlNet:0.066s']
21:19:58-170384 DEBUG    Model metadata: metadata.json no changes
21:19:58-173382 INFO     Select: model="analogMadness_v40 [0b914c246e]"
21:19:58-176382 DEBUG    Load model weights: existing=False target=P:\SD_model_safe\analogMadness_v40.safetensors
                         info=None
Loading weights: P:\SD_model_safe\analogMadness_v40.safetensors ------------------------------------ 0.0/2.1 GB -:--:--
21:19:58-210748 DEBUG    Load model: name=P:\SD_model_safe\analogMadness_v40.safetensors dict=True
21:19:58-251774 DEBUG    Desired Torch parameters: dtype=FP16 no-half=False no-half-vae=False upscast=False
21:19:58-255098 INFO     Setting Torch parameters: device=cuda dtype=torch.float16 vae=torch.float16 unet=torch.float16
                         context=no_grad fp16=True bf16=False
21:19:58-259098 DEBUG    Model dict loaded: {'ram': {'used': 1.1, 'total': 31.94}, 'gpu': {'used': 1.58, 'total':
                         23.99}, 'retries': 0, 'oom': 0}
21:19:58-275095 DEBUG    Model config loaded: {'ram': {'used': 1.1, 'total': 31.94}, 'gpu': {'used': 1.58, 'total':
                         23.99}, 'retries': 0, 'oom': 0}
21:19:58-704095 INFO     LDM: LatentDiffusion: Running in eps-prediction mode
21:19:58-706095 INFO     LDM: DiffusionWrapper has 859.52 M params.
21:19:58-708096 DEBUG    Model created from config: P:\vladnew\automatic\configs\v1-inference.yaml
21:19:58-709096 INFO     Autodetect: model="Stable Diffusion" class=StableDiffusionPipeline
                         file="P:\SD_model_safe\analogMadness_v40.safetensors" size=2034MB
21:19:58-712095 DEBUG    Model weights loading: {'ram': {'used': 2.06, 'total': 31.94}, 'gpu': {'used': 1.58, 'total':
                         23.99}, 'retries': 0, 'oom': 0}
21:19:59-669094 DEBUG    Model weights loaded: {'ram': {'used': 7.34, 'total': 31.94}, 'gpu': {'used': 1.58, 'total':
                         23.99}, 'retries': 0, 'oom': 0}
21:20:00-320095 DEBUG    Model weights moved: {'ram': {'used': 6.94, 'total': 31.94}, 'gpu': {'used': 3.61, 'total':
                         23.99}, 'retries': 0, 'oom': 0}
21:20:00-330095 INFO     Cross-attention: optimization=Scaled-Dot-Product options=[]
21:20:00-552097 INFO     Loaded embeddings: loaded=0 skipped=0 time=0.22s
21:20:00-558095 INFO     Model loaded in 2.38s { config=0.06s create=0.43s apply=0.66s vae=0.29s move=0.65s
                         embeddings=0.22s }
21:20:00-802097 DEBUG    gc: collected=2787 device=cuda {'ram': {'used': 7.0, 'total': 31.94}, 'gpu': {'used': 3.61,
                         'total': 23.99}, 'retries': 0, 'oom': 0}
21:20:00-807095 INFO     Model load finished: {'ram': {'used': 7.0, 'total': 31.94}, 'gpu': {'used': 3.61, 'total':
                         23.99}, 'retries': 0, 'oom': 0} cached=0
21:20:00-904094 DEBUG    Saving: config.json len=1050
21:20:00-906097 INFO     Startup time: 16.73s { torch=5.51s gradio=0.57s libraries=1.32s extensions=3.14s
                         face-restore=0.20s upscalers=0.13s ui-extra-networks=0.19s ui-txt2img=0.07s ui-img2img=0.10s
                         ui-settings=0.14s ui-extensions=1.52s ui-defaults=0.07s launch=0.27s api=0.09s
                         app-started=0.55s checkpoint=2.73s }
21:21:59-613080 DEBUG    Server alive=True jobs=1 requests=3 uptime=129s memory used=2.15 total=31.94 idle
vladmandic commented 1 year ago

this log is just server startup - i need log that shows chainner behavior.

ghost commented 1 year ago
23:03:26-842944 DEBUG    txt2img: id_task=task(kv4h2of2ur6k10t)|prompt=wonderful landscape
                         <lora:newstyle:1.0>|negative_prompt=ugly, strange, weird, bizarre, jpeg-artifacts,
                         glitch,
                         distortion|prompt_styles=[]|steps=47|sampler_index=16|latent_index=16|full_quality=True|restor
                         e_faces=False|tiling=False|n_iter=1|batch_size=1|cfg_scale=1.5|clip_skip=3|seed=-1.0|subseed=-
                         1.0|subseed_strength=0.1|seed_resize_from_h=0|seed_resize_from_w=0||height=704|width=640|enabl
                         e_hr=True|denoising_strength=0.34|hr_scale=2|hr_upscaler=chaiNNer 2x
                         HAT|hr_force=True|hr_second_pass_steps=20|hr_resize_x=0|hr_resize_y=0|image_cfg_scale=6|diffus
                         ers_guidance_rescale=0.7|refiner_steps=5|refiner_start=0.8|refiner_prompt=|refiner_negative=|o
                         verride_settings_texts=[]
23:03:26-859945 INFO     Applying free-u: b1=1.2 b2=1.4 s1=0.9 s2=0.2
Loading weights: models\Lora\newstyle.safetensors --------------------------------------- 0.0/302.2 MB -:--:--
23:03:28-023488 INFO     Applying LoRA: ['newstyle'] patch=0.00s load=1.13s
23:03:28-478827 DEBUG    Sampler: sampler=DPM++ 3M SDE config={'discard_next_to_last_sigma': True, 'scheduler':
                         'polyexponential', 'brownian_noise': False}
  0%|                                                                                           | 0/47 [00:00<?, ?it/s]23:03:31-524265 DEBUG    Script: 0.71s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 13%|██████████▌                                                                        | 6/47 [00:03<00:12,  3.26it/s]23:03:32-432116 DEBUG    Script: 0.11s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
100%|██████████████████████████████████████████████████████████████████████████████████| 47/47 [00:09<00:00,  5.17it/s]
23:03:37-635134 DEBUG    Init hires: upscaler="chaiNNer 2x HAT" sampler="DPM++ 3M SDE" resize=0x0 upscale=1280x1408
23:03:38-964665 INFO     Upscaler loaded: type=chaiNNer model='models\chaiNNer\HAT-2x.pth'
Upscaling ---------------------------------------- 100% 0:00:00 0:00:03

P:\vladnew\automatic\extensions-builtin\sd-extension-chainner\scripts\chainner_model.py:107: RuntimeWarning: invalid value encountered in cast
  img = PIL.Image.fromarray(np.uint8(250.0 * upscaled))
23:03:44-271767 DEBUG    Sampler: sampler=DPM++ 3M SDE config={'discard_next_to_last_sigma': True, 'scheduler':
                         'polyexponential', 'brownian_noise': False}
  0%|                                                                                           | 0/20 [00:00<?, ?it/s]23:03:46-494848 DEBUG    Script: 0.88s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
  5%|████▏                                                                              | 1/20 [00:02<00:42,  2.22s/it]23:03:46-955850 DEBUG    Script: 0.24s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 10%|████████▎                                                                          | 2/20 [00:02<00:21,  1.22s/it]23:03:47-633996 DEBUG    Script: 0.34s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 15%|████████████▍                                                                      | 3/20 [00:03<00:16,  1.03it/s]23:03:48-191242 DEBUG    Script: 0.29s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 20%|████████████████▌                                                                  | 4/20 [00:03<00:12,  1.24it/s]23:03:48-694669 DEBUG    Script: 0.24s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 25%|████████████████████▊                                                              | 5/20 [00:04<00:10,  1.40it/s]23:03:49-247190 DEBUG    Script: 0.24s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 30%|████████████████████████▉                                                          | 6/20 [00:05<00:09,  1.55it/s]23:03:49-809231 DEBUG    Script: 0.24s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 35%|█████████████████████████████                                                      | 7/20 [00:05<00:08,  1.62it/s]23:03:50-358238 DEBUG    Script: 0.23s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 40%|█████████████████████████████████▏                                                 | 8/20 [00:06<00:07,  1.68it/s]23:03:50-919606 DEBUG    Script: 0.25s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 45%|█████████████████████████████████████▎                                             | 9/20 [00:06<00:06,  1.71it/s]23:03:51-472603 DEBUG    Script: 0.23s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 50%|█████████████████████████████████████████                                         | 10/20 [00:07<00:05,  1.74it/s]23:03:52-028022 DEBUG    Script: 0.29s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 55%|█████████████████████████████████████████████                                     | 11/20 [00:07<00:05,  1.76it/s]23:03:52-585028 DEBUG    Script: 0.29s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 60%|█████████████████████████████████████████████████▏                                | 12/20 [00:08<00:04,  1.77it/s]23:03:53-139031 DEBUG    Script: 0.29s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 65%|█████████████████████████████████████████████████████▎                            | 13/20 [00:08<00:03,  1.78it/s]23:03:53-703612 DEBUG    Script: 0.3s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 70%|█████████████████████████████████████████████████████████▍                        | 14/20 [00:09<00:03,  1.78it/s]23:03:54-295638 DEBUG    Script: 0.33s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 75%|█████████████████████████████████████████████████████████████▌                    | 15/20 [00:10<00:02,  1.78it/s]23:03:54-769783 DEBUG    Script: 0.25s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 80%|█████████████████████████████████████████████████████████████████▌                | 16/20 [00:10<00:02,  1.79it/s]23:03:55-321862 DEBUG    Script: 0.24s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 85%|█████████████████████████████████████████████████████████████████████▋            | 17/20 [00:11<00:01,  1.84it/s]23:03:55-881603 DEBUG    Script: 0.24s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 90%|█████████████████████████████████████████████████████████████████████████▊        | 18/20 [00:11<00:01,  1.82it/s]23:03:56-440604 DEBUG    Script: 0.24s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
 95%|█████████████████████████████████████████████████████████████████████████████▉    | 19/20 [00:12<00:00,  1.82it/s]23:03:56-989509 DEBUG    Script: 0.24s cfg_denoised P:\vladnew\automatic\extensions\sd_webui_SAG\scripts\SAG.py
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:12<00:00,  1.57it/s]
23:03:59-550952 DEBUG    Saving: image="outputs\text\00000--.png" type=PNG size=1280x1408
23:04:00-032953 DEBUG    Server alive=True jobs=1 requests=66 uptime=56s memory used=4.29 total=31.94 idle
23:04:00-044958 INFO     Processed: images=1 time=33.15s its=1.42 memory={'ram': {'used': 4.24, 'total': 31.94}, 'gpu':
                         {'used': 5.28, 'total': 23.99}, 'retries': 0, 'oom': 0}

It does not matter if I deactivate SAG or Free-U, it always happens. The RuntimeWarning only comes for the first image, then it does not return (but the images are still black when it comes to the upscale step)

vladmandic commented 1 year ago

as a test, can you try just try to generate image without upscale/hires and then upscale it using that same upscaler in process tab? just trying to narrow things down as i cannot reproduce.

btw, your chainner extension is not the newest although that should not matter directly. but still would be best to rule it out and upgrade it.

ghost commented 1 year ago

Annotation 2023-10-21 235521

yes the processing tab indeed works, tried the 2x HAT model. but it is kind of artifacted. no error message or anything

the extension tab does not show me the option to update (no buttons). should I delete the extension and git clone in extension-builtin, or clone in extensions-builtin/subfolder?

vladmandic commented 1 year ago

you can just go to extension folder and run git pull

ghost commented 1 year ago

Did not help unfortunately

vladmandic commented 1 year ago

i didn't expect it would, i was just noticing that extension was a touch older. what's really strange is that using chainner for you:

but those two are exactly the same thing i've tried and i cannot reproduce.

ghost commented 1 year ago

I will make another clean install, and I will test my setup without bringing my old config.json into the mix, maybe something there might be the problem (I also use "Set new defaults" for ui-config.json a lot, this might have caused a problem somewhere)

I will report back if that solves it

ghost commented 1 year ago

I tried a fresh install of both master and dev branch, and immediately tried chaiNNer without even touching the config. It is almost the same error message, I guess there was some code change but it is the same bug. I also tried using a different browser just in case some browser plugin messes up the ui, but it did not matter.

I suspect there is something wrong with my python installation in general, I can't install kohya-ss for example it tells me some Accelerate package is not the right version or something, although it should not matter

I will attempt to either... clean up my python mess (I do not even know what to look for) or format my system and try again

vladmandic commented 1 year ago

"its almost the same" is not something i can work with. so for every case of black image during upscale please post:

ghost commented 11 months ago

This problem went away, here is what made it go away:

I installed some gigantic workflow in ComfyUI, but it bugged after the install. Then I thought oh well lets just use SDNext, but it said pip was missing suddenly. I knew this problem so I followed this advice with ensurepip and I upgraded it in admin powershell. https://stackoverflow.com/questions/61561218/modulenotfounderror-no-module-named-pip-on-windows

I load up SDNext, try the chaiNNer upscalers and they suddenly work in txt2img. Problem solved