stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

Upscale Function Error: TypeError: 'NoneType' object is not iterable

Open danilomaiaweb opened this issue 1 year ago • 3 comments

The option to create a upscale in image gallery no work Error on txt2img_upscale_function

Captura de tela 2024-07-27 200046

Se image above When click on buttom Create an upscaler version......

This error show on console: self.result = self.func(*self.args, **self.kwargs) File "F:\WebUI-Forge\webui\modules\txt2img.py", line 62, in txt2img_upscale_function assert 0 <= gallery_index < len(gallery), f'Bad image index: {gallery_index}' TypeError: '<=' not supported between instances of 'int' and 'dict' '<=' not supported between instances of 'int' and 'dict' *** Error completing request *** Arguments: ('task(86gafhwt368p7uq)', <gradio.routes.Request object at 0x0000014DAED24640>, [{'name':

danilomaiaweb avatar Jul 27 '24 23:07 danilomaiaweb

Your FORGE is perfect. The only problem I found was with the UPSCALER option. Everything else is working perfectly. Congratulations on the excellent work and dedication.

Thank you very much in advance. Best regards from Brazil !!!

danilomaiaweb avatar Jul 28 '24 04:07 danilomaiaweb

update and see if works

lllyasviel avatar Jul 28 '24 14:07 lllyasviel

Sorry, i have update the files ui.js and git pull, but here not work, see console reply:

  1. I update de ui.js

  2. run git pull F:\WebUI-Forge\webui>git pull remote: Enumerating objects: 13, done. remote: Counting objects: 100% (13/13), done. remote: Compressing objects: 100% (5/5), done. remote: Total 13 (delta 7), reused 13 (delta 7), pack-reused 0 Unpacking objects: 100% (13/13), 10.13 KiB | 370.00 KiB/s, done. From https://github.com/lllyasviel/stable-diffusion-webui-forge 2f87f123..37386592 main -> origin/main Your configuration specifies to merge with the ref 'refs/heads/dev2' from the remote, but no such ref was fetched.

  3. deleted the tmp folder

  4. reopen sd forge

  5. create a imagem

  6. Same error

File "F:\WebUI-Forge\webui\modules_forge\main_thread.py", line 37, in loop task.work() File "F:\WebUI-Forge\webui\modules_forge\main_thread.py", line 26, in work self.result = self.func(*self.args, **self.kwargs) File "F:\WebUI-Forge\webui\modules\txt2img.py", line 62, in txt2img_upscale_function assert 0 <= gallery_index < len(gallery), f'Bad image index: {gallery_index}' TypeError: '<=' not supported between instances of 'int' and 'dict' '<=' not supported between instances of 'int' and 'dict' *** Error completing request *** Arguments: ('task(buj4uihgbuja4lh)', <gradio.routes.Request object at 0x000001F7D8AB30D0>, [{'name': 'F:\WebUI-Forge\webui\output\txt2img-images\2024-07-28\00300-28-07-2024 - 3206994221.png?1722177725.5523248', 'data': 'http://127.0.0.1:7860/file=F:\WebUI-Forge\webui\output\txt2img-images\2024-07-28\00300-28-07-2024 - 3206994221.png?1722177725.5523248', 'is_file': True}], {}, '{"prompt": "raw photo, masterpiece, Harley-Davidson Sportster S big bike, chrome, hardtail, flathead, ziprealism, lora:LCMTurboMix-DPM-SDE-Karras:0.5, lora:WildcardX-XL-Detail-Enhancer:1", "all_prompts": ["raw photo, masterpiece, Harley-Davidson Sportster S big bike, chrome, hardtail, flathead, ziprealism, lora:LCMTurboMix-DPM-SDE-Karras:0.5, lora:WildcardX-XL-Detail-Enhancer:1"], "negative_prompt": "(nsfw, naked, nude, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation, (nudes:1.5), NSFW, nsfw, explicit, sex, pornographic, nudity BadDream, (UnrealisticDream:1.2)", "all_negative_prompts": ["(nsfw, naked, nude, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation, (nudes:1.5), NSFW, nsfw, explicit, sex, pornographic, nudity BadDream, (UnrealisticDream:1.2)"], "seed": 3206994221, "all_seeds": [3206994221], "subseed": 4240717771, "all_subseeds": [4240717771], "subseed_strength": 0, "width": 512, "height": 768, "sampler_name": "DPM++ 2M SDE Turbo", "cfg_scale": 1.5, "steps": 6, "batch_size": 1, "restore_faces": false, "face_restoration_model": null, "sd_model_name": "Realistic-Vision-V60B1-v51-HyperVAE", "sd_model_hash": "f47e942ad4", "sd_vae_name": null, "sd_vae_hash": null, "seed_resize_from_w": -1, "seed_resize_from_h": -1, "denoising_strength": 0.4, "extra_generation_params": {"Lora hashes": "LCMTurboMix-DPM-SDE-Karras: 813ea5fb1c67, WildcardX-XL-Detail-Enhancer: 69e8c9938bf7", "TI hashes": "BadDream: 758aac443515, UnrealisticDream: a77451e7ea07", "freeu_enabled": true, "freeu_b1": 1.01, "freeu_b2": 1.02, "freeu_s1": 0.99, "freeu_s2": 0.95}, "index_of_first_image": 0, "infotexts": ["raw photo, masterpiece, Harley-Davidson Sportster S big bike, chrome, hardtail, flathead, ziprealism, lora:LCMTurboMix-DPM-SDE-Karras:0.5, lora:WildcardX-XL-Detail-Enhancer:1\nNegative prompt: (nsfw, naked, nude, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation, (nudes:1.5), NSFW, nsfw, explicit, sex, pornographic, nudity BadDream, (UnrealisticDream:1.2)\nSteps: 6, Sampler: DPM++ 2M SDE Turbo, CFG scale: 1.5, Seed: 3206994221, Size: 512x768, Model hash: f47e942ad4, Model: Realistic-Vision-V60B1-v51-HyperVAE, Lora hashes: \"LCMTurboMix-DPM-SDE-Karras: 813ea5fb1c67, WildcardX-XL-Detail-Enhancer: 69e8c9938bf7\", TI hashes: \"BadDream: 758aac443515, UnrealisticDream: a77451e7ea07\", freeu_enabled: True, freeu_b1: 1.01, freeu_b2: 1.02, freeu_s1: 0.99, freeu_s2: 0.95, Version: f0.0.17v1.8.0rc-latest-288-gcab3c020"], "styles": [], "job_timestamp": "20240728114202", "clip_skip": 1, "is_using_inpainting_conditioning": false, "version": "f0.0.17v1.8.0rc-latest-288-gcab3c020"}', 'raw photo, masterpiece, Harley-Davidson Sportster S big bike, chrome, hardtail, flathead, ziprealism, lora:LCMTurboMix-DPM-SDE-Karras:0.5, lora:WildcardX-XL-Detail-Enhancer:1', '(nsfw, naked, nude, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation, (nudes:1.5), NSFW, nsfw, explicit, sex, pornographic, nudity BadDream, (UnrealisticDream:1.2)', [], 6, 'DPM++ 2M SDE Turbo', 1, 1, 1.5, 768, 512, False, 0.4, 1.5, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], 0, False, 'Realistic-Vision-V60B1-v51-HyperVAE.safetensors [f47e942ad4]', 1, -1, False, -1, 0, 0, 0, 0.0, 4, 512, 512, True, 'None', 'None', 0, None, 0.5, False, False, {'ad_model': 'face_yolov8n.pt', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M Karras', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M Karras', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M Karras', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M Karras', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, '', 'Use Prompt', 'Save Prompt', 'Delete Prompt', 'Copy from Active Prompt', '', '', False, False, False, 20, 4, 4, 0.4, 0.95, 2, 2, 0.4, 0.5, False, 1, False, None, '', None, True, False, False, False, False, False, 0, 0, '0', 0, False, True, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, 1, 1, '', False, False, False, 1, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, '', None, True, False, False, False, False, False, 0, 0, '0', 0, False, True, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, 1, 1, '', False, False, False, 1, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, '', None, True, False, False, False, False, False, 0, 0, '0', 0, False, True, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, 1, 1, '', False, False, False, 1, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, 1, 1, '', 1, 1, ['After Upscaling/Before Restore Face'], 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, False, '0', '0', 'inswapper_128.onnx', 'CodeFormer', 1, True, 'None', 1, 1, False, True, 1, 0, 0, False, 0.5, True, False, 'CUDA', False, 0, 'None', '', None, False, False, 0.5, 0, 'tab_single', 1, ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], multi_inputs_gallery=[], generated_image=None, mask_image=None, hr_option=<HiResFixOption.BOTH: 'Both'>, enabled=False, module='None', model='None', weight=1, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, advanced_weighting=None, save_detected_map=True), ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], multi_inputs_gallery=[], generated_image=None, mask_image=None, hr_option=<HiResFixOption.BOTH: 'Both'>, enabled=False, module='None', model='None', weight=1, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, advanced_weighting=None, save_detected_map=True), ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], multi_inputs_gallery=[], generated_image=None, mask_image=None, hr_option=<HiResFixOption.BOTH: 'Both'>, enabled=False, module='None', model='None', weight=1, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, advanced_weighting=None, save_detected_map=True), False, 7, 1, 'Constant', 0, 'Constant', 0, 1, 'enable', 'MEAN', 'AD', 1, True, 1.01, 1.02, 0.99, 0.95, False, 0.5, 2, False, 256, 2, 0, False, False, 3, 2, 0, 0.35, True, 'bicubic', 'bicubic', False, 0, 'anisotropic', 0, 'reinhard', 100, 0, 'subtract', 0, 0, 'gaussian', 'add', 0, 100, 127, 0, 'hard_clamp', 5, 0, 'None', 'None', False, 'MultiDiffusion', 768, 768, 64, 4, False, False, False, False, False, 'positive', 'comma', 0, False, False, 'start', '', 4, '4,5,6,7,8,9,10', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {} Traceback (most recent call last): File "F:\WebUI-Forge\webui\modules\call_queue.py", line 57, in f res = list(func(*args, **kwargs)) TypeError: 'NoneType' object is not iterable


:(

danilomaiaweb avatar Jul 28 '24 14:07 danilomaiaweb