Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txt2img not working #152

Open
ema7569 opened this issue May 28, 2023 · 8 comments
Open

txt2img not working #152

ema7569 opened this issue May 28, 2023 · 8 comments

Comments

@ema7569
Copy link

ema7569 commented May 28, 2023

Hello I have this console error message when attempting to draw a thing with txt2img (not tested the other options, it's my first attempt). From what I see in the error msg it search for model.ckpt what is it? I already have a model selected

auto-sd-paint-ext:INFO: txt2img:
restore_faces=False face_restorer='None' codeformer_weight=0.5 sd_model='model.ckpt' sd_vae='Automatic' clip_skip=1 script='None' script_args=[] prompt='a simple cat' negative_prompt=None seed=-1 seed_enable_extras=False subseed=-1 subseed_strength=0.0 seed_resize_from_h=0 seed_resize_from_w=0 sampler_name='Euler a' steps=20 cfg_scale=7.0 denoising_strength=0.7 batch_count=1 batch_size=1 base_size=512 max_size=768 disable_sddebz_highres=True 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=False orig_width=512 orig_height=512
Checkpoint model.ckpt not found; loading fallback cartoonish_v1.safetensors
Calculating sha256 for C:\Bin\stable-diffusion-webui\models\Stable-diffusion\cartoonish_v1.safetensors: 07f029f6d18ebbce4aea6ff741c2f9f9104a614a8ea4dbd6b0f6948333651c0f
Loading weights [07f029f6d1] from C:\Bin\stable-diffusion-webui\models\Stable-diffusion\cartoonish_v1.safetensors
Loading VAE weights specified in settings: C:\Bin\stable-diffusion-webui\models\VAE\YOZORA.vae.pt
Applying optimization: xformers... done.
Weights loaded in 12.9s (calculate hash: 8.4s, load weights from disk: 0.5s, apply weights to model: 1.3s, load VAE: 0.9s, move model to device: 1.7s).
Restoring base VAE
Applying optimization: xformers... done.
VAE weights loaded.
auto-sd-paint-ext:INFO: img size: 512x512 -> 512x512, aspect ratio: 1.00 -> 1.00, 0.00% change
Error completing request
Arguments: ('', 'a simple cat', '', 'None', 20, 0, False, False, 1, 1, 7.0, -1, -1, 0.0, 0, 0, False, 512, 512, False, 0.7, 0, 'None', 0, 512, 512, [], 0) {}
Traceback (most recent call last):
File "C:\Bin\stable-diffusion-webui\modules\call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "C:\Bin\stable-diffusion-webui\modules\call_queue.py", line 37, in f
res = func(*args, **kwargs)
TypeError: txt2img() missing 2 required positional arguments: 'hr_negative_prompt' and 'override_settings_texts'

auto-sd-paint-ext:WARNING: Interrupted!

Desktop (please complete the following information):

  • OS: win10
  • WebUI commit revision 20ae71faa8ef035c31aa3a410b707d792c8203a3
  • Extension commit revision 0071435

Additional context
First install, all seem correct, the connection krita / sd is ok. SD is show in krita. I enter the text a simple cat in krita txt2img and I have the error message show in console

@Ruakuu
Copy link

Ruakuu commented May 31, 2023

I'm having the same issue in linux, cannot generate anything from krita:

auto-sd-paint-ext:INFO: txt2img:
restore_faces=False face_restorer='None' codeformer_weight=0.5 sd_model='3Guofeng3_v33.safetensors [4078eb4174]' sd_vae='None' clip_skip=1 script='None' script_args=[] prompt='a cute bunny with a hat' negative_prompt=None seed=-1 seed_enable_extras=False subseed=-1 subseed_strength=0.0 seed_resize_from_h=0 seed_resize_from_w=0 sampler_name='Euler a' steps=19 cfg_scale=7.0 denoising_strength=0.7 batch_count=1 batch_size=1 base_size=512 max_size=768 disable_sddebz_highres=True 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=False orig_width=512 orig_height=576
auto-sd-paint-ext:INFO: img size: 512x576 -> 512x576, aspect ratio: 0.89 -> 0.89, 0.00% change
Error completing request
Arguments: ('', 'a cute bunny with a hat', '', 'None', 19, 0, False, False, 1, 1, 7.0, -1, -1, 0.0, 0, 0, False, 576, 512, False, 0.7, 0, 'None', 0, 512, 576, [], 0) {}
Traceback (most recent call last):
File "/opt/Programs/stable-diffusion-webui/stable-diffusion-webui/modules/call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "/opt/Programs/stable-diffusion-webui/stable-diffusion-webui/modules/call_queue.py", line 37, in f
res = func(*args, **kwargs)
TypeError: txt2img() missing 2 required positional arguments: 'hr_negative_prompt' and 'override_settings_texts'

auto-sd-paint-ext:WARNING: Interrupted!

Looks like it's not passing some needed arguments and it fails

@suonnon
Copy link

suonnon commented Jun 1, 2023

Same here, after installing A1111 ver 1.3.0 , I can not generate anything in Krita

@Ruakuu
Copy link

Ruakuu commented Jun 4, 2023

I found a quick and dirty fix for this problem. under the stable diffusion folder, go to extensions/auto-sd-paint-ext/backend, edit the app.py file, this section:

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.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
get_sampler_index(req.sampler_name), # hr_sampler_index
"", # hr_prompt
"", # hr_negative_prompt
[], # override_settings_texts (unsupported)
*args,
)

