stable-diffusion-webui-depthmap-script
stable-diffusion-webui-depthmap-script copied to clipboard
forge and gradio4 compatibility
Forge uses gradio version 4 which makes a number of breaking changes.
Some of the most noteworthy
- removal of gr.Box() replaced by gr.Group(). The padding and borders do appear differently maybe extra styling is need.
-
file
type must bebinary
instead for file loaders - significantly the depreciation of
update
on components.
Removes the deprecated .update() method from component classes. Instead, you can now just return an instance of a component from your function. I.e. return gr.Textbox(lines=4) instead of gr.Textbox.update(lines=4)
https://github.com/gradio-app/gradio/issues/6339
This led me to re-instantiating a number of components. Perhaps this can be further simplified.
I split off all the gradio4 files although maybe there's a clever way to fold them back in.