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

AttributeError: 'Slider' object has no attribute 'elem_classes' #20

Open
GrennKren opened this issue Mar 31, 2023 · 1 comment
Open

Comments

@GrennKren
Copy link

This is happen when I run Automatic1111 Webui through colab, and only when there is kohya-sd-scripts-webui in the extensions folder.

Output notebook cells
Python 3.9.16 (main, Dec  7 2022, 01:11:51) 
[GCC 9.4.0]
Commit hash: 22bcc7be428c94e9408f589966c2040187245d81
Installing requirements for Web UI



Installing requirements for kohya sd-scripts

Launching Web UI with arguments: --api --share --xformers --lowram --no-half-vae --lora-dir /content/drive/MyDrive/Colab/stable-diffusion-webui/models/Lora --ckpt-dir //content/drive/MyDrive/Colab/stable-diffusion-webui/models/Stable-diffusion --hypernetwork-dir //content/drive/MyDrive/Colab/stable-diffusion-webui/models/hypernetworks --disable-console-progressbars --enable-insecure-extension-access
2023-03-31 04:19:33.980831: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-03-31 04:19:35.040074: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2023-03-31 04:19:37.448647: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib64-nvidia
2023-03-31 04:19:37.448904: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib64-nvidia
2023-03-31 04:19:37.448930: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Loading weights [2f1e33c4bb] from /content/drive/MyDrive/Colab/stable-diffusion-webui/models/Stable-diffusion/WhiteDistance-v2-non-ema-fp32.safetensors
Creating model from config: /content/drive/MyDrive/Colab/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(10): bad_prompt, bad_prompt_version2, bad-artist-anime, bad-artist, ng_deepnegative_v1_75t, bad-hands-5, deformityv6, verybadimagenegative_v1.2-6400, discomix, verybadimagenegative_v1.3
Textual inversion embeddings skipped(2): wdgoodprompt, wdbadprompt
Model loaded in 34.1s (load weights from disk: 29.3s, create model: 1.0s, apply weights to model: 2.5s, apply half(): 0.5s, move model to device: 0.6s).
╭───────────────────── Traceback (most recent call last) ──────────────────────
│ /content/drive/MyDrive/Colab/stable-diffusion-webui/launch.py:356 in         
│ <module>                                                                     
│                                                                              
│   353                                                                        
│   354 if __name__ == "__main__":                                             
│   355 │   prepare_environment()                                              
│ ❱ 356 │   start()                                                            
│   357                                                                        
│                                                                              
│ /content/drive/MyDrive/Colab/stable-diffusion-webui/launch.py:351 in start   
│                                                                              
│   348 │   if '--nowebui' in sys.argv:                                        
│   349 │       webui.api_only()                                               
│   350 │   else:                                                              
│ ❱ 351 │      webui.webui()                                                  
│   352                                                                        
│   353                                                                        
│   354 if __name__ == "__main__":                                             
│                                                                              
│ /content/drive/MyDrive/Colab/stable-diffusion-webui/webui.py:243 in webui    
│                                                                              
│   240 │       modules.script_callbacks.before_ui_callback()                  
│   241 │        startup_timer.record("scripts before_ui_callback")             
│   242 │                                                                     
│ ❱ 243 │       shared.demo = modules.ui.create_ui()                           
│   244 │       startup_timer.record("create ui")                              
│   245 │                                                                      
│   246 │       if not cmd_opts.no_gradio_queue:                               
│                                                                              
│ /content/drive/MyDrive/Colab/stable-diffusion-webui/modules/ui.py:446 in     
│ create_ui                                                                    
│                                                                              
│    443 │   parameters_copypaste.reset()                                      
│    444 │                                                                     
│    445 │   modules.scripts.scripts_current = modules.scripts.scripts_txt2img 
│ ❱  446 │   modules.scripts.scripts_txt2img.initialize_scripts(is_img2img=Fal 
│    447 │                                                                     
│    448 │   with gr.Blocks(analytics_enabled=False) as txt2img_interface:     
│    449 │       txt2img_prompt, txt2img_prompt_styles, txt2img_negative_promp 
│                                                                             
│ /content/drive/MyDrive/Colab/stable-diffusion-webui/modules/scripts.py:298   
│ in initialize_scripts                                                        
│                                                                              
│   295 │       auto_processing_scripts = scripts_auto_postprocessing.create_a 
│   296 │                                                                      
│   297 │       for script_class, path, basedir, script_module in auto_process 
│ ❱ 298 │           script = script_class()                                    
│   299 │           script.filename = path                                     
│   300 │           script.is_txt2img = not is_img2img                         
│   301 │           script.is_img2img = is_img2img                             
│                                                                              
│ /content/drive/MyDrive/Colab/stable-diffusion-webui/extensions/sd-webui-cont 
│ rolnet/scripts/controlnet.py:127 in __init__                                 
│                                                                             
│   124 │       self.unloadable = global_state.cn_preprocessor_unloadable      
│   125 │       self.input_image = None                                        
│   126 │       self.latest_model_hash = ""                                    
│ ❱ 127 │       self.txt2img_w_slider = gr.Slider()                            
│   128 │       self.txt2img_h_slider = gr.Slider()                            
│   129 │       self.img2img_w_slider = gr.Slider()                            
│   130 │       self.img2img_h_slider = gr.Slider()                            
│                                                                              
│ /usr/local/lib/python3.9/dist-packages/gradio/components.py:662 in __init__  │
│                                                                              
│    659 │           self.step = step                                          
│    660 │       if randomize:                                                 
│    661 │           value = self.get_random_value                             
│ ❱  662 │       IOComponent.__init__(                                         
│    663 │           self,                                                     
│    664 │           label=label,                                              
│    665 │           every=every,                                              
│                                                                              
│ /content/drive/MyDrive/Colab/stable-diffusion-webui/modules/scripts.py:544   
│ in IOComponent_init                                                         
│                                                                              
│   541 │                                                                      
│   542 │   res = original_IOComponent_init(self, *args, **kwargs)             
│   543 │                                                                      
│ ❱ 544 │   add_classes_to_gradio_component(self)                              
│   545 │                                                                      
│   546 │   script_callbacks.after_component_callback(self, **kwargs)          
│   547                                                                        
│                                                                              
│ /content/drive/MyDrive/Colab/stable-diffusion-webui/modules/scripts.py:529   
│ in add_classes_to_gradio_component                                           
│                                                                              
│   526 │   this adds gradio-* to the component for css styling (ie gradio-but 
│   527 │   """                                                                
│   528 │                                                                      
│ ❱ 529 │   comp.elem_classes = ["gradio-" + comp.get_block_name(), *(comp.ele 
│   530 │                                                                      
│   531 │   if getattr(comp, 'multiselect', False):                            
│   532 │       comp.elem_classes.append('multiselect')                        
╰──────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'Slider' object has no attribute 'elem_classes'
@ddPn08
Copy link
Owner

ddPn08 commented Mar 31, 2023

I see. But this extension doesn't use elem_classes. I'll do a little research.

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

2 participants