https://bugs.kde.org/show_bug.cgi?id=483277

            Bug ID: 483277
           Summary: ComfyUi integration: no docker / function working
                    except controlnet
    Classification: Applications
           Product: krita
           Version: 5.2.2
          Platform: Microsoft Windows
                OS: Microsoft Windows
            Status: REPORTED
          Severity: grave
          Priority: NOR
         Component: Dockers
          Assignee: krita-bugs-n...@kde.org
          Reporter: diego.vu...@gmail.com
  Target Milestone: ---

SUMMARY
***
I've follow all the installation guidelines, enabled the ComfyUi plugin and all
the relevant dockers. 
If I try to run any of the available feature (no matter if upscale, generate
etc) I always get an error. 
Controlnet instead is working fine.
***


UPSCALE ERROR LOG:
JSONDecodeError
Python 3.10.7: C:\Program Files\Krita (x64)\bin\krita.exe
Mon Mar 11 19:29:36 2024

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\pages\upscale.py in
<lambda>()
   65         self.upscaler_layout.cfg_connect()
   66         self.upscale_by.cfg_connect()
   67         self.btn.released.connect(lambda: script.action_simple_upscale())
   68         self.get_workflow_btn.released.connect(
   69             lambda: get_workflow(script.cfg, script.action_get_workflow,
"upscale")
self undefined
global script = <krita_comfy.script.Script object>
script.action_simple_upscale = <bound method Script.action_simple_upscale of
<krita_comfy.script.Script object>>

 C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\script.py in
action_simple_upscale(self=<krita_comfy.script.Script object>)
  612         if not self.doc:
  613             return
  614         self.apply_simple_upscale()
  615 
  616     def action_update_config(self):
self = <krita_comfy.script.Script object>
self.apply_simple_upscale = <bound method Script.apply_simple_upscale of
<krita_comfy.script.Script object>>

 C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\script.py in
apply_simple_upscale(self=<krita_comfy.script.Script object>)
  461             self.client.images_received.disconnect(cb)
  462 
  463         self.client.post_upscale(cb, sel_image)
  464 
  465     def apply_get_workflow(self, mode):
self = <krita_comfy.script.Script object>
self.client = <krita_comfy.client.Client object>
self.client.post_upscale = <bound method Client.post_upscale of
<krita_comfy.client.Client object>>
cb = <function Script.apply_simple_upscale.<locals>.cb>
sel_image = <PyQt5.QtGui.QImage object>

 C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\client.py in
post_upscale(self=<krita_comfy.client.Client object>, cb=<function
Script.apply_simple_upscale.<locals>.cb>, src_img=<PyQt5.QtGui.QImage object>)
 1739                 upscale_latent()
 1740         else:
 1741             params, _ =
self.run_injected_custom_workflow(self.cfg("upscale_workflow", str), 0,
"upscale", src_img)
 1742 
 1743         if cb is None:
params = {}
_ undefined
self = <krita_comfy.client.Client object>
self.run_injected_custom_workflow = <bound method
Client.run_injected_custom_workflow of <krita_comfy.client.Client object>>
self.cfg = <krita_comfy.config.Config object>
builtinstr = <class 'str'>
src_img = <PyQt5.QtGui.QImage object>

 C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\client.py in
run_injected_custom_workflow(self=<krita_comfy.client.Client object>,
workflow='', seed=0, mode='upscale', src_img=<PyQt5.QtGui.QImage object>,
mask_img=None, controlnet_src_imgs={}, resized_width=None, resized_height=None,
original_width=None, original_height=None)
 1211     def run_injected_custom_workflow(self, workflow, seed, mode, src_img,
mask_img = None, controlnet_src_imgs = {},
 1212                                      resized_width = None, resized_height
= None, original_width = None, original_height = None):
 1213         params = self.restore_params(json.loads(workflow), src_img,
mask_img)
 1214         ksampler_id = DEFAULT_NODE_IDS["KSampler"]
 1215         positive_prompt_id =  DEFAULT_NODE_IDS["ClipTextEncode_pos"]
params undefined
self = <krita_comfy.client.Client object>
self.restore_params = <bound method Client.restore_params of
<krita_comfy.client.Client object>>
global json = <module 'json' from 'C:\\Program Files\\Krita
(x64)\\python\\python310.zip\\json\\__init__.pyc'>
json.loads = <function loads>
workflow = ''
src_img = <PyQt5.QtGui.QImage object>
mask_img = None

 C:\Program Files\Krita (x64)\json\__init__.py in loads(s='', cls=None,
object_hook=None, parse_float=None, parse_int=None, parse_constant=None,
object_pairs_hook=None, **kw={})


 C:\Program Files\Krita (x64)\json\decoder.py in
decode(self=<json.decoder.JSONDecoder object>, s='', _w=<built-in method match
of re.Pattern object>)


 C:\Program Files\Krita (x64)\json\decoder.py in
raw_decode(self=<json.decoder.JSONDecoder object>, s='', idx=0)

JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    __cause__ = None
    __class__ = <class 'json.decoder.JSONDecodeError'>
    __context__ = StopIteration(0)
    __delattr__ = <method-wrapper '__delattr__' of JSONDecodeError object>
    __dict__ = {'colno': 1, 'doc': '', 'lineno': 1, 'msg': 'Expecting value',
'pos': 0}
    __dir__ = <built-in method __dir__ of JSONDecodeError object>
    __doc__ = None
    __eq__ = <method-wrapper '__eq__' of JSONDecodeError object>
    __format__ = <built-in method __format__ of JSONDecodeError object>
    __ge__ = <method-wrapper '__ge__' of JSONDecodeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of JSONDecodeError
object>
    __gt__ = <method-wrapper '__gt__' of JSONDecodeError object>
    __hash__ = <method-wrapper '__hash__' of JSONDecodeError object>
    __init__ = <bound method JSONDecodeError.__init__ of
JSONDe...ror('Expecting value: line 1 column 1 (char 0)')>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of JSONDecodeError object>
    __lt__ = <method-wrapper '__lt__' of JSONDecodeError object>
    __module__ = 'json.decoder'
    __ne__ = <method-wrapper '__ne__' of JSONDecodeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <bound method JSONDecodeError.__reduce__ of
JSON...ror('Expecting value: line 1 column 1 (char 0)')>
    __reduce_ex__ = <built-in method __reduce_ex__ of JSONDecodeError object>
    __repr__ = <method-wrapper '__repr__' of JSONDecodeError object>
    __setattr__ = <method-wrapper '__setattr__' of JSONDecodeError object>
    __setstate__ = <built-in method __setstate__ of JSONDecodeError object>
    __sizeof__ = <built-in method __sizeof__ of JSONDecodeError object>
    __str__ = <method-wrapper '__str__' of JSONDecodeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = True
    __traceback__ = <traceback object>
    __weakref__ = None
    args = ('Expecting value: line 1 column 1 (char 0)',)
    colno = 1
    doc = ''
    lineno = 1
    msg = 'Expecting value'
    pos = 0
    with_traceback = <built-in method with_traceback of JSONDecodeError object>

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File
"C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\pages\upscale.py",
line 67, in <lambda>
    self.btn.released.connect(lambda: script.action_simple_upscale())
  File "C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\script.py",
line 614, in action_simple_upscale
    self.apply_simple_upscale()
  File "C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\script.py",
line 463, in apply_simple_upscale
    self.client.post_upscale(cb, sel_image)
  File "C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\client.py",
line 1741, in post_upscale
    params, _ = self.run_injected_custom_workflow(self.cfg("upscale_workflow",
str), 0, "upscale", src_img)
  File "C:\Users\User\AppData\Roaming\krita\pykrita\krita_comfy\client.py",
line 1213, in run_injected_custom_workflow
    params = self.restore_params(json.loads(workflow), src_img, mask_img)
  File "json\__init__.py", line 346, in loads
  File "json\decoder.py", line 337, in decode
  File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


KRITA CONFIG:
Krita

 Version: 5.2.2
 Installation type: installer / portable package
 Hidpi: true

Qt

  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.19045
  Pretty Productname: Windows 10 Version 2009
  Product Type: windows
  Product Version: 10

Locale

  Languages: en_US, en_US, en_US, en_US
  C locale: C
  QLocale current: en
  QLocale system: it
  QTextCodec for locale: UTF-8
  Process ACP: 65001 (UTF-8)
  System locale default ACP: 1252  (ANSI - Latino I)

OpenGL Info

  Vendor:  "Google Inc. (NVIDIA)" 
  Renderer:  "ANGLE (NVIDIA, NVIDIA GeForce RTX 3070 Laptop GPU Direct3D11
vs_5_0 ps_5_0, D3D11-31.0.15.5123)" 
  Driver version:  "OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash:
