250 words
1 minutes
Stable Diffusion WebUI Forge と Easy Prompt Selector で発生するエラーを応急処置する
2025-04-12
はじめに
Stable Diffusion WebUI Forge (c055f2d43b07cbfd87ac3da4899a6d7ee52ebab9) に Easy Prompt Selector (053045eb6f1f240e557fd7271714e8718751f84f) をインストールすると、エラーが発生します。このエラーを解消するための応急処置の手順を備忘録として記録しておきます。
*** Error calling: /home/<USER_NAME>/stable-diffusion-webui-forge/extensions/sdweb-easy-prompt-selector/scripts/easy_prompt_selector.py/ui Traceback (most recent call last): File "/home/<USER_NAME>/stable-diffusion-webui-forge/modules/scripts.py", line 545, in wrap_call return func(*args, **kwargs) File "/home/<USER_NAME>/stable-diffusion-webui-forge/extensions/sdweb-easy-prompt-selector/scripts/easy_prompt_selector.py", line 98, in ui reload_button.style(size='sm') AttributeError: 'Button' object has no attribute 'style'
応急処置
作業自体は簡単です。~/stable-diffusion-webui-forge/extensions/sdweb-easy-prompt-selector/scripts/easy_prompt_selector.py をエディタで開き、97 行目の reload_button.style(size='sm')
を削除またはコメントアウトするだけです。
def show(self, is_img2img): return AlwaysVisible
def ui(self, is_img2img):if (is_img2img): return None
reload_button = gr.Button('🔄', variant='secondary', elem_id='easy_prompt_selector_reload_button')reload_button.style(size='sm')
def reload(): self.tags = load_tags() write_filename_list()
reload_button.click(fn=reload)
return [reload_button]
おわりに
Stable Diffusion WebUI Forge に Easy Prompt Selector をインストールした際に発生するエラーの応急処置について記述してきました。Easy Prompt Selector は 2 年以上コミットがないため、この不具合が修正される可能性は低いでしょう。代替の拡張機能を検討することをお勧めします。