AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
135.2k stars 25.82k forks source link

[Bug]: Problems when generating images with img2img API #13907

Open CCJetWing opened 7 months ago

CCJetWing commented 7 months ago

Is there an existing issue for this?

What happened?

I've got two main problems when using img2img through API to generate images: the first one is the images generated in the same batch gives me exactly the same images even though I set the seed to -1. the second one is the images get blur when I generate a new background from pure white background but I can get clear background in Webui.

Steps to reproduce the problem

payload_n = { "prompt": "0-0_basic_start, waterfront, (no human:1.3), ", "negative_prompt": "0-1_negative_prompt", "override_settings": { "sd_model_checkpoint": "majicmixRealistic_betterV2V25" }, "styles": [], "seed": -1, "sampler_name": "DPM++ 2M SDE Karras", "batch_size": 1, "n_iter": 4, "steps": 40, "cfg_scale": 10, "width": 512, "height": 768, "restore_faces": False, "tiling": False, "do_not_save_samples": False, "do_not_save_grid": False, "eta": 0, "denoising_strength": 0.75, "override_settings_restore_afterwards": True, "refiner_checkpoint": "", "refiner_switch_at": 0, "disable_extra_networks": False, "comments": {}, "init_images": [girl_image_with_pure_white_background], "mask": mask_of_the_girl, "resize_mode": 0, "image_cfg_scale": 0, "mask_blur_x": 10, "mask_blur_y": 10, "mask_blur": 10, "inpainting_fill": 1, "inpaint_full_res": False, "inpaint_full_res_padding": 32, "inpainting_mask_invert": 1, "initial_noise_multiplier": 0, "latent_mask": "", "sampler_index": "DPM++ 2M SDE Karras", "include_init_images": True, "script_name": "", "script_args": [], "send_images": True, "save_images": True, "alwayson_scripts": { "controlnet": { "args": [ { "input_image": girl_image_with_pure_white_background, "pixel_perfect": True, "module": "dw_openpose_full", "model": "control_v11p_sd15_openpose_fp16 [73c2b67d]", "weight": 1, "resize_mode": 2, "pixel_perfect": True }, { "input_image": girl_image_with_pure_white_background, "pixel_perfect": True, "module": "inpaint_only", "model": "control_v11p_sd15_inpaint_fp16 [be8bc0ed]", "weight": 0.7, "resize_mode": 2, "control_mode": 1, "pixel_perfect": True }, ] }, } }

response2 = requests.post(url=f'{url}/sdapi/v1/img2img',json=payload_n, verify=False)

What should have happened?

I expected there should be 4 different images of the girl in front of waterfront

Sysinfo

