Interpause/auto-sd-krita

creates empty layer in krita, but the api server calculates img

Closed this issue · 36 comments

Describe the bug
a blank image with transparent mask is always created in krita without any other errors

To Reproduce
Steps to reproduce the behavior:

  1. clone auto sd
  2. put model 1.5 cpkt in the right folder and install it succesfully
  3. install krita plugin part with moving the plugin directory into py krita folder
  4. start generating with prompt in krita 5.1.1, everything works even the api server is calculating something without errors, except the empty layer created in every mode imgtoimg,txttoimg etc in krita

Expected behavior
it should create a layer with content not empty

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser gxopera
  • Commit revision e4010fc
  • Does this issue occur with older models other than SD v1.5?
  • What does the status bar (above the tabs) say?
  • what is the API server console output? (screenshot will do)
  • Do you have a selection rectangle on the Krita canvas? (No selection will generate an image for the whole canvas, selecting a region will generate within that region, and if you happen to select a 1x1 rectangle, it might appear as if nothing was added)
  • Are you using local or remote backend?

I haven't managed to reproduce this issue yet.

first of all thanks for all the time you put into this :)
yes, with model 1.4 its the same
no errors in the console, everything seems normal, it even generates the images, but they are somehow not passed on to krita in the right way i think.
the status bar in krita in the plugintab gives no error, it just creates an empty layer with a transparencymask

The console output contains information about the config used, the image resolution sent etc that can help me figure out what is going on. Try it with another prompt first (if what you are using is sensitive for you) and send me that output.

E:\000aistablediff\kritasd\auto-sd-krita>git pull
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 18 (delta 10), reused 13 (delta 10), pack-reused 0
Unpacking objects: 100% (18/18), 5.31 KiB | 5.00 KiB/s, done.
From https://github.com/Interpause/auto-sd-krita
e4010fc..6a3f44a master -> origin/master
57793a7..db1d612 scripts_api -> origin/scripts_api
Updating e4010fc..6a3f44a
Fast-forward
.github/ISSUE_TEMPLATE/bug_report.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
venv "E:\000aistablediff\kritasd\auto-sd-krita\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 6a3f44a
Installing requirements for Web UI
Launching Web UI and Krita server with arguments:
INFO: Started server process [6628]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:36588 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36589 - "GET /config HTTP/1.1" 200 OK
LatentDiffusion: Running in eps-prediction mode
INFO: 127.0.0.1:36591 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36592 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36593 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36595 - "GET /config HTTP/1.1" 200 OK
DiffusionWrapper has 859.52 M params.
INFO: 127.0.0.1:36596 - "GET /config HTTP/1.1" 200 OK
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
INFO: 127.0.0.1:36597 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36602 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36605 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36608 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36610 - "GET /config HTTP/1.1" 200 OK
Loading weights [7460a6fa] from E:\000aistablediff\kritasd\auto-sd-krita\models\Stable-diffusion\model.ckpt
INFO: 127.0.0.1:36611 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36612 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36615 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36617 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36618 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36620 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36621 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36622 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36624 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36625 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36626 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36628 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36629 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36630 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36632 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36633 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36634 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36636 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36637 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36638 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36640 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36641 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36642 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36644 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36645 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36646 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36648 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36649 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36650 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36652 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36653 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36654 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36656 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36657 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36658 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36660 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36661 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36662 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36664 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36665 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36666 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36668 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36669 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36672 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36674 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36675 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36676 - "GET /config HTTP/1.1" 200 OK
Global Step: 470000
INFO: 127.0.0.1:36678 - "GET /config HTTP/1.1" 200 OK
INFO: 127.0.0.1:36679 - "GET /config HTTP/1.1" 200 OK
Applying cross attention optimization (Doggettx).
Model loaded.
INFO: 127.0.0.1:36680 - "GET /config HTTP/1.1" 200 OK
Loaded a total of 0 textual inversion embeddings.
Embeddings:
INFO: 127.0.0.1:36684 - "GET /config HTTP/1.1" 200 OK
Running on local URL: http://127.0.0.1:7861