I added these 3 lines almost at the end:
get_sampler_index(req.sampler_name), # hr_sampler_index
"", # hr_prompt
"", # hr_negative_prompt

After that I restart SD and krita and the thing works.

@suonnon
Copy link

suonnon commented Jun 5, 2023

I found a quick and dirty fix for this problem. under the stable diffusion folder, go to extensions/auto-sd-paint-ext/backend, edit the app.py file, this section:

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.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 get_sampler_index(req.sampler_name), # hr_sampler_index "", # hr_prompt "", # hr_negative_prompt [], # override_settings_texts (unsupported) *args, )

I added these 3 lines almost at the end: get_sampler_index(req.sampler_name), # hr_sampler_index "", # hr_prompt "", # hr_negative_prompt

After that I restart SD and krita and the thing works.

This work but I got issue with ADetailer extension. I still can generate image inside Krita but just a minor issue on console log. Maybe it's all about ADetailer (not compatible with Krita plugin) and it does not affect any issue at all I guess.

Error running process: E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py
Traceback (most recent call last):
  File "E:\AI\stable-diffusion-webui\modules\scripts.py", line 451, in process
    script.process(p, *script_args)
  File "E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py", line 450, in process
    if self.is_ad_enabled(*args_):
  File "E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py", line 154, in is_ad_enabled
    raise ValueError(dedent(message))
ValueError:
[-] ADetailer: Not enough arguments passed to ADetailer.
    input: ()

@Ruakuu
Copy link

Ruakuu commented Jun 5, 2023

I found a quick and dirty fix for this problem. under the stable diffusion folder, go to extensions/auto-sd-paint-ext/backend, edit the app.py file, this section:
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.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 get_sampler_index(req.sampler_name), # hr_sampler_index "", # hr_prompt "", # hr_negative_prompt [], # override_settings_texts (unsupported) *args, )
I added these 3 lines almost at the end: get_sampler_index(req.sampler_name), # hr_sampler_index "", # hr_prompt "", # hr_negative_prompt
After that I restart SD and krita and the thing works.

This work but I got issue with ADetailer extension. I still can generate image inside Krita but just a minor issue on console log. Maybe it's all about ADetailer (not compatible with Krita plugin) and it does not affect any issue at all I guess.

Error running process: E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py
Traceback (most recent call last):
  File "E:\AI\stable-diffusion-webui\modules\scripts.py", line 451, in process
    script.process(p, *script_args)
  File "E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py", line 450, in process
    if self.is_ad_enabled(*args_):
  File "E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py", line 154, in is_ad_enabled
    raise ValueError(dedent(message))
ValueError:
[-] ADetailer: Not enough arguments passed to ADetailer.
    input: ()

I don't think this is related

@suonnon
Copy link

suonnon commented Jun 5, 2023

I found a quick and dirty fix for this problem. under the stable diffusion folder, go to extensions/auto-sd-paint-ext/backend, edit the app.py file, this section:
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.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 get_sampler_index(req.sampler_name), # hr_sampler_index "", # hr_prompt "", # hr_negative_prompt [], # override_settings_texts (unsupported) *args, )
I added these 3 lines almost at the end: get_sampler_index(req.sampler_name), # hr_sampler_index "", # hr_prompt "", # hr_negative_prompt
After that I restart SD and krita and the thing works.

This work but I got issue with ADetailer extension. I still can generate image inside Krita but just a minor issue on console log. Maybe it's all about ADetailer (not compatible with Krita plugin) and it does not affect any issue at all I guess.

Error running process: E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py
Traceback (most recent call last):
  File "E:\AI\stable-diffusion-webui\modules\scripts.py", line 451, in process
    script.process(p, *script_args)
  File "E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py", line 450, in process
    if self.is_ad_enabled(*args_):
  File "E:\AI\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py", line 154, in is_ad_enabled
    raise ValueError(dedent(message))
ValueError:
[-] ADetailer: Not enough arguments passed to ADetailer.
    input: ()

I don't think this is related

This plugin is much potential. I hope "Controlnet" would be deployed into it in near future.

@matthewjosephtaylor
Copy link

Added @Ruakuu fix (which worked for me) and created PR 🙏 it will be merged :)

PR #154

@Fhalo48
Copy link

Fhalo48 commented Aug 3, 2023

Hi

I'm now getting: AttributeError: 'int' object has no attribute 'username'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants