Open spreck opened 1 year ago
Above error is unrelated to the connection issue. Seems to be a result of the code trying to set the status bar text while Krita is closing.
Can you send me a screenshot of the terminal running the webUI? It should give a warning like COMMANDLINE_ARGS does not contain --api, API won't be mounted.
. https://github.com/vladmandic/automatic/issues/282 does mention he added some sort of compatibility, so it might be a different issue.
Okay, it's connecting now, but there is still an error: 13:50:44-112566 ERROR Exception: 'int' object is not iterable 13:50:44-130539 ERROR INFO: 127.0.0.1:52632 - "GET /sdapi/interpause/config HTTP/1.1" 200 OK Arguments: args=('', 0INFO: 127.0.0.1:52633 - "GET /sdapi/v1/progress HTTP/1.1" 200 OK , 'test'INFO: 127.0.0.1:52631 - "GET /sdapi/v1/progress HTTP/1.1" 200 OK , '', 'None', <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=666x222 at 0x2241F8A6DA0>, None, None, None, None, <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=666x222 at 0x2241F8A6DA0>, None, 40, 19, 0, None, 1, False, False, 1, 1, 12.0, 0, 0.8, -1, -1, 0.0, 0, 0, False, 1, 224, 672, 1.0, 1, False, 0, False, '', '', '', [], 0) kwargs={} 13:50:44-178543 ERROR gradio call: TypeError ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ C:\Users\fwss\github\automatic\modules\call_queue.py:34 in f │ │ │ │ 33 │ │ │ try: │ │ > 34 │ │ │ │ res = func(*args, **kwargs) INFO: 127.0.0.1:52634 - "GET /sdapi/v1/progress HTTP/1.1" 200 OK │ │ 35 │ │ │ │ progress.record_results(id_task, res) │ │ │ │ C:\Users\fwss\github\automatic\modules\img2img.py:81 in img2img │ │ │ │ 80 │ │ sampler_index = 0 │ │ > 81 │ override_settings = create_override_settings_dict(override_settings_texts) │ │ 82 │ │ │ │ C:\Users\fwss\github\automatic\modules\generation_parameters_copypaste.py:341 in create_override_settings_dict │ │ │ │ 340 │ params = {} │ │ > 341 │ for pair in text_pairs: │ │ 342 │ │ k, v = pair.split(":", maxsplit=1) │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ TypeError: 'int' object is not iterable
Okay, it's connecting now, but there is still an error: 13:50:44-112566 ERROR Exception: 'int' object is not iterable 13:50:44-130539 ERROR INFO: 127.0.0.1:52632 - "GET /sdapi/interpause/config HTTP/1.1" 200 OK Arguments: args=('', 0INFO: 127.0.0.1:52633 - "GET /sdapi/v1/progress HTTP/1.1" 200 OK , 'test'INFO: 127.0.0.1:52631 - "GET /sdapi/v1/progress HTTP/1.1" 200 OK , '', 'None', <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=666x222 at 0x2241F8A6DA0>, None, None, None, None, <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=666x222 at 0x2241F8A6DA0>, None, 40, 19, 0, None, 1, False, False, 1, 1, 12.0, 0, 0.8, -1, -1, 0.0, 0, 0, False, 1, 224, 672, 1.0, 1, False, 0, False, '', '', '', [], 0) kwargs={} 13:50:44-178543 ERROR gradio call: TypeError ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ C:\Users\fwss\github\automatic\modules\call_queue.py:34 in f │ │ │ │ 33 │ │ │ try: │ │ > 34 │ │ │ │ res = func(*args, **kwargs) INFO: 127.0.0.1:52634 - "GET /sdapi/v1/progress HTTP/1.1" 200 OK │ │ 35 │ │ │ │ progress.record_results(id_task, res) │ │ │ │ C:\Users\fwss\github\automatic\modules\img2img.py:81 in img2img │ │ │ │ 80 │ │ sampler_index = 0 │ │ > 81 │ override_settings = create_override_settings_dict(override_settings_texts) │ │ 82 │ │ │ │ C:\Users\fwss\github\automatic\modules\generation_parameters_copypaste.py:341 in create_override_settings_dict │ │ │ │ 340 │ params = {} │ │ > 341 │ for pair in text_pairs: │ │ 342 │ │ k, v = pair.split(":", maxsplit=1) │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ TypeError: 'int' object is not iterable
when I ran vlad's webui with debug option(.\webui --debug), I found somehow 'clip_skip' parameter is missing(-1 in log below, but should be 2 according to my setting). I think that's why all prameters after 'clip_skip' took wrong position and returned type error.
04:40:14-267444 DEBUG txt2img: id_task=|prompt=(masterpiece, best quality:1.2), 1girl raise her hands, correct
anatomy|negative_prompt=(worst quality, low quality:1.4), (verybadimagenegative_v1.3:0.8),
text|prompt_styles=None|steps=30|sampler_index=3|restore_faces=False|tiling=False|n_iter=1|batch_size=1|cfg_scal
e=7.0|clip_skip=-1|seed=-1|subseed=0.0|subseed_strength=0|seed_resize_from_h=0|seed_resize_from_w=False|seed_ena
ble_extras=640|height=512|width=True|enable_hr=0.6|denoising_strength=0|hr_scale=SwinIR_4x|hr_upscaler=0|hr_seco
nd_pass_steps=1024|hr_resize_x=1280|hr_resize_y=[]|override_settings_texts=0args=()
So as quick fix, I add req.clip_skip parameters in app.py file and at least txt2img seems to work now. Go to extensions/auto-sd-paint-ext/backend/app.py file, and add req.clip_skip between req.cfg_scale and req.seed.
output = wrap_gradio_gpu_call(modules.txt2img.txt2img)(
"", # id_task (used by wrap_gradio_gpu_call for some sort of job id system)
parse_prompt(req.prompt), # prompt
parse_prompt(req.negative_prompt), # negative_prompt
"None", # prompt_styles: saved prompt styles (unsupported)
req.steps, # steps
get_sampler_index(req.sampler_name), # sampler_index
req.restore_faces, # restore_faces
req.tiling, # tiling
req.batch_count, # n_iter
req.batch_size, # batch_size
req.cfg_scale, # cfg_scale
req.clip_skip, # clip_skip <<<<< here
req.seed, # seed
req.subseed, # subseed
req.subseed_strength, # subseed_strength
req.seed_resize_from_h, # seed_resize_from_h
req.seed_resize_from_w, # seed_resize_from_w
req.seed_enable_extras, # seed_enable_extras
height, # height
width, # width
req.highres_fix, # enable_hr: high res fix
req.denoising_strength, # denoising_strength: only applicable if high res fix in use
0, # hr_scale (overrided by hr_resize_x/y)
req.upscaler_name, # hr_upscaler: upscaler to use for highres fix
0, # hr_second_pass_steps: 0 uses same num of steps as generation to refine details
req.orig_width, # hr_resize_x
req.orig_height, # hr_resize_y
[], # override_settings_texts (unsupported)
*args,
)
edit: okay, I just checked there's two 'output' sections in app.py (line 129 for txt2img and line 243 for img2img). By adding clip_skip param on both side, all of features(t2i, i2i, inpaint, upscale) seems to work.
JaeHeyK, thanks for the solution. This seems to work for me, but vladmandic responds with a number of TypeErrors for missing required positional arguments.
@Daryl-Horton yes, those errors appeared on my side too. And I suspect that's because vladmandic need default script parameters even for unused scripts. Maybe it can be covered in new issue.
Describe the bug The extension worked in automatic 1111, but that project hasn't seen any updates in a month and so it was recommended to switch to vladmandic's fork which is not abandoned.
However that fork has --api always on and it is not included as part of the webui.bat file or when calling the command as a command line argument. There have been issues with using openOutpaint due to this, https://github.com/vladmandic/automatic/issues/282, and I suspect something similar is going on with this.
This is a great extension and it would be awesome to be able to use it without needing to have to use a stale project to run it. I'm sure that vlad would like to see it work as well.
To Reproduce Steps to reproduce the behavior:
Screenshots This is the error in Krita, I started automatic and then waited for it to
Then when I quit Krita I see this Script error window with a 'Cannot reach backed!' message that I have to close about 5 or 6 times:
Desktop (please complete the following information):