f2280c0c5f93+krita_qt5)" 
  Shading language:  "OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0 git hash:
f2280c0c5f93+krita_qt5)" 
  Requested format:  QSurfaceFormat(version 3.0, options
QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8,
greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8,
samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0,
colorSpace QSurfaceFormat::DefaultColorSpace, profile 
QSurfaceFormat::NoProfile) 
  Current format:  QSurfaceFormat(version 3.0, options
QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8,
greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8,
samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 0,
colorSpace QSurfaceFormat::DefaultColorSpace, profile 
QSurfaceFormat::NoProfile) 
  GL version: 3.0 
  Supports deprecated functions false 
  Is OpenGL ES: true 
  supportsBufferMapping: true 
  supportsBufferInvalidation: false 
  forceDisableTextureBuffers: true 
  Extensions: 
     GL_OES_compressed_EAC_RG11_signed_texture 
     GL_EXT_clip_control 
     GL_OES_EGL_image 
     GL_ANGLE_framebuffer_multisample 
     GL_CHROMIUM_lose_context 
     GL_ANGLE_pack_reverse_row_order 
     GL_EXT_texture_type_2_10_10_10_REV 
     GL_ANGLE_multi_draw 
     GL_ANGLE_program_cache_control 
     GL_CHROMIUM_bind_uniform_location 
     GL_EXT_sRGB 
     GL_ANGLE_depth_texture 
     GL_OES_texture_half_float 
     GL_ANGLE_lossy_etc_decode 
     GL_ANGLE_robust_client_memory 
     GL_EXT_unpack_subimage 
     GL_EXT_texture_format_BGRA8888 
     GL_OES_vertex_array_object 
     GL_AMD_performance_monitor 
     GL_OES_fbo_render_mipmap 
     GL_ANGLE_texture_usage 
     GL_NV_pixel_buffer_object 
     GL_ANGLE_multiview_multisample 
     GL_OES_element_index_uint 
     GL_ANGLE_request_extension 
     GL_OVR_multiview2 
     GL_OES_texture_stencil8 
     GL_OES_draw_buffers_indexed 
     GL_OES_compressed_ETC2_sRGB8_alpha8_texture 
     GL_EXT_multi_draw_indirect 
     GL_EXT_draw_buffers_indexed 
     GL_OES_get_program_binary 
     GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture 
     GL_OES_depth24 
     GL_ANGLE_texture_compression_dxt3 
     GL_EXT_EGL_image_external_wrap_modes 
     GL_EXT_texture_rg 
     GL_EXT_draw_buffers 
     GL_EXT_robustness 
     GL_OES_compressed_EAC_R11_signed_texture 
     GL_OES_draw_elements_base_vertex 
     GL_OES_texture_npot 
     GL_ANGLE_provoking_vertex 
     GL_OES_EGL_image_external 
     GL_EXT_texture_storage 
     GL_CHROMIUM_copy_compressed_texture 
     GL_ANGLE_framebuffer_blit 
     GL_ANGLE_instanced_arrays 
     GL_EXT_occlusion_query_boolean 
     GL_EXT_texture_compression_dxt1 
     GL_OES_EGL_image_external_essl3 
     GL_ANGLE_base_vertex_base_instance_shader_builtin 
     GL_EXT_debug_marker 
     GL_CHROMIUM_copy_texture 
     GL_EXT_color_buffer_half_float 
     GL_KHR_debug 
     GL_OES_compressed_ETC2_RGB8_texture 
     GL_EXT_float_blend 
     GL_OES_compressed_EAC_R11_unsigned_texture 
     GL_EXT_map_buffer_range 
     GL_ANGLE_translated_shader_source 
     GL_EXT_frag_depth 
     GL_OES_standard_derivatives 
     GL_OES_compressed_ETC2_RGBA8_texture 
     GL_EXT_texture_compression_s3tc_srgb 
     GL_EXT_texture_compression_bptc 
     GL_OES_depth32 
     GL_ANGLE_base_vertex_base_instance 
     GL_ANGLE_memory_size 
     GL_ANGLE_texture_compression_dxt5 
     GL_OES_packed_depth_stencil 
     GL_OES_rgb8_rgba8 
     GL_EXT_draw_elements_base_vertex 
     GL_ANGLE_texture_multisample 
     GL_ANGLE_copy_texture_3d 
     GL_EXT_color_buffer_float 
     GL_EXT_discard_framebuffer 
     GL_NV_pack_subimage 
     GL_EXT_blend_func_extended 
     GL_EXT_disjoint_timer_query 
     GL_EXT_texture_filter_anisotropic 
     GL_OES_compressed_EAC_RG11_unsigned_texture 
     GL_OES_surfaceless_context 
     GL_KHR_parallel_shader_compile 
     GL_OVR_multiview 
     GL_EXT_blend_minmax 
     GL_EXT_read_format_bgra 
     GL_CHROMIUM_sync_query 
     GL_OES_compressed_ETC2_sRGB8_texture 
     GL_EXT_multisampled_render_to_texture 
     GL_NV_framebuffer_blit 
     GL_OES_texture_border_clamp 
     GL_WEBGL_video_texture 
     GL_ANGLE_client_arrays 
     GL_EXT_texture_norm16 
     GL_NV_fence 
     GL_EXT_instanced_arrays 
     GL_OES_mapbuffer 
     GL_NV_EGL_stream_consumer_external 
     GL_EXT_debug_label 
     GL_OES_texture_float 
     GL_OES_texture_float_linear 
     GL_EXT_shader_texture_lod 
     GL_ANGLE_get_serialized_context_string 
     GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture 
     GL_CHROMIUM_bind_generates_resource 
     GL_OES_texture_half_float_linear 
     GL_ANGLE_get_tex_level_parameter 
     GL_EXT_texture_compression_rgtc 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsAngleD3D11: true 
  isQtPreferAngle: true 
  Detected renderers: 
    (Supported) ANGLE (Microsoft, Microsoft Basic Render Driver Direct3D11
vs_5_0 ps_5_0, D3D11-10.0.19041.3636) (OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash:
f2280c0c5f93+krita_qt5)) 
    (Supported) ANGLE (NVIDIA, NVIDIA GeForce RTX 3070 Laptop GPU Direct3D11
vs_5_0 ps_5_0, D3D11-31.0.15.5123) (OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash:
f2280c0c5f93+krita_qt5)) 
    (Supported) NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 (4.6.0 NVIDIA
551.23)  

