Open crusader290 opened 6 months ago
i cannot reproduce anyone else has this problem?
Upscale script freed memory successfully.
Downloading: "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth" to C:\StableDiffusionForge\webui\models\RealESRGAN\RealESRGAN_x4plus_anime_6B.pth
100%|███████████████████████████████████████████████████████████| 17.1M/17.1M [00:01<00:00, 10.5MB/s]
tiled upscale: 0%| | 0/15 [00:00<?, ?it/s]C:\StableDiffusionForge\webui\modules\upscaler_utils.py:33: RuntimeWarning: invalid value encountered in cast
arr = arr.round().astype(np.uint8)
tiled upscale: 100%|█████████████████████████████████████████████████| 15/15 [00:11<00:00, 1.30it/s]
Upscale script freed memory successfully.
Downloading: "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth" to C:\StableDiffusionForge\webui\models\RealESRGAN\RealESRGAN_x4plus.pth
100%|███████████████████████████████████████████████████████████| 63.9M/63.9M [00:04<00:00, 13.7MB/s]
tiled upscale: 0%| | 0/15 [00:00<?, ?it/s]C:\StableDiffusionForge\webui\modules\upscaler_utils.py:33: RuntimeWarning: invalid value encountered in cast
arr = arr.round().astype(np.uint8)
tiled upscale: 100%|█████████████████████████████████████████████████| 15/15 [00:36<00:00, `2.45s/it]
Every other upscaling model works fine even ESGRAN_4x.
But when I try to use RealESGRAN models I get
C:\StableDiffusionForge\webui\modules\upscaler_utils.py:33: RuntimeWarning: invalid value encountered in cast
arr = arr.round().astype(np.uint8)
the codes for RealESGRAN are exactly same with Automatic1111 maybe you will have same problem with webui dev branch
the codes for RealESGRAN are exactly same with Automatic1111 maybe you will have same problem with webui dev branch
It's strange because I don't get this problem with Automatic1111
the codes for RealESGRAN are exactly same with Automatic1111 maybe you will have same problem with webui dev branch
It's strange because I don't get this problem with Automatic1111
is your original webui on dev branch or master branch? if webui master branch does not have this problem but webui dev branch has it then it can be reported to webui
the codes for RealESGRAN are exactly same with Automatic1111 maybe you will have same problem with webui dev branch
It's strange because I don't get this problem with Automatic1111
is your original webui on dev branch or master branch? if webui master branch does not have this problem but webui dev branch has it then it can be reported to webui
I think it's on master branch.
I have the same problem with RealESRGAN_x4plus and RealESRGAN_x4plus_anime_6B. The image is completely black. Everything worked on Automatic1111.
I have the same problem with RealESRGAN_x4plus and RealESRGAN_x4plus_anime_6B. The image is completely black. Everything worked on Automatic1111.
Glad to know it's not just me.
@Zerg17 @crusader290 can someone test with original webui dev branch and see if this is related to forge
@lllyasviel I tried https://github.com/AUTOMATIC1111/stable-diffusion-webui , RealESRGAN_x4plus and RealESRGAN_x4plus_anime_6B. Both options work.
@lllyasviel a message is displayed at startup
:\programs\webui_forge_cu121_torch21\webui\modules\upscaler_utils.py:33: RuntimeWarning: invalid value encountered in cast
arr = arr.round().astype(np.uint8)
I also encountered the same problem The following error content: :\webui_forge_cu121_torch21\webui\modules\upscaler_utils.py:33: RuntimeWarning: invalid value encountered in cast arr = arr.round().astype(np.uint8) [-] ADetailer: img2img inpainting detected. adetailer disabled. ** Error running process: D:\webui_forge_cu121_torch21\webui\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py Traceback (most recent call last): File "D:\webui_forge_cu121_torch21\webui\modules\scripts.py", line 803, in process script.process(p, script_args) File "D:\webui_forge_cu121_torch21\webui\extensions\sd-dynamic-prompts\sd_dynamic_prompts\dynamic_prompting.py", line 481, in process all_prompts, all_negative_prompts = generate_prompts( File "D:\webui_forge_cu121_torch21\webui\extensions\sd-dynamic-prompts\sd_dynamic_prompts\helpers.py", line 93, in generate_prompts all_prompts = prompt_generator.generate(prompt, num_prompts, seeds=seeds) or [""] File "D:\webui_forge_cu121_torch21\system\python\lib\site-packages\dynamicprompts\generators\randomprompt.py", line 71, in generate prompts.append(str(next(iter(gen)))) StopIteration
UPDATE:
I found the custom function name I used call _postprocess_image
will make the next generator job's sampler fail. And I change the name to another, it work fine. 🧐🧐🧐
BUT, WHY?
I've done a lot of testing for this, mostly rewriting the ADetailer extension. A very strange situation, after getting the last image, the two models mediapipe
and ultralytics
target face detection, and using ultralytics
causes an anomaly.
The flow I do the test,
postprocess_image
to get the StableDiffusionProcessing
and PostprocessImageArgs
.ultralytics (YOLO model)
to predict the masks.StableDiffusionProcessingImg2Img
and add the masks.x_sample = x_sample.astype(np.uint8)
in modules/processing.py:973
I follow the source code and I found the second time I hit the generate, in the source of the KDiffusionSampler.sample
will return the empty tensor.
AND, when I use the mediapipe
model in the step 2, and all work fine.
I have no idea about this.
I have the same problem.
I also have the same problem. Has anyone found the cause of the problem or a solution after the past three months? I'm going to try to reproduce this problem on my other devices.
On another device, I didn't find this problem.
I guess this problem may be related to the graphics card model of the device. The device I used before used a GTX1660s graphics card. In Automatic1111, I need to append the --no-half
parameter, while this is not necessary in the forge version. Could this possibly have caused this problem?
Since I cannot currently use the device where I previously discovered this problem to verify this guess, I can only hope to give some inspiration to the experts who are trying to solve this problem.
On another device, I didn't find this problem. I guess this problem may be related to the graphics card model of the device. The device I used before used a GTX1660s graphics card. In Automatic1111, I need to append the
--no-half
parameter, while this is not necessary in the forge version. Could this possibly have caused this problem? Since I cannot currently use the device where I previously discovered this problem to verify this guess, I can only hope to give some inspiration to the experts who are trying to solve this problem.
I think you're right. I used the same parameters on automatic1111's. And am using a GTX 1660 Super. Will add the parameter and test it out.
Added the "--no-half --no-half-vae" arguments and can confirm it is now working!
Is there an existing issue for this?
What would your feature do ?
Allow us to use RealESGRAN models for Hires. fix and Upscaling.
Proposed workflow
Additional information
No response