{ "Platform": "Windows-10-10.0.22621-SP0", "Python": "3.10.0", "Version": "v1.5.2", "Commit": "c9c8485bc1e8720aba70f029d25cba1c4abf2b5c", "Script path": "D:\NEW\stable-diffusion-webui", "Data path": "D:\NEW\stable-diffusion-webui", "Extensions dir": "D:\NEW\stable-diffusion-webui\extensions", "Checksum": "3de4783acbab7bcff152079b9dfa8393f4d89c9c306934ab63270f142bdadde4", "Commandline": [ "launch.py", "--no-half-vae", "--autolaunch", "--xformers", "--api" ], "Torch env info": { "torch_version": "1.13.1+cu116", "is_debug_build": "False", "cuda_compiled_version": "11.6", "gcc_version": null, "clang_version": null, "cmake_version": null, "os": "Microsoft Windows 11 家用版", "libc_version": "N/A", "python_version": "3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)", "python_platform": "Windows-10-10.0.22621-SP0", "is_cuda_available": "True", "cuda_runtime_version": "11.6.55\r", "cuda_module_loading": "LAZY", "nvidia_driver_version": "536.99", "nvidia_gpu_models": [ "GPU 0: NVIDIA GeForce RTX 3090", "GPU 1: NVIDIA GeForce RTX 3090" ], "cudnn_version": null, "pip_version": "pip3", "pip_packages": [ "lion-pytorch==0.0.7", "mypy-extensions==1.0.0", "numpy==1.23.5", "open-clip-torch==2.20.0", "pytorch-lightning==1.9.4", "torch==1.13.1+cu116", "torchaudio==0.13.0+cu116", "torchdiffeq==0.2.3", "torchmetrics==0.11.4", "torchsde==0.2.5", "torchvision==0.14.1+cu116" ], "conda_packages": [ "blas 1.0 mkl ", "lion-pytorch 0.1.2 pypi_0 pypi", "mkl 2023.1.0 h8bd8f75_46356 ", "mkl-service 2.4.0 py311h2bbff1b_1 ", "mkl_fft 1.3.6 py311hf62ec03_1 ", "mkl_random 1.2.2 py311hf62ec03_1 ", "numpy 1.24.3 py311hdab7c0b_1 ", "numpy-base 1.24.3 py311hd01c5d8_1 ", "numpydoc 1.5.0 py311haa95532_0 ", "torch 2.0.0+cu118 pypi_0 pypi", "torchvision 0.15.1+cu118 pypi_0 pypi" ], "hip_compiled_version": "N/A", "hip_runtime_version": "N/A", "miopen_runtime_version": "N/A", "caching_allocator_config": "", "is_xnnpack_available": "True" }, "Exceptions": [], "CPU": { "model": "AMD64 Family 25 Model 33 Stepping 0, AuthenticAMD", "count logical": 24, "count physical": 12 }, "RAM": { "total": "64GB", "used": "20GB", "free": "44GB" }, "Extensions": [ { "name": "a1111-sd-webui-tagcomplete", "path": "D:\NEW\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete", "version": "58804796", "branch": "main", "remote": "https://jihulab.com/hunter0725/a1111-sd-webui-tagcomplete.git" }, { "name": "adetailer", "path": "D:\NEW\stable-diffusion-webui\extensions\adetailer", "version": "6b41b3db", "branch": "main", "remote": "https://github.com/Bing-su/adetailer.git" }, { "name": "lora-prompt-tool", "path": "D:\NEW\stable-diffusion-webui\extensions\lora-prompt-tool", "version": "16d4e763", "branch": "main", "remote": "https://github.com/a2569875/lora-prompt-tool" }, { "name": "multidiffusion-upscaler-for-automatic1111", "path": "D:\NEW\stable-diffusion-webui\extensions\multidiffusion-upscaler-for-automatic1111", "version": "fbb24736", "branch": "main", "remote": "https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111.git" }, { "name": "openpose-editor", "path": "D:\NEW\stable-diffusion-webui\extensions\openpose-editor", "version": "c9357715", "branch": "master", "remote": "https://github.com/fkunn1326/openpose-editor.git" }, { "name": "sd-dynamic-prompts", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-dynamic-prompts", "version": "39c06b30", "branch": "main", "remote": null }, { "name": "sd-webui-additional-networks", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-webui-additional-networks", "version": "e9f3d622", "branch": "main", "remote": "https://github.com/kohya-ss/sd-webui-additional-networks.git" }, { "name": "sd-webui-aspect-ratio-helper", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper", "version": "99fcf9b0", "branch": "main", "remote": "https://github.com/thomasasfk/sd-webui-aspect-ratio-helper.git" }, { "name": "sd-webui-controlnet", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-webui-controlnet", "version": "05ef0b1c", "branch": "main", "remote": "https://github.com/Mikubill/sd-webui-controlnet.git" }, { "name": "sd-webui-inpaint-anything", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-webui-inpaint-anything", "version": "a08995a7", "branch": "main", "remote": "https://github.com/Uminosachi/sd-webui-inpaint-anything.git" }, { "name": "sd-webui-lora-block-weight", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-webui-lora-block-weight", "version": "3a883b9c", "branch": "main", "remote": "https://github.com/hako-mikan/sd-webui-lora-block-weight.git" }, { "name": "sd-webui-openpose-editor", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-webui-openpose-editor", "version": "be6f54fa", "branch": "main", "remote": "https://github.com/huchenlei/sd-webui-openpose-editor.git" }, { "name": "sd-webui-reactor", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-webui-reactor", "version": "4139d167", "branch": "main", "remote": "https://github.com/Gourieff/sd-webui-reactor.git" }, { "name": "sd-webui-segment-anything", "path": "D:\NEW\stable-diffusion-webui\extensions\sd-webui-segment-anything", "version": "d80220ec", "branch": "master", "remote": "https://github.com/continue-revolution/sd-webui-segment-anything.git" }, { "name": "sdweb-easy-prompt-selector", "path": "D:\NEW\stable-diffusion-webui\extensions\sdweb-easy-prompt-selector", "version": "053045eb", "branch": "main", "remote": "https://github.com/blue-pen5805/sdweb-easy-prompt-selector.git" }, { "name": "stable-diffusion-webui-rembg", "path": "D:\NEW\stable-diffusion-webui\extensions\stable-diffusion-webui-rembg", "version": "3d9eedbb", "branch": "master", "remote": "https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg.git" }, { "name": "stable-diffusion-webui-wd14-tagger", "path": "D:\NEW\stable-diffusion-webui\extensions\stable-diffusion-webui-wd14-tagger", "version": "e72d984b", "branch": "master", "remote": "https://github.com/picobyte/stable-diffusion-webui-wd14-tagger.git" } ], "Inactive extensions": [], "Environment": { "COMMANDLINE_ARGS": "--no-half-vae --autolaunch --xformers --api", "GRADIO_ANALYTICS_ENABLED": "False" }, "Config": { "samples_save": true, "samples_format": "png", "samples_filename_pattern": "", "save_images_add_number": true, "grid_save": true, "grid_format": "png", "grid_extended_filename": false, "grid_only_if_multiple": true, "grid_prevent_empty_spots": false, "n_rows": -1, "enable_pnginfo": true, "save_txt": false, "save_images_before_face_restoration": false, "save_images_before_highres_fix": false, "save_images_before_color_correction": false, "save_mask": false, "save_mask_composite": false, "jpeg_quality": 80, "webp_lossless": false, "export_for_4chan": true, "img_downscale_threshold": 4.0, "target_side_length": 4000, "img_max_size_mp": 200, "use_original_name_batch": true, "use_upscaler_name_as_suffix": false, "save_selected_only": true, "do_not_add_watermark": false, "temp_dir": "", "clean_temp_dir_at_start": false, "outdir_samples": "", "outdir_txt2img_samples": "outputs/txt2img-images", "outdir_img2img_samples": "outputs/img2img-images", "outdir_extras_samples": "outputs/extras-images", "outdir_grids": "", "outdir_txt2img_grids": "outputs/txt2img-grids", "outdir_img2img_grids": "outputs/img2img-grids", "outdir_save": "log/images", "save_to_dirs": true, "grid_save_to_dirs": true, "use_save_to_dirs_for_ui": false, "directories_filename_pattern": "[date]", "directories_max_prompt_words": 8, "ESRGAN_tile": 192, "ESRGAN_tile_overlap": 8, "realesrgan_enabled_models": [ "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B" ], "upscaler_for_img2img": null, "face_restoration_model": "CodeFormer", "code_former_weight": 0.5, "face_restoration_unload": false, "show_warnings": false, "memmon_poll_rate": 8, "samples_log_stdout": false, "multiple_tqdm": true, "print_hypernet_extra": false, "unload_models_when_training": false, "pin_memory": false, "save_optimizer_state": false, "save_training_settings_to_txt": true, "dataset_filename_word_regex": "", "dataset_filename_join_string": " ", "training_image_repeats_per_epoch": 1, "training_write_csv_every": 500, "training_xattention_optimizations": false, "training_enable_tensorboard": false, "training_tensorboard_save_images": false, "training_tensorboard_flush_every": 120, "sd_model_checkpoint": "epicrealism_naturalSin.safetensors [bff4610d23]", "sd_checkpoint_cache": 0, "sd_vae_checkpoint_cache": 0, "sd_vae": "Automatic", "sd_vae_as_default": true, "inpainting_mask_weight": 1.0, "initial_noise_multiplier": 1.0, "img2img_color_correction": false, "img2img_fix_steps": false, "img2img_background_color": "#ffffff", "enable_quantization": false, "enable_emphasis": true, "enable_batch_seeds": true, "comma_padding_backtrack": 20, "CLIP_stop_at_last_layers": 2, "upcast_attn": false, "use_old_emphasis_implementation": false, "use_old_karras_scheduler_sigmas": false, "no_dpmpp_sde_batch_determinism": false, "use_old_hires_fix_width_height": false, "interrogate_keep_models_in_memory": false, "interrogate_return_ranks": false, "interrogate_clip_num_beams": 1, "interrogate_clip_min_length": 24, "interrogate_clip_max_length": 48, "interrogate_clip_dict_limit": 1500, "interrogate_clip_skip_categories": [], "interrogate_deepbooru_score_threshold": 0.5, "deepbooru_sort_alpha": true, "deepbooru_use_spaces": false, "deepbooru_escape": true, "deepbooru_filter_tags": "", "extra_networks_default_view": "cards", "extra_networks_default_multiplier": 1.0, "extra_networks_card_width": 0, "extra_networks_card_height": 0, "extra_networks_add_text_separator": " ", "sd_hypernetwork": "None", "return_grid": true, "return_mask": false, "return_mask_composite": false, "do_not_show_images": false, "add_model_hash_to_info": true, "add_model_name_to_info": true, "disable_weights_auto_swap": true, "send_seed": true, "send_size": true, "font": "", "js_modal_lightbox": true, "js_modal_lightbox_initially_zoomed": true, "show_progress_in_title": true, "samplers_in_dropdown": true, "dimensions_and_batch_together": true, "keyedit_precision_attention": 0.1, "keyedit_precision_extra": 0.05, "quicksettings": "sd_model_checkpoint", "hidden_tabs": [], "ui_reorder": "inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts", "ui_extra_networks_tab_reorder": "", "localization": "None", "show_progressbar": true, "live_previews_enable": true, "show_progress_grid": true, "show_progress_every_n_steps": 10, "show_progress_type": "Approx NN", "live_preview_content": "Prompt", "live_preview_refresh_period": 1000, "hide_samplers": [], "eta_ddim": 0.0, "eta_ancestral": 1.0, "ddim_discretize": "uniform", "s_churn": 0.0, "s_tmin": 0.0, "s_noise": 1.0, "eta_noise_seed_delta": 0, "always_discard_next_to_last_sigma": false, "uni_pc_variant": "bh1", "uni_pc_skip_type": "time_uniform", "uni_pc_order": 3, "uni_pc_lower_order_final": true, "postprocessing_enable_in_main_ui": [], "postprocessing_operation_order": [], "upscaling_max_images_in_cache": 5, "disabled_extensions": [], "disable_all_extensions": "none", "sd_checkpoint_hash": "d7e2ac2f4a1f8853a327e38ec8b8fabc000205d17722ad055d84f2507c84b9ac", "ldsr_steps": 100, "ldsr_cached": false, "SWIN_tile": 192, "SWIN_tile_overlap": 8, "sd_lora": "None", "tac_tagFile": "danbooru.csv", "tac_active": true, "tac_activeIn.txt2img": true, "tac_activeIn.img2img": true, "tac_activeIn.negativePrompts": true, "tac_activeIn.thirdParty": true, "tac_activeIn.modelList": "", "tac_activeIn.modelListMode": "Blacklist", "tac_slidingPopup": true, "tac_maxResults": 5.0, "tac_showAllResults": true, "tac_resultStepLength": 100.0, "tac_delayTime": 100.0, "tac_useWildcards": true, "tac_useEmbeddings": true, "tac_useHypernetworks": true, "tac_useLoras": true, "tac_showWikiLinks": false, "tac_replaceUnderscores": true, "tac_escapeParentheses": true, "tac_appendComma": true, "tac_alias.searchByAlias": true, "tac_alias.onlyShowAlias": false, "tac_translation.translationFile": "danbooru-TC.csv", "tac_translation.oldFormat": false, "tac_translation.searchByTranslation": true, "tac_extra.extraFile": "extra-quality-tags.csv", "tac_extra.addMode": "Insert before", "additional_networks_extra_lora_path": "", "additional_networks_sort_models_by": "name", "additional_networks_reverse_sort_order": false, "additional_networks_model_name_filter": "", "additional_networks_xy_grid_model_metadata": "", "additional_networks_hash_thread_count": 1.0, "additional_networks_back_up_model_when_saving": true, "additional_networks_show_only_safetensors": false, "additional_networks_show_only_models_with_metadata": "disabled", "additional_networks_max_top_tags": 20.0, "additional_networks_max_dataset_folders": 20.0, "control_net_model_config": "models\cldm_v15.yaml", "control_net_model_adapter_config": "models\sketch_adapter_v14.yaml", "control_net_detectedmap_dir": "detected_maps", "control_net_models_path": "", "control_net_max_models_num": 4, "control_net_model_cache_size": 1, "control_net_control_transfer": false, "control_net_no_detectmap": false, "control_net_detectmap_autosaving": false, "control_net_only_midctrl_hires": true, "control_net_allow_script_control": false, "control_net_skip_img2img_processing": false, "control_net_monocular_depth_optim": false, "control_net_only_mid_control": false, "control_net_cfg_based_guidance": false, "control_net_sync_field_args": false, "ad_max_models": 3, "ad_save_previews": false, "ad_save_images_before": false, "ad_only_seleted_scripts": true, "ad_script_names": "dynamic_prompting,dynamic_thresholding,wildcards,wildcard_recursive", "ad_bbox_sortby": "None", "control_net_modules_path": "", "controlnet_show_batch_images_in_ui": false, "controlnet_increment_seed_during_batch": false, "quicksettings_list": [ "sd_model_checkpoint", "sd_vae", "CLIP_stop_at_last_layers" ], "restore_config_state_file": "", "save_init_img": false, "outdir_init_images": "outputs/init-images", "SCUNET_tile": 256, "SCUNET_tile_overlap": 8, "randn_source": "NV", "dont_fix_second_order_samplers_schedule": false, "lora_functional": false, "lora_preferred_name": "Alias from file", "js_modal_lightbox_gamepad": true, "js_modal_lightbox_gamepad_repeat": 250.0, "keyedit_delimiters": ".,\/!?%^*;:{}=`~()", "gradio_theme": "Default", "add_version_to_infotext": true, "s_min_uncond": 0, "controlnet_disable_control_type": false, "dp_ignore_whitespace": false, "dp_write_raw_template": false, "dp_write_prompts_to_file": false, "dp_parser_variant_start": "{", "dp_parser_variant_end": "}", "dp_parser_wildcard_wrap": "__", "dp_limit_jinja_prompts": false, "dp_auto_purge_cache": false, "dp_magicprompt_default_model": "Gustavosta/MagicPrompt-Stable-Diffusion", "dp_magicprompt_batch_size": 1, "list_hidden_files": true, "cross_attention_optimization": "Automatic", "token_merging_ratio": 0, "token_merging_ratio_img2img": 0, "token_merging_ratio_hr": 0, "extra_networks_show_hidden_directories": true, "extra_networks_hidden_models": "When searched", "sd_lyco": "None", "lora_add_hashes_to_infotext": true, "img2img_editor_height": 720, "ui_tab_order": [], "hires_fix_show_sampler": false, "hires_fix_show_prompts": false, "live_previews_image_format": "png", "arh_javascript_aspect_ratio_show": true, "arh_javascript_aspect_ratio": "1:1, 2:1, 3:2, 4:3, 5:4, 16:9", "arh_ui_javascript_selection_method": "Aspect Ratios Dropdown", "arh_hide_accordion_by_default": true, "arh_expand_by_default": false, "arh_ui_component_order_key": "MaxDimensionScaler, MinDimensionScaler, PredefinedAspectRatioButtons, PredefinedPercentageButtons", "arh_show_max_width_or_height": false, "arh_max_width_or_height": 1024, "arh_show_min_width_or_height": false, "arh_min_width_or_height": 1024, "arh_show_predefined_aspect_ratios": false, "arh_predefined_aspect_ratio_use_max_dim": false, "arh_predefined_aspect_ratios": "1:1, 4:3, 16:9, 9:16, 21:9", "arh_show_predefined_percentages": false, "arh_predefined_percentages": "25, 50, 75, 125, 150, 175, 200", "arh_predefined_percentages_display_key": "Incremental/decremental percentage (-50%, +50%)", "controlnet_disable_openpose_edit": false, "sam_use_local_groundingdino": false, "ui_reorder_list": [ "inpaint", "sampler", "checkboxes", "hires_fix", "dimensions", "cfg", "seed", "batch", "override_settings", "scripts" ], "sd_vae_overrides_per_model_preferences": false, "grid_zip_filename_pattern": "", "grid_text_active_color": "#000000", "grid_text_inactive_color": "#999999", "grid_background_color": "#ffffff", "save_incomplete_images": false, "face_restoration": false, "auto_launch_browser": "Local", "show_gradio_deprecation_warnings": true, "disable_mmap_load_safetensors": false, "hide_ldm_prints": true, "api_enable_requests": true, "api_forbid_local_requests": true, "api_useragent": "", "sd_checkpoints_limit": 1, "sd_checkpoints_keep_in_cpu": true, "sd_unet": "Automatic", "tiling": false, "hires_fix_refiner_pass": "second pass", "sdxl_crop_top": 0.0, "sdxl_crop_left": 0.0, "sdxl_refiner_low_aesthetic_score": 2.5, "sdxl_refiner_high_aesthetic_score": 6.0, "auto_vae_precision": true, "sd_vae_encode_method": "Full", "sd_vae_decode_method": "Full", "img2img_extra_noise": 0, "img2img_sketch_default_brush_color": "#ffffff", "img2img_inpaint_mask_brush_color": "#ffffff", "img2img_inpaint_sketch_default_brush_color": "#ffffff", "pad_cond_uncond": false, "persistent_cond_cache": true, "batch_cond_uncond": true, "hires_fix_use_firstpass_conds": false, "use_old_scheduling": false, "extra_networks_card_text_scale": 1, "extra_networks_card_show_desc": true, "textual_inversion_print_at_load": false, "textual_inversion_add_hashes_to_infotext": true, "lora_show_all": false, "lora_hide_unknown_for_versions": [], "lora_in_memory_limit": 0, "gradio_themes_cache": true, "gallery_height": "", "keyedit_move": true, "disable_token_counters": false, "extra_options_txt2img": [], "extra_options_img2img": [], "extra_options_cols": 1, "extra_options_accordion": false, "add_user_name_to_info": false, "infotext_styles": "Apply if any", "live_preview_allow_lowvram_full": false, "live_preview_fast_interrupt": false, "s_tmax": 0, "k_sched_type": "Automatic", "sigma_min": 0.0, "sigma_max": 0.0, "rho": 0.0, "sgm_noise_multiplier": false, "canvas_hotkey_zoom": "Alt", "canvas_hotkey_adjust": "Ctrl", "canvas_hotkey_move": "F", "canvas_hotkey_fullscreen": "S", "canvas_hotkey_reset": "R", "canvas_hotkey_overlap": "O", "canvas_show_tooltip": true, "canvas_auto_expand": true, "canvas_blur_prompt": false, "canvas_disabled_functions": [ "Overlap" ], "tac_sortWildcardResults": true, "tac_useLycos": true, "tac_showExtraNetworkPreviews": true, "tac_appendSpace": true, "tac_alwaysSpaceAtEnd": true, "tac_modelKeywordCompletion": "Never", "tac_wildcardCompletionMode": "To next folder level", "tac_translation.liveTranslation": false, "tac_chantFile": "demo-chants.json", "tac_keymap": "{\n \"MoveUp\": \"ArrowUp\",\n \"MoveDown\": \"ArrowDown\",\n \"JumpUp\": \"PageUp\",\n \"JumpDown\": \"PageDown\",\n \"JumpToStart\": \"Home\",\n \"JumpToEnd\": \"End\",\n \"ChooseSelected\": \"Enter\",\n \"ChooseFirstOrSelected\": \"Tab\",\n \"Close\": \"Escape\"\n}", "tac_colormap": "{\n \"danbooru\": {\n \"-1\": [\"red\", \"maroon\"],\n \"0\": [\"lightblue\", \"dodgerblue\"],\n \"1\": [\"indianred\", \"firebrick\"],\n \"3\": [\"violet\", \"darkorchid\"],\n \"4\": [\"lightgreen\", \"darkgreen\"],\n \"5\": [\"orange\", \"darkorange\"]\n },\n \"e621\": {\n \"-1\": [\"red\", \"maroon\"],\n \"0\": [\"lightblue\", \"dodgerblue\"],\n \"1\": [\"gold\", \"goldenrod\"],\n \"3\": [\"violet\", \"darkorchid\"],\n \"4\": [\"lightgreen\", \"darkgreen\"],\n \"5\": [\"tomato\", \"darksalmon\"],\n \"6\": [\"red\", \"maroon\"],\n \"7\": [\"whitesmoke\", \"black\"],\n \"8\": [\"seagreen\", \"darkseagreen\"]\n }\n}", "tac_refreshTempFiles": "Refresh TAC temp files", "control_net_inpaint_blur_sigma": 7, "control_net_no_high_res_fix": false, "controlnet_ignore_noninpaint_mask": false, "inpaint_anything_save_folder": "inpaint-anything", "inpaint_anything_sam_oncpu": false, "inpaint_anything_offline_inpainting": false, "inpaint_anything_padding_fill": 127, "eps_enable_save_raw_prompt_to_pnginfo": false, "dp_wildcard_manager_no_dedupe": false, "dp_wildcard_manager_no_sort": false, "dp_wildcard_manager_shuffle": false }, "Startup": { "total": 19.22000479698181, "records": { "start": 0.0, "launcher": 7.735533237457275, "import torch": 3.568178653717041, "import gradio": 0.5334842205047607, "setup paths": 0.4589235782623291, "import ldm": 0.0040035247802734375, "other imports": 0.7807087898254395, "opts onchange": 0.0020020008087158203, "setup SD model": 0.0010008811950683594, "setup codeformer": 0.06005430221557617, "setup gfpgan": 0.0, "list extensions": 0.0010018348693847656, "list SD models": 0.1851670742034912, "load scripts/custom_code.py": 0.004004001617431641, "load scripts/img2imgalt.py": 0.001001119613647461, "load scripts/loopback.py": 0.0, "load scripts/multi_frame_rendering.py": 0.0010006427764892578, "load scripts/outpainting_mk_2.py": 0.0, "load scripts/poor_mans_outpainting.py": 0.0, "load scripts/postprocessing_codeformer.py": 0.0010008811950683594, "load scripts/postprocessing_gfpgan.py": 0.0, "load scripts/postprocessing_upscale.py": 0.0, "load scripts/prompt_matrix.py": 0.0, "load scripts/prompts_from_file.py": 0.0, "load scripts/sd_upscale.py": 0.0010008811950683594, "load scripts/video2frame.py": 0.0, "load scripts/xyz_grid.py": 0.0010008811950683594, "load scripts/model_keyword_support.py": 0.0020017623901367188, "load scripts/shared_paths.py": 0.001001119613647461, "load scripts/tag_autocomplete_helper.py": 0.8057312965393066, "load scripts/!adetailer.py": 1.1726634502410889, "load scripts/lora_prompt_tool.py": 0.024021387100219727, "load scripts/tilediffusion.py": 0.0050051212310791016, "load scripts/tilevae.py": 0.0010006427764892578, "load scripts/main.py": 0.01901698112487793, "load scripts/dynamic_prompting.py": 0.03002762794494629, "load scripts/additional_networks.py": 0.08607840538024902, "load scripts/addnet_xyz_grid_support.py": 0.0, "load scripts/lora_compvis.py": 0.002001523971557617, "load scripts/metadata_editor.py": 0.0, "load scripts/model_util.py": 0.008007287979125977, "load scripts/safetensors_hack.py": 0.0, "load scripts/util.py": 0.0, "load scripts/sd_webui_aspect_ratio_helper.py": 0.054049015045166016, "load scripts/adapter.py": 0.0010008811950683594, "load scripts/api.py": 0.8087339401245117, "load scripts/batch_hijack.py": 0.0, "load scripts/cldm.py": 0.001001119613647461, "load scripts/controlmodel_ipadapter.py": 0.0, "load scripts/controlnet.py": 0.09708857536315918, "load scripts/controlnet_diffusers.py": 0.0010004043579101562, "load scripts/controlnet_lllite.py": 0.0, "load scripts/controlnet_lora.py": 0.0, "load scripts/controlnet_model_guess.py": 0.0010018348693847656, "load scripts/controlnet_version.py": 0.0, "load scripts/external_code.py": 0.0, "load scripts/global_state.py": 0.0010004043579101562, "load scripts/hook.py": 0.0, "load scripts/infotext.py": 0.0010004043579101562, "load scripts/logging.py": 0.0, "load scripts/lvminthin.py": 0.0, "load scripts/movie2movie.py": 0.0010013580322265625, "load scripts/processor.py": 0.0, "load scripts/utils.py": 0.0, "load scripts/xyz_grid_support.py": 0.0010006427764892578, "load scripts/inpaint_anything.py": 0.32529520988464355, "load scripts/lora_block_weight.py": 0.007006406784057617, "load scripts/openpose_editor.py": 0.01901721954345703, "load scripts/console_log_patch.py": 0.16414928436279297, "load scripts/reactor_api.py": 0.05705142021179199, "load scripts/reactor_faceswap.py": 0.001001119613647461, "load scripts/reactor_globals.py": 0.001001596450805664, "load scripts/reactor_helpers.py": 0.0, "load scripts/reactor_logger.py": 0.0, "load scripts/reactor_swapper.py": 0.0010006427764892578, "load scripts/reactor_version.py": 0.0, "load scripts/auto.py": 0.0010006427764892578, "load scripts/dino.py": 0.0010013580322265625, "load scripts/process_params.py": 0.0, "load scripts/sam.py": 0.03002762794494629, "load scripts/easy_prompt_selector.py": 0.003002643585205078, "load scripts/settings.py": 0.018015623092651367, "load scripts/setup.py": 0.0010008811950683594, "load scripts/postprocessing_rembg.py": 0.0, "load scripts/tagger.py": 0.06405782699584961, "load scripts/ldsr_model.py": 0.02101922035217285, "load scripts/lora_script.py": 0.12010931968688965, "load scripts/scunet_model.py": 0.022020339965820312, "load scripts/swinir_model.py": 0.020017623901367188, "load scripts/hotkey_config.py": 0.0, "load scripts/extra_options_section.py": 0.0, "load scripts": 4.010239601135254, "load upscalers": 0.0020020008087158203, "refresh VAE": 0.0010006427764892578, "refresh textual inversion templates": 0.0010008811950683594, "scripts list_optimizers": 0.0, "scripts list_unets": 0.0, "reload hypernetworks": 0.004004478454589844, "initialize extra networks": 0.00800633430480957, "scripts before_ui_callback": 0.0020017623901367188, "create ui": 1.2641477584838867, "gradio launch": 0.5174698829650879, "add APIs": 0.06505966186523438, "app_started_callback/tag_autocomplete_helper.py": 0.0020020008087158203, "app_started_callback/api.py": 0.0070056915283203125, "app_started_callback/openpose_editor.py": 0.0020012855529785156, "app_started_callback/reactor_api.py": 0.001001596450805664, "app_started_callback/tagger.py": 0.0030031204223632812, "app_started_callback/lora_script.py": 0.0, "app_started_callback": 0.015013694763183594 } }, "Packages": [ "-==encv-python", "-pencv-python==4.7.0.72", "absl-py==1.4.0", "accelerate==0.18.0", "addict==2.4.0", "aenum==3.1.12", "aiofiles==23.1.0", "aiohttp==3.8.4", "aiosignal==1.3.1", "albumentations==1.3.1", "altair==4.2.2", "antlr4-python3-runtime==4.9.3", "anyio==3.6.2", "astunparse==1.6.3", "async-timeout==4.0.2", "attrs==22.2.0", "basicsr==1.4.2", "beautifulsoup4==4.12.2", "bidict==0.22.1", "bitsandbytes==0.35.4", "blendmodes==2022", "blis==0.7.9", "boltons==23.0.0", "cachetools==5.3.0", "catalogue==2.0.8", "certifi==2023.7.22", "cffi==1.15.1", "chardet==4.0.0", "charset-normalizer==3.1.0", "clean-fid==0.1.35", "click==8.1.3", "clip==1.0", "colorama==0.4.6", "coloredlogs==15.0.1", "confection==0.0.4", "contourpy==1.0.7", "controlnet-aux==0.0.3", "cssselect2==0.7.0", "cycler==0.11.0", "cymem==2.0.7", "cython==0.29.35", "dadaptation==1.5", "deepdanbooru==1.0.0", "deprecation==2.1.0", "diffusers==0.16.1", "discord-webhook==1.1.0", "dynamicprompts==0.29.0", "easydict==1.10", "einops==0.4.1", "en-core-web-sm==3.5.0", "entrypoints==0.4", "facexlib==0.3.0", "fastapi==0.94.0", "ffmpy==0.3.0", "filelock==3.11.0", "filterpy==1.4.5", "flask-cors==4.0.0", "flask-socketio==5.3.4", "flask==2.2.3", "flaskwebgui==0.3.5", "flatbuffers==23.3.3", "font-roboto==0.0.1", "fonts==0.0.3", "fonttools==4.39.3", "frozenlist==1.3.3", "fsspec==2023.4.0", "ftfy==6.1.1", "future==0.18.3", "fvcore==0.1.5.post20221221", "gast==0.4.0", "gdown==4.7.1", "gfpgan==1.3.8", "gitdb==4.0.10", "gitpython==3.1.30", "google-auth-oauthlib==0.4.6", "google-auth==2.17.3", "google-pasta==0.2.0", "gradio-client==0.5.0", "gradio==3.32.0", "groundingdino==0.1.0", "grpcio==1.53.0", "h11==0.12.0", "h5py==3.8.0", "httpcore==0.15.0", "httpx==0.24.0", "huggingface-hub==0.16.4", "humanfriendly==10.0", "idna==2.10", "ifnude==0.0.3", "imageio==2.27.0", "importlib-metadata==6.3.0", "importlib-resources==6.0.1", "inflection==0.5.1", "insightface==0.7.3", "iopath==0.1.9", "itsdangerous==2.1.2", "jax==0.4.8", "jinja2==3.1.2", "joblib==1.2.0", "jsonmerge==1.8.0", "jsonschema==4.17.3", "keras==2.12.0", "kiwisolver==1.4.4", "kornia==0.6.7", "lama-cleaner==1.2.1", "langcodes==3.3.0", "lark==1.1.2", "lazy-loader==0.2", "libclang==16.0.0", "lightning-utilities==0.8.0", "linkify-it-py==2.0.0", "lion-pytorch==0.0.7", "llvmlite==0.39.1", "lmdb==1.4.1", "loguru==0.7.0", "lpips==0.1.4", "lxml==4.9.2", "markdown-it-py==2.2.0", "markdown==3.4.3", "markupsafe==2.1.2", "matplotlib==3.7.1", "mdit-py-plugins==0.3.3", "mdurl==0.1.2", "mediapipe==0.10.7", "ml-dtypes==0.1.0", "mpmath==1.3.0", "multidict==6.0.4", "murmurhash==1.0.9", "mypy-extensions==1.0.0", "networkx==3.1", "numba==0.56.4", "numpy==1.23.5", "oauthlib==3.2.2", "omegaconf==2.2.3", "onnx==1.14.0", "onnxruntime-gpu==1.14.1", "onnxruntime==1.16.1", "open-clip-torch==2.20.0", "opencv-contrib-python==4.7.0.72", "opencv-python-headless==4.7.0.72", "opencv-python==4.8.1.78", "opt-einsum==3.3.0", "orjson==3.8.10", "packaging==23.1", "pandas==2.0.0", "pathy==0.10.1", "piexif==1.1.3", "pillow==9.5.0", "pip==23.1.2", "platformdirs==3.11.0", "pooch==1.7.0", "portalocker==2.7.0", "preshed==3.0.8", "prettytable==3.8.0", "protobuf==3.20.3", "psutil==5.9.5", "py-cpuinfo==9.0.0", "pyasn1-modules==0.2.8", "pyasn1==0.4.8", "pycocotools==2.0.6", "pycparser==2.21", "pydantic==1.10.9", "pydub==0.25.1", "pygments==2.15.1", "pymatting==1.1.10", "pyparsing==3.0.9", "pyre-extensions==0.0.29", "pyreadline3==3.4.1", "pyrsistent==0.19.3", "pysocks==1.7.1", "python-dateutil==2.8.2", "python-engineio==4.4.1", "python-multipart==0.0.6", "python-socketio==5.8.0", "pytorch-lightning==1.9.4", "pytz==2023.3", "pywavelets==1.4.1", "pywin32==306", "pyyaml==6.0", "qudida==0.0.4", "realesrgan==0.3.0", "regex==2023.3.23", "rembg==2.0.38", "reportlab==3.6.12", "requests-oauthlib==1.3.1", "requests==2.31.0", "resize-right==0.0.2", "rich==13.4.2", "rsa==4.9", "safetensors==0.3.1", "scikit-image==0.20.0", "scikit-learn==1.2.2", "scipy==1.10.1", "seaborn==0.12.2", "segment-anything==1.0", "semantic-version==2.10.0", "send2trash==1.8.0", "sentencepiece==0.1.98", "sentry-sdk==1.22.2", "setuptools==57.4.0", "simple-websocket==0.10.1", "six==1.16.0", "smart-open==6.3.0", "smmap==5.0.0", "sniffio==1.3.0", "sounddevice==0.4.6", "soupsieve==2.4", "spacy-legacy==3.0.12", "spacy-loggers==1.0.4", "spacy==3.5.3", "srsly==2.4.6", "starlette==0.26.1", "supervision==0.6.0", "svglib==1.5.1", "sympy==1.12", "tabulate==0.9.0", "tb-nightly==2.13.0a20230414", "tensorboard-data-server==0.7.0", "tensorboard-plugin-wit==1.8.1", "tensorboard==2.12.0", "tensorflow-estimator==2.12.0", "tensorflow-intel==2.12.0", "tensorflow-io-gcs-filesystem==0.31.0", "tensorflow-io==0.31.0", "tensorflow==2.12.0", "termcolor==2.2.0", "thinc==8.1.10", "thop==0.1.1.post2209072238", "threadpoolctl==3.1.0", "tifffile==2023.4.12", "timm==0.6.7", "tinycss2==1.2.1", "tokenizers==0.13.3", "tomesd==0.1.2", "toolz==0.12.0", "torch==1.13.1+cu116", "torchaudio==0.13.0+cu116", "torchdiffeq==0.2.3", "torchmetrics==0.11.4", "torchsde==0.2.5", "torchvision==0.14.1+cu116", "tqdm==4.64.1", "trampoline==0.1.2", "transformers==4.25.1", "typer==0.7.0", "typing-extensions==4.5.0", "typing-inspect==0.9.0", "tzdata==2023.3", "uc-micro-py==1.0.1", "ultralytics==8.0.199", "urllib3==1.26.15", "uvicorn==0.21.1", "wasabi==1.1.1", "wcwidth==0.2.6", "webencodings==0.5.1", "websockets==11.0.1", "webuiapi==0.7.0", "werkzeug==2.2.3", "wheel==0.40.0", "whichcraft==0.6.1", "win32-setctime==1.1.0", "wrapt==1.14.1", "wsproto==1.2.0", "xformers==0.0.20", "yacs==0.1.8", "yapf==0.32.0", "yarl==1.8.2", "zipp==3.15.0" ] }

What browsers do you use to access the UI ?

Google Chrome, Other

Console logs

venv "D:\NEW\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
Version: v1.5.2
Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c

Requirement already satisfied: onnxruntime-gpu in d:\new\stable-diffusion-webui\venv\lib\site-packages (1.14.1)
Requirement already satisfied: coloredlogs in d:\new\stable-diffusion-webui\venv\lib\site-packages (from onnxruntime-gpu) (15.0.1)
Requirement already satisfied: flatbuffers in d:\new\stable-diffusion-webui\venv\lib\site-packages (from onnxruntime-gpu) (23.3.3)
Requirement already satisfied: numpy>=1.21.6 in d:\new\stable-diffusion-webui\venv\lib\site-packages (from onnxruntime-gpu) (1.23.5)
Requirement already satisfied: packaging in d:\new\stable-diffusion-webui\venv\lib\site-packages (from onnxruntime-gpu) (23.1)
Requirement already satisfied: protobuf in d:\new\stable-diffusion-webui\venv\lib\site-packages (from onnxruntime-gpu) (3.20.3)
Requirement already satisfied: sympy in d:\new\stable-diffusion-webui\venv\lib\site-packages (from onnxruntime-gpu) (1.12)
Requirement already satisfied: humanfriendly>=9.1 in d:\new\stable-diffusion-webui\venv\lib\site-packages (from coloredlogs->onnxruntime-gpu) (10.0)
Requirement already satisfied: mpmath>=0.19 in d:\new\stable-diffusion-webui\venv\lib\site-packages (from sympy->onnxruntime-gpu) (1.3.0)
Requirement already satisfied: pyreadline3 in d:\new\stable-diffusion-webui\venv\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime-gpu) (3.4.1)
ReActor preheating... Device: CUDA

        +---------------------------------+
        --- PLEASE, RESTART the Server! ---
        +---------------------------------+

loading WD14-tagger reqs from D:\NEW\stable-diffusion-webui\extensions\stable-diffusion-webui-wd14-tagger\requirements.txt
Checking WD14-tagger requirements.

Launching Web UI with arguments: --no-half-vae --autolaunch --xformers --api
No SDP backend available, likely because you are running in pytorch versions < 2.0. In fact, you are using PyTorch 1.13.1+cu116. You might want to consider upgrading.
==============================================================================
You are running torch 1.13.1+cu116.
The program is tested to work with torch 2.0.0.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer initialized. version: 23.11.0, num models: 9
[lora-prompt-tool] Get Custom Model Folder
[AddNet] Updating model hashes...
100%|████████████████████████████████████████████████████████████████████████████████| 32/32 [00:00<00:00, 6393.15it/s]
[AddNet] Updating model hashes...
100%|████████████████████████████████████████████████████████████████████████████████| 32/32 [00:00<00:00, 7994.38it/s]
2023-11-07 20:16:34,425 - ControlNet - INFO - ControlNet v1.1.416
ControlNet preprocessor location: D:\NEW\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-11-07 20:16:34,522 - ControlNet - INFO - ControlNet v1.1.416
20:16:35 - ReActor - STATUS - Running v0.5.0-b1
== WD14 tagger /gpu:0, uname_result(system='Windows', node='DESKTOP-4G9QRR0', release='10', version='10.0.22621', machine='AMD64') ==
Loading weights [bff4610d23] from D:\NEW\stable-diffusion-webui\models\Stable-diffusion\epicrealism_naturalSin.safetensors
Creating model from config: D:\NEW\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Scanning <DirEntry 'deepdanbooru-v4-20200814-sgd-e30'> as deepdanbooru project
DiffusionWrapper has 859.52 M params.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 19.2s (launcher: 7.7s, import torch: 3.6s, import gradio: 0.5s, setup paths: 0.5s, other imports: 0.8s, list SD models: 0.2s, load scripts: 4.0s, create ui: 1.3s, gradio launch: 0.5s).
Applying attention optimization: xformers... done.
Model loaded in 5.1s (load weights from disk: 0.8s, create model: 1.1s, apply weights to model: 2.1s, apply half(): 0.4s, move model to device: 0.6s).
2023-11-08 22:30:45,795 - ControlNet - WARNING - [dw_openpose_full.processor_res] Invalid value(-1), using default value 512.
2023-11-08 22:30:46,044 - ControlNet - INFO - Loading model: control_v11p_sd15_openpose_fp16 [73c2b67d]
2023-11-08 22:30:46,074 - ControlNet - INFO - Loaded state_dict from [D:\NEW\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd15_openpose_fp16.safetensors]
2023-11-08 22:30:46,074 - ControlNet - INFO - controlnet_default_config
2023-11-08 22:30:47,702 - ControlNet - INFO - ControlNet model control_v11p_sd15_openpose_fp16 [73c2b67d] loaded.
2023-11-08 22:30:47,768 - ControlNet - INFO - Loading preprocessor: dw_openpose_full
2023-11-08 22:30:47,768 - ControlNet - INFO - preprocessor resolution = 512
2023-11-08 22:30:48,021 - ControlNet - INFO - Loading model: control_v11p_sd15_inpaint_fp16 [be8bc0ed]
2023-11-08 22:30:48,048 - ControlNet - INFO - Loaded state_dict from [D:\NEW\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd15_inpaint_fp16.safetensors]
2023-11-08 22:30:48,048 - ControlNet - INFO - controlnet_default_config
2023-11-08 22:30:49,741 - ControlNet - INFO - ControlNet model control_v11p_sd15_inpaint_fp16 [be8bc0ed] loaded.
2023-11-08 22:30:49,807 - ControlNet - INFO - using inpaint as input
2023-11-08 22:30:49,824 - ControlNet - WARNING - A1111 inpaint and ControlNet inpaint duplicated. ControlNet support enabled.
2023-11-08 22:30:49,824 - ControlNet - INFO - Loading preprocessor: inpaint
2023-11-08 22:30:49,825 - ControlNet - INFO - preprocessor resolution = 512
2023-11-08 22:30:49,857 - ControlNet - INFO - ControlNet Hooked - Time = 4.1257452964782715
purged
100%|██████████████████████████████████████████████████████████████████████████████████| 31/31 [00:08<00:00,  3.80it/s]
purgedprogress: 883it [26:03:45,  1.18it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 31/31 [00:08<00:00,  3.56it/s]
purgedprogress: 914it [26:03:54,  4.10it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 31/31 [00:07<00:00,  3.93it/s]
purgedprogress: 945it [26:04:03,  4.17it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 31/31 [00:08<00:00,  3.56it/s]
Total progress: 976it [26:04:12,  3.36it/s]

Additional information

No response

missionfloyd commented 7 months ago

"batch_size": 1, "n_iter": 4,

Try setting batch_size to 4 and leaving n_iter out. You don't need all the parameters, just the one's you're using.

bigmover commented 5 months ago

"batch_size": 1, "n_iter": 4,

Try setting batch_size to 4 and leaving n_iter out. You don't need all the parameters, just the one's you're using.

@missionfloyd hi guys! Your work is awesome. But something confused me. I tried img2img api on webui with adetailer. But I found it‘s less effective when 'batch_size' is assigned to 2 than 1. Is there some advice on it? Thanks!