AbdullahAlfaraj / AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin

OSError: cannot write mode RGBA as JPEG

Offen
#302 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
7.3k
Forks
526
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

There are a couple "outpainting is not working" issues but none of them is related in my case I guess. Below is the output of the error I'm getting and some screenshots, and interestingly, when I check "Live Progress Image" I am able to see the progress. What could be the problem?

As can be seen in the img, process is visible,
![image](https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin/assets/65521426/d02fc620-b59f-432f-9fdd-7b033230ee30)

But cant get the final result.
```
successful mask expansion operation
100%|███████████████████████████████████████████| 20/20 [00:02<00:00, 7.39it/s]
21:16:52-187116 ERROR API error: POST:
http://35.90.38.182:7860/sdapi/v1/img2img {'error':
'OSError', 'detail': '', 'body': '', 'errors': 'cannot
write mode RGBA as JPEG'}
21:16:52-188514 ERROR HTTP API: OSError
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/ubuntu/vlad-webui/venv/lib/python3.10/site-packages/PIL/JpegImagePlugi │
│ n.py:643 in _save │
│ │
│ 642 │ try: │
│ ❱ 643 │ │ rawmode = RAWMODE[im.mode] │
│ 644 │ except KeyError as e: │
╰──────────────────────────────────────────────────────────────────────────────╯
KeyError: 'RGBA'

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

╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/ubuntu/vlad-webui/modules/middleware.py:72 in exception_handling │
│ │
│ 71 │ │ try: │
│ ❱ 72 │ │ │ return await call_next(req) │
│ 73 │ │ except CancelledError: │
│ │
│ /home/ubuntu/vlad-webui/venv/lib/python3.10/site-packages/starlette/middlewa │
│ re/base.py:84 in call_next │
│ │
│ ... 22 frames hidden ... │
│ │
│ /home/ubuntu/vlad-webui/venv/lib/python3.10/site-packages/PIL/Image.py:2431 │
│ in save │
│ │
│ 2430 │ │ try: │
│ ❱ 2431 │ │ │ save_handler(self, fp, filename) │
│ 2432 │ │ except Exception: │
│ │
│ /home/ubuntu/vlad-webui/venv/lib/python3.10/site-packages/PIL/JpegImagePlugi │
│ n.py:646 in _save │
│ │
│ 645 │ │ msg = f"cannot write mode {im.mode} as JPEG" │
│ ❱ 646 │ │ raise OSError(msg) from e │
│ 647 │
╰──────────────────────────────────────────────────────────────────────────────╯
OSError: cannot write mode RGBA as JPEG
```

