Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

AI Art Generation Handbook/List of Issues and possible Solutions

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Here is the list of the problems that might be faced during installations and/or during normal usage of Stable Diffusion P.S 1 : Press "Ctrl" + "F" in your browser to see if you facing certain issues for fast searching P.S: If there are other error / problems that you faced during the installing / generating images, you can add your own answer here. Or put it in the Discussion tabs. General Use (1) CUDA Out of Memory DescriptionsAffected Web-UI / SystemAutomatic 1111 / WindowsError messageDepending on WebUI versions: RuntimeError:CUDA out of memory RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper__index_select)DescriptionWhen running Stable Diffusion to generate the first image, generated images would not show at all and show "Error" at where the image supposedly be appeared. When open the command shell window, error message will come out Workaround /Solution(i) Ensure the hardware requirements of VRAM (Not RAM) is 4GB and above. Optimally, recommended to buy any graphic card that supported 6GB VRAM and above. If you decide want to train the model using Dreambooth , suggest to use Google Collabs or buying the graphic card that supported 12GB VRAM or above.| (ii) In the webui-user.bat file, right click to edit the files using notepad. At the line where set " COMMANDLINE_ARGS = " , add in these parameters " --xformers " and " --medvram " and " --opt-split-attention " to reduce further the VRAM needed BUT it will added the processing time. (2) Images does not show up on image view panels after generated images DescriptionsAffected Web-UI / SystemAutomatic 1111 / WindowsError messageAttributeError: 'Blocks' object has no attribute 'temp_file_sets' on the command shell windowDescriptionThis error message appeared during the update of Automatic 1111 (Jan 2023 update) with Dreambooth installed successfully where the image generated are not shown on the image preview gallery on the right panel. Further troubleshooting revealed that there are error message (shown above) that are suspected to be root cause of this issuesWorkaround /SolutionAt the moment, to review your imgages , need to go to C:Your_Installed_Locations\stable-diffusion-webui\outputs to manually review the generated AI images. Pending for Automatic 1111 to fix the issues (3) Web-UI did not detect base model for AI art generations DescriptionsAffected Web-UI / System Automatic 1111 / WindowsError messageNo checkpoints found. When searching for checkpoints, looked at: - file C:\Your_Installed_Locations\stable-diffusion-webui\model.ckpt - directory C:\Your_Installed_Locations\stable-diffusion-webui\models\Stable-diffusion Can't run without a checkpoint. Find and place a .ckpt file into any of those locations. The program will exit. on the command shell windowDescriptionThis error message appeared during the installation of Stable Diffusions for the first time on the system itself.Workaround /SolutionDownload the models from the link here https://huggingface.co/runwayml/stable-diffusion-v1-5/tree/main and copy the models (.ckpt) files to the C:\Your_Installed_Locations\stable-diffusion-webui\models\Stable-diffusion (4) Unable to generate images - TypeError: 'NoneType' object is not callable DescriptionsAffected Web-UI / System SD.Next with SDXL Model/ WindowsError messageTypeError: 'NoneType' object is not callableDescriptionThis error message appeared when want to generate AI images with the images unable to be generatedWorkaround /SolutionDisable extensions named a1111-sd-webui-lycoris by untick it on the left side and update to latest patch whenever available (Aug 2023) SDXL related (1) Web-UI generates only black images (For SDXL models) DescriptionsAffected Web-UI / System SD.Next with SDXL Model/ WindowsError messageError loading model weights:                          C:\Your_installed_directory\SD.Next\automatic\models\Stable-diffusion\sd_xl_base_1.0.safe                          tensors Error(s) in loading state_dict for LatentDiffusion:                                  size mismatch for model.diffusion_model.input_blocks.4.1.proj_in.weight: copying a                          param with shape torch.Size([640, 640]) from checkpoint, the shape in current model is                          torch.Size([640, 640, 1, 1]).                                  size mismatch for                          model.diffusion_model.input_blocks.4.1.transformer_blocks.0.attn2.to_k.weight: copying a param                          with shape torch.Size([640, 2048]) from checkpoint, the shape in current model is                          torch.Size([640, 768]).DescriptionWhen you want to try the latest Stable Diffusion SDXL model, it will just generate black images onlyWorkaround /SolutionOn the tab , click on Settings top tab , User Interface at the right side , scroll down to the Quicksettings list . Add in by typing sd_model_checkpoint , sd_model_refiner , diffuser pipeline and sd_backend . Scroll back to top to click on Apply Settings .and then click Restart Server button . (But highly suggest to close all of terminal windows ) and re-click webui.bat Once clicked, you should be re-directed back to the main page . (2) Web-UI generates only cartoon abstract art / line art image although you try to generate photographs like image DescriptionsAffected Web-UI / System Auto1111 with SDXL Model, SD.Next with SDXL Model/ WindowsError messageN/ADescriptionWhen you want to try the latest Stable Diffusion SDXL model, it will just generate cartoony or at worst imagesWorkaround /Solution(i) Generate the image more than 512*512px size (See this link > AI Art Generation Handbook/Differing Resolution for SDXL ) . For most optimum result, choose 1024 * 1024 px images (ii) Use negative prompts such as cartoon , anime , drawings to enhance the photorealism (if you want to achieve it) ControlNet (1) ControlNet Canny is generating a cartoony images DescriptionsAffected Web-UI / System Auto1111 with SDXL Model, ControlNet Canny XLError messageRuntimeError: You have not selected any ControlNet Model.DescriptionWhen you want to try to generate a Canny preprocessed but it is generating cartoonish imagesWorkaround /Solution(1) Lower down the weight seems helpful (more testing needed) (2) mat1 and mat2 shapes cannot be multiplied (154x2048 and 768x320) DescriptionsAffected Web-UI / System Auto1111 with SDXL Model, ControlNet_sd15Error messagemat1 and mat2 shapes cannot be multiplied (154x2048 and 768x320)DescriptionImages unable to be generated and the error message RuntimeError: mat1 and mat2 shapes cannot be multiplied (154x2048 and 768x320) is shown on the webui and terminal Workaround /Solution(i) Ensure the Stable Diffusion Checkpoint(on top left) and ControlNet model (beside Preprocessor) should be same. (Meaning if base model is SDXL , ensure ControlNet is also same SDXL) Captioning (1) When using webp images , error message with O with slash above O will appear DescriptionsAffected Web-UI / System Automatic 1111 / WindowsError message  File "C:\Your_Installed_Locations\Python\Python310\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u014d' in position 118: character maps to <undefined> on the command shell windowDescriptionIf you captioning on webp image format, it might appeared from time to timeWorkaround /Solution(i) Try to convert the images to png and retry captioning (ii) If errors persists, use other images instead (iii) Wait for Automatic1111 to fix the issues Installation (1) Pytorch / Torch Vision error when installing Auto1111 DescriptionsAffected Web-UI / SystemAutomatic 1111 / WindowsError messageRuntimeError: Couldn't install torchstderr: ERROR: Could not find a version that satisfies the requirement torch==x.xx.x +cu yyy (from versions: none) ERROR: No matching distribution found for torch==x.xx.x +cu yyy on the command shell windowDescriptionThis error message appeared during/after the installation of Stable Diffusions for the first time on the system itself. The Web-UI unable to load and the error message closes itself. Futher troubleshooting leads to Pytorch / Torch Vision are unable to caught up to the latest version of Pyton. Workaround / Solution(i) Type the cmd command at the Your_Installation_Locations and type python --version .Check back on the software pre-requisites and see if the Python version number is higher than the recommended version. If higher, recommended to download and re-install the same version as of recommended Python version (3.10.9) or can try to dial back a few versions backward. (ii) If error persists after step (i), delete the venv folder aka C:\Your_Installed_Locations\stable-diffusion-webui\venv and restart the Web-UI (click webui-user.bat) to re-generate the Python Environment due to conflict merging Note: Pytorch development usually are not able to caught onto the latest version of Python. Extension (1) Extension lists is not loading DescriptionsAffected Web-UI / SystemAutomatic 1111 / WindowsError messageValueError: unknown url type: '' [object Object] on theweb-ui TypeError: unhashable type: 'dict' on the command shell window DescriptionWhen want to add extension, the lists is empty, when it is supposedly full Workaround / Solution(i) Restart the whole web-ui (ii) If error persisted, check for values in Extension -> Available -> Extension index URL . If the URL field is empty , copy this field below and click Load From button : https://raw.githubusercontent.com/wiki/AUTOMATIC1111/stable-diffusion-webui/Extensions-index.md (2) Extension not updating DescriptionsAffected Web-UI / SystemAutomatic 1111 / WindowsError messageUpdate: Unknown on the web-ui shown DescriptionThis error is applicable if you installed dreambooth Workaround / Solution(i) Delete all the extensions installed in ControlnetDreamboothStableDiffusion\stable-diffusion-webui\extensions (ii) Restart the web-ui (iii) Reinstall all of previous extension but DO NOT install dreambooth Dreambooth 30x30px|Znak A-30 As of this moment, training using Dreambooth extension for A1111 are not encouraged to be used as it is bug breaking. Recommend to use kohya-ss (1) Dreambooth installation error / Dreambooth not appearing on the main page tabs DescriptionsAffected Web-UI / System Automatic 1111 / WindowsError messageDepending on the Automatic1111 versions, you may unable to proceed with Stable Diffusion with the following error messages ImportError: DLL load failed while importing _ufuncs: %1 is not a valid Win32 application Error loading script: api.py Error loading script: dreambooth.py Error loading script: main.pyDescriptionDepending on the Automatic1111 version, several symptoms may appeared: (i) Web-UI is unable to be opened at all and shows ImportError message in Command Windows (ii) After installing Dreambooth in the Automatic1111, there are no tabs "Dreambooth" appeared between Training and Setting tab.Workaround /SolutionRe-install the whole Stable Diffusion from scratch [ See this link for step by step details ] and make sure that folder name (aka "Your_Installed_Locations") should NOT HAVE ANY EMPTY SPACES in the folder naming NG E.g: "Stable Diffusion Dreambooth" is 10x10px|Cross-image (Unless you intend to generate images only) OK E.g: "StableDiffusionDreambooth" or "Stable_Diffusion_Dreambooth" is 10x10px|Tick, Web Fundamentals or delete the venv folder aka C:\Your_Installed_Locations\stable-diffusion-webui\venv and restart the Web-UI (click webui-user.bat) to re-generate the Python Environment due to conflict merging or pending for Automatic1111 to provide fix in future versions(2) File Not found when installing Dreambooth DescriptionsAffected Web-UI / System Automatic 1111 / WindowsError messagestderr: ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Your_Installed_Locations\\stable-diffusion-webui\\venv\\Lib\\site-packages\\tensorflow\\include\\external\\llvm-project\\mlir\\_virtual_includes\\BufferizableOpInterfaceIncGen\\mlir\\Dialect\\Bufferization\\IR\\BufferizableOpInterface.cpp.inc'HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-pathsDescriptionWhen installing Dreambooth for Stable Diffusion, the above messages may occursWorkaround /Solution(i) Create a .reg files on any where at the PC system (ii) Paste following codes inside the .reg file Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] "LongPathsEnabled"=dword:00000001 (iii) Double click the .reg file to execute (iv) Re-install the Web-UI from scratch (3) Invalid training data directory. DescriptionsAffected Web-UI / System Automatic 1111 / WindowsError messageInvalid training data directory.DescriptionWhen want to click Training button in Dreambooth tab for Stable Diffusion, the above messages may occursWorkaround /SolutionMake sure before training, the button "Create Model" in Create tab must be clicked before proceed to train the model (4) Pip Installation Error DescriptionsAffected Web-UI / System Automatic 1111 / WindowsError messageFatal error in launcher: Unable to create process using '"Your Installation Directory\venv\Scripts\python.exe" .DescriptionWhen installing the latest version of dreambooth which requires Torch 2, you encounter the following error while following instructions from this Github linkWorkaround /SolutionIt meant that your pip version is not upgraded to Torch 2 installation requirements To resolve this, type this before start the command listed on the link python -m ensurepip --upgrade python -m pip install --upgrade pip ComfyUI DescriptionsAffected Web-UI / System ComfyUI / WindowsError messageWhen launching, this error message appeared at the bottom of the terminal screen OSError: [Errno 10048] error while attempting to bind on address ('127.0.0.1', 8188): only one usage of each socket address (protocol/network address/port) is normally permittedDescriptionYou encounter this message when you want to turn on ComfyUI for the first time.Workaround /SolutionCheck the web browser to see if other local UI that also uses address 127.0.0.1is open . If open, close the tab , and re-run again.