useBufferInvalidation (config option): false


Hardware Information

  GPU Acceleration: auto
  Memory: 32528 Mb
  Number of Cores: 16
  Swap Location: C:/Users/User/AppData/Local/Temp
  Built for: sse2
  Base instruction set: fma3+avx2
  Supported instruction sets: fma3+avx2 avx2 fma3+avx avx fma4 fma3+sse4.2
sse4.2 sse4.1 ssse3 sse3 sse2 

Current Settings

  Current Swap Location: C:/Users/User/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 200
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Disable Vector Optimizations: false
  Disable AVX Optimizations: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 420
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Resource Location: C:/Users/User/AppData/Roaming/krita
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Loaded Python Plugins
        krita_comfy
        colorspace
        comics_project_management_tools
        documenttools
        exportlayers
        filtermanager
        lastdocumentsdocker
        plugin_importer
        quick_settings_docker
        scripter
        tenbrushes
        tenscripts


Display Information
Number of screens: 2
        Screen: 0
                Name: \\.\DISPLAY2
                Depth: 32
                Scale: 1
                Physical DPI109.501
                Logical DPI96
                Physical Size: 798, 334
                Position: 0, 0
                Resolution in pixels: 3440x1440
                Manufacturer: Samsung Electric Company
                Model: LC34G55T
                Refresh Rate: 100
                Serial Number: H1AK500000
        Screen: 1
                Name: \\.\DISPLAY1
                Depth: 32
                Scale: 1
                Physical DPI141.951
                Logical DPI120
                Physical Size: 344, 193
                Position: -1920, 0
                Resolution in pixels: 1920x1080
                Manufacturer: AU Optronics
                Model: AUOb98c
                Refresh Rate: 300
                Serial Number:

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to