I use vlads fork, here is the startup log, yes there is an error but it is not related.
```
(vlad2) ubuntu@ip-172-31-37-133:~/vlad-webui$ bash webui.sh
Create and activate python venv
Launching launch.py...
21:22:40-697109 INFO Running extension preloading
21:22:40-702044 INFO Starting SD.Next
21:22:40-702897 INFO Python 3.10.11 on Linux
21:22:40-710296 INFO Version: 8f4bc4df0 Wed May 31 12:44:35 2023 -0400
21:22:40-936311 INFO Latest published version:
82095082aff76466234b3e433c06bd5ea5d2422e
2023-06-06T19:32:22Z
21:22:40-937465 INFO Setting environment tuning
21:22:40-938376 INFO nVidia CUDA toolkit detected
21:22:42-125286 INFO Torch 2.0.1+cu118
21:22:42-195044 INFO Torch backend: nVidia CUDA 11.8 cuDNN 8700
21:22:42-210032 INFO Torch detected GPU: NVIDIA A10G VRAM 22581 Arch (8, 6)
Cores 80
21:22:42-211645 INFO Verifying requirements
21:22:42-228699 INFO Installing packages
21:22:42-240405 INFO No changes detected: Quick launch active
21:22:42-241279 INFO Running extension preloading
21:22:42-241988 INFO Server arguments: ['--insecure', '--data-dir',
'/home/ubuntu/stable-diffusion-webui/', '--listen',
'--theme', 'dark', '--disable-safe-unpickle',
'--cors-origins', 'http://localhost:9999',
'--cors-origins', 'https://www.painthua.com']
No module 'xformers'. Proceeding without it.
21:22:46-643209 INFO Libraries loaded
21:22:46-646696 INFO Using data path: /home/ubuntu/stable-diffusion-webui/
21:22:46-653167 INFO Available VAEs:
/home/ubuntu/stable-diffusion-webui/models/VAE 5
21:22:46-654198 INFO Skipping conflicting extension:
/home/ubuntu/stable-diffusion-webui/extensions/clip-int
errogator-ext
21:22:46-655100 INFO Skipping conflicting extension:
/home/ubuntu/stable-diffusion-webui/extensions/multidif
fusion-upscaler-for-automatic1111
21:22:46-655981 INFO Skipping conflicting extension:
/home/ubuntu/stable-diffusion-webui/extensions/sd-webui
-controlnet
21:22:46-656814 INFO Skipping conflicting extension:
/home/ubuntu/stable-diffusion-webui/extensions/stable-d
iffusion-webui-images-browser
21:22:46-958639 INFO Available models:
/home/ubuntu/stable-diffusion-webui/models/Stable-diffu
sion 150
2023-06-06 21:22:48,273 - ControlNet - INFO - ControlNet v1.1.219
ControlNet preprocessor location: /home/ubuntu/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator
2023-06-06 21:22:48,433 - ControlNet - INFO - ControlNet v1.1.219
[-] ADetailer initialized. version: 23.6.2, num models: 8
python_server_full_path: /home/ubuntu/stable-diffusion-webui/extensions/Auto-Photoshop-StableDiffusion-Plugin/server/python_server
21:22:49-812299 INFO Libraries loaded
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: /home/ubuntu/stable-diffusion-webui/extensions/Stable-Diffusion-Webui-Civitai-Helper/setting.json
Civitai Helper: No setting file, use default
21:22:50-769041 ERROR Module load:
/home/ubuntu/stable-diffusion-webui/extensions/stable-d
iffusion-webui-depthmap-script/scripts/depthmap.py:
ModuleNotFoundError
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/ubuntu/vlad-webui/modules/script_loading.py:13 in load_module │
│ │
│ 12 │ try: │
│ ❱ 13 │ │ module_spec.loader.exec_module(module) │
│ 14 │ except Exception as e: │
│ in exec_module:883 │
│ in _call_with_frames_removed:241 │
│ │
│ /home/ubuntu/stable-diffusion-webui/extensions/stable-diffusion-webui-depthm │
│ ap-script/scripts/depthmap.py:42 in │
│ │
│ 41 │
│ ❱ 42 from stereoimage_generation import create_stereoimages │
│ 43 │
╰──────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'stereoimage_generation'
21:22:50-964348 INFO Loading UI theme: name=gradio/monochrome style=Auto
LAB
*Deforum ControlNet support: enabled*
21:22:53-101172 INFO Setting Torch parameters: dtype=torch.float16
vae=torch.float16 unet=torch.float16
Loading weights: /home/ubuntu/stable-diffusion-webui/models/Stable-diffusion/_…
LatentInpaintDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.54 M params.
21:22:53-674830 INFO Model created from config:
/home/ubuntu/vlad-webui/configs/v1-inpainting-inference
.yaml
Loading weights: /home/ubuntu/stable-diffusion-webui/models/VAE/vae-ft-mse-840…
21:22:56-297741 INFO Applying scaled dot product cross attention
optimization
21:22:56-352921 INFO Embeddings loaded: 38 ['0lg4kury', 'anime512',
'AS-Young', 'AS-Young-neg', 'AS-Younger',
'AshleyCipher', 'Asian-Less', 'Asian-Less-Neg',
'Asian-Less-Toon', 'atompunkstylesd15', 'awful512',
'bad-hands-5', 'beauty512', 'CeceGiacinti',
'cherrynobodysd15', 'DaphneDimakos',
'dollienobodysd15', 'EasyNegative', 'eonn',
'evelynnobodysd15', 'flower_style', 'jane_noexist',
'kristennobodysd15', 'LulaCipher', 'nbdy-celeste-sd15',
'nbdy-scarlet-sd15', 'Neg512-neg', 'neg_anime512',
'neg_facelift512', 'neg_hands512-neg',
'neg_realism512', 'No512-neg', 'Portrait512',
'realisticvision-negative-embedding', 'render512',
'selfie512', 'StacyHiggins', 'VeronicaCipher']
21:22:56-361394 INFO Model loaded in 3.3s (load=0.2s create=0.4s apply=0.5s
vae=1.9s move=0.2s embeddings=0.1s)
21:22:56-667742 INFO Model load finished: {'ram': {'used': 13.07, 'total':
31.01}, 'gpu': {'used': 2.32, 'total': 22.05},
'retries': 0, 'oom': 0}
Running on local URL: http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
21:22:57-299710 INFO Local URL: http://localhost:7860/
21:22:57-300798 INFO API Docs: http://localhost:7860/docs
21:22:57-301519 INFO Initializing middleware
21:22:58-035420 INFO Startup time: 15.8s (torch=2.4s gradio=1.4s
libraries=0.5s models=0.3s scripts=3.9s onchange=0.1s
ui=6.0s launch=0.3s scripts app_started_callback=0.1s
checkpoint=0.7s)

```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.