To create a public link, set share=True in launch().
txt2img:
restore_faces=False face_restorer='None' codeformer_weight=0.5 sd_model='model.ckpt [7460a6fa]' prompt='a house on the sea' negative_prompt='ghj' seed=-1 seed_enable_extras=False subseed=-1 subseed_strength=0.0 seed_resize_from_h=0 seed_resize_from_w=0 sampler_name='DDIM' steps=38 cfg_scale=7.0 denoising_strength=0.7 batch_count=9 batch_size=1 base_size=1152 max_size=768 tiling=False highres_fix=False firstphase_height=512 firstphase_width=512 upscaler_name='None' filter_nsfw=False include_grid=False sample_path='outputs/krita-out' save_samples=True orig_width=512 orig_height=512
img size: 512x512 -> 768x768, aspect ratio: 1.00 -> 1.00, 0.00% change
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:27<00:00, 1.41it/s]
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:15<00:00, 2.54it/s]
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:15<00:00, 2.52it/s]
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:15<00:00, 2.53it/s]
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:15<00:00, 2.54it/s]
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:15<00:00, 2.49it/s]
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:15<00:00, 2.52it/s]
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:15<00:00, 2.52it/s]
Data shape for DDIM sampling is (1, 4, 96, 96), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:15<00:00, 2.53it/s]
Total progress: 351it [02:25, 2.41it/s]
saved: ['E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829127_0.png', 'E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829127_1.png', 'E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829127_2.png', 'E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829127_3.png', 'E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829127_4.png', 'E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829127_5.png', 'E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829127_6.png', 'E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829127_7.png', 'E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829128_8.png']
finished txt2img!

hope this helps :)

txt2img:
restore_faces=False face_restorer='None' codeformer_weight=0.5 sd_model='model.ckpt [7460a6fa]' prompt='a house on the sea' negative_prompt='ghj' seed=-1 seed_enable_extras=False subseed=-1 subseed_strength=0.0 seed_resize_from_h=0 seed_resize_from_w=0 sampler_name='DDIM' steps=38 cfg_scale=7.0 denoising_strength=0.7 batch_count=1 batch_size=1 base_size=512 max_size=768 tiling=False highres_fix=False firstphase_height=512 firstphase_width=512 upscaler_name='None' filter_nsfw=False include_grid=False sample_path='outputs/krita-out' save_samples=True orig_width=512 orig_height=512
img size: 512x512 -> 512x512, aspect ratio: 1.00 -> 1.00, 0.00% change
Data shape for DDIM sampling is (1, 4, 64, 64), eta 0
Running DDIM Sampling with 39 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████| 39/39 [00:05<00:00, 7.45it/s]
Total progress: 39it [00:05, 7.55it/s]
saved: ['E:\000aistablediff\kritasd\auto-sd-krita\outputs\krita-out\1666829416_0.png']
finished txt2img!

Oh yeah, I heard the new SD v1.5 has a higher base size. Set max_size higher than or equal to base size.

but on this 2 trys i used the old model.cpkt

BTW, are those saved images also empty?

everything seems to work, it just doesn`t arrive in krita the right way

this was the output image in the output folder

1666829416_0

and int the kritaout folder

I cannot reproduce the issue on my side, but I am going to quickly push a commit to add a few more debug messages.

yeah i saw it on your youtube channel. It should work. very strange.

okay, pull down the commit above, and ensure you copy the Krita plugin again. Instead of using the normal Krita shortcut, right click on the shortcut and click "go to location". Then repeat that till you get to the actual Krita.exe. Above, you will see a Krita.com. If you run that, Krita will open a console window in addition to Krita itself, which will contain debug output.

Note the debug output in the Krita console should show what appears to be a bunch of random characters. That is the image encoded in base64, and because I printed it, it pushes aside all the other debug messages.

Node::setPixelData: not enough data to write to the paint device

the comment was too long because of tousands of letters but i think this one is the important part

No "macintosh" available.
No "breeze" available.
Set style "fusion"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_0"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_1"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_2"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_3"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_4"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_5"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_6"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_7"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_8"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_9"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_color_10"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_key_1_minus"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_key_1_plus"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_key_2_minus"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_key_2_plus"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_key_3_minus"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_key_3_plus"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_key_4_minus"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_key_4_plus"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_lock_cmyk"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_lock_kkk"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_lock_ard"
NOT COOL: Duplicated action name from xml data: "pykrita_pigment_o_extension_panel_hud"
Bundle "C:/Users/Admin/AppData/Roaming/krita/4pastel.bundle" is broken. File "paintoppresets/Bristle_frottis0797.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Airbrush2021.bundle" is broken. File "brushes/rake_dotted.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/bristles_circle_medium.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/chalk.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/floor.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/paint_splats.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/rock_pitted.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/rock_scraped.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/scratches_rough.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/splat_dots.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/splats_large.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Charcoal_KA.bundle" is broken. File "brushes/square_rough.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Concept_&Illustration_v1.2.bundle" is broken. File "brushes/chalk_round_hard.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Concept
&Illustration_v1.2.bundle" is broken. File "brushes/scratches_rough.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Concept
&_Illustration_v1.2.bundle" is broken. File "paintoppresets/1)Basic_flat_diagonal_2_backup_2020-05-06-175552.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Crayons_V1.bundle" is broken. File "brushes/chalk_chisel_random_small.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Crayons_V1.bundle" is broken. File "brushes/oil_bristle.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Crayons_V1.bundle" is broken. File "brushes/rock_pitted.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Crayons_V1.bundle" is broken. File "brushes/splat_dots.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_1mm-600dpi-isometric.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_5mm-221ppi-isometric.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_grid01.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_grid02.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_grid03.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_grid04.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper-01.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper-02.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper-03.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper-04.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper-05.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper-06.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper-07.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper3_2G.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper3_2G17.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper3_2G50.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Dirty_MyPaint.bundle" is broken. File "patterns/DIRTY_paper3_2G75.png.pat" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Fizzyflower_essential_beta.bundle" is broken. File "brushes/bokey_circle.gbr" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Fizzyflower_essential_beta.bundle" is broken. File "brushes/essential_ult_37.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/HNM_Mountain_Paint.bundle" is broken. File "brushes/chisel_knife.gbr" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/hu_graphite_v01.bundle" is broken. File "brushes/DA_Triangle_grain.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/hu_graphite_v01.bundle" is broken. File "paintoppresets/HU_Graphite_hard.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Impression_2021_v3.bundle" is broken. File "brushes/circle_hard_eroded.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Impression_2021_v3.bundle" is broken. File "brushes/impressionism_brush.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Impression_2021_v3.bundle" is broken. File "brushes/plain_rake.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/abominable_snowman.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/bokey_circle.gbr" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/bristles_circle_dense.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/bristles_circle_medium.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/chalk_round_hard.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/chalk_sparse.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/circle_hard_eroded.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/freckles.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/oil_knife.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/paint_splats.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/rock_pitted.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/smoke.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/spike_blob.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/square_rough.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/square_rough_lightgrey.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "brushes/watercolor.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "paintoppresets/j)_Watercolor_Fringe.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "paintoppresets/j)_Watercolor_Texture.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "paintoppresets/j)_Waterpaint_Hard_Edges.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/J_Watercolor.bundle" is broken. File "paintoppresets/j)Waterpaint_Soft_Edges.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Krita_4_Extras.bundle" is broken. File "brushes/abominable_snowman.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Krita_4_Extras.bundle" is broken. File "brushes/bristle.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Krita_4_Extras.bundle" is broken. File "brushes/bristles_grouped.gbr" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Krita_4_Extras.bundle" is broken. File "brushes/chalk.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Krita_4_Extras.bundle" is broken. File "brushes/chisel_streaks.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Krita_4_Extras.bundle" is broken. File "brushes/random_particles.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Krita_4_Extras.bundle" is broken. File "brushes/square_rough_lightgrey.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Krita_4_Extras.bundle" is broken. File "brushes/watercolor.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Muses.bundle" is broken. File "brushes/abominable_snowman.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Muses.bundle" is broken. File "patterns/04_paper-C-grain.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Muses.bundle" is broken. File "patterns/10_drawed_dotted.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Muses.bundle" is broken. File "patterns/17_texture-melt.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/PESI'S_WATERCOLORS
-ver.2.2.bundle" is broken. File "brushes/oil_knife.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/PESI'S_WATERCOLORS
-ver.2.2.bundle" is broken. File "brushes/random_particles.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/PESI'S_WATERCOLORS
-ver.2.2.bundle" is broken. File "brushes/smoke.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/PESI'S_WATERCOLORS
-ver.2.2.bundle" is broken. File "brushes/square_rough_lightgrey.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/PESI'S_WATERCOLORS
-_ver.2.2.bundle" is broken. File "brushes/watercolor.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Rakurri_Brush_Set_V.1.1.bundle" is broken. File "paintoppresets/Rakurri_Blender_Frosty.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Rakurri_Brush_Set_V.1.1.bundle" is broken. File "paintoppresets/Rakurri_Blender_Splatty.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Rakurri_Brush_Set_V.1.1.bundle" is broken. File "paintoppresets/Rakurri_Pixelblend_Groom.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Rakurri_Brush_Set_V1.0.bundle" is broken. File "brushes/abominable_snowman.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Ramon(COMPLETE)_MyPaint.bundle" is broken. File "paintoppresets/RAMON_Pencil_P.Shade2.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Ramon(COMPLETE)_MyPaint.bundle" is broken. File "paintoppresets/RAMON_Pencil_P._Shade_Copy.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Ramon_MyPaint.bundle" is broken. File "paintoppresets/RAMON_Pencil_P._Shade_Copy.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/RM_Sketch_V1.bundle" is broken. File "brushes/abominable_snowman.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/RM_Sketch_V1.bundle" is broken. File "brushes/graphite_grain.gih" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/RM_Sketch_V1.bundle" is broken. File "brushes/square_rough.png" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Ink_Tones_Liner.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Paint_OpenCanvas_Hard.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Paint_OpenCanvas_Soft.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Pencil_Basic_Pencil_Shader.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Pencil_Basic_Sketch_Pencil.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Pencil_Black_Smooth_Pencil.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Pencil_Graphite_Powder_Smudge.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Water_WaterC_Round_J1.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Water_WaterC_Round_J1_Inv.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Water_WaterC_Round_J2.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Water_WaterC_Round_J2_Inv.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Water_WaterC_Round_J3_Inv.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Water_Watercolor_Knife_1.kpp" is missing
Bundle "C:/Users/Admin/AppData/Roaming/krita/Tone_MyPaint.bundle" is broken. File "paintoppresets/TONE_Water_Watercolor_Knife_2.kpp" is missing
krita.general: ERROR: unable to decode abr format version 9 (subver 0 )
Could not load the resource from the bundle "paintoppresets" "paintoppresets/Special_dyna_dots.kpp" "C:/Users/Admin/AppData/Roaming/krita/Krita_3_Default_Resources.bundle"
krita.general: ERROR: unable to decode abr format version 23364 (subver 0 )
QObject::startTimer: Timers cannot have negative intervals
C:\Program Files\Krita (x64)\lib\krita-python-libs\krita added to PYTHONPATH
WARNING: KisResourceLocator::loadRequiredResources failed to sanity check the embedded resource:
parent resource: KoResourceSignature("paintoppresets", "", "i)_Wet_Paint_Copy.kpp", "i) Wet Paint Copy")
embedded resource: KoResourceSignature("patterns", "409dee3b2c51bfc79cd98195e15046a2", "4-flathack-black55.png.pat", "4-flathack-black55.png.pat")
Could not import "4-flathack-black55.png.pat" : resource doesn't load.
Failed to load linked resource: KoResourceSignature("brushes", "", "Cloudpipe 1.gih", "")
Failed to load linked resource: KoResourceSignature("brushes", "", "Grainologic.png", "")
QOpenGLExtensions::flushShared() forcing glFinish for ANGLE
Node::setPixelData: not enough data to write to the paint device
txt2img base64 layers to insert:
[511204]
Image 0

this is the stuff before the letters

There is nothing after the letters right? That Node::setPixelData error isn't mine, because I put the debug messages before that part... unless the print statements are only flushed after the code is done

yeah nothing else

thats all

Okay, I cannot reproduce on my computer, but I think I know what is going on. I am writing a few more debug messages around specifically the part where I convert the base64-encoded image back to a QImage then to the bytearray that is finally inserted via setPixelData.

Okay, this one will print much more information about the image received, but without printing the actual contents of the image. This is an example of what I get:

image

Note, the data size differs based on how well the PNG compression goes.

No "macintosh" available.
No "breeze" available.
Set style "fusion"
QObject::startTimer: Timers cannot have negative intervals
C:\Program Files\Krita (x64)\lib\krita-python-libs\krita added to PYTHONPATH
QOpenGLExtensions::flushShared() forcing glFinish for ANGLE
Sizes of layers to insert:
[546908]
Inserting layer txt2img 1
Data size: 546908
Image created: <PyQt5.QtGui.QImage object at 0x000001EB0AFEF970>, 512x512, depth: 32, format: 4
Layer created: <PyKrita.krita.Node object at 0x000001EB0CB985E0>
Inserting at x: 0, y: 0, w: 512, h: 512
Node::setPixelData: not enough data to write to the paint device

now it works somehow, did a complete reset of krita

and installed it, or maybe you changed something but it works :)

Yeah I sorta figured by this point it was probably Krita being broken

I didn't change anything, only added more debug messages

yeah too much too old content from old versions. Sorry, but thanks for helping me out with this one. I should have known it myself lol

Anyways, if you like the plugin, please do star the repository and share the video with people you think would be interested. Closing the issue now.