Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
79fd17ee
Commit
79fd17ee
authored
Aug 22, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unneeded example_inputs from gradio config
parent
7a3a6e38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
modules/gradio_extensons.py
modules/gradio_extensons.py
+18
-7
No files found.
modules/gradio_extensons.py
View file @
79fd17ee
import
gradio
as
gr
from
modules
import
scripts
,
ui_tempdir
from
modules
import
scripts
,
ui_tempdir
,
patches
def
add_classes_to_gradio_component
(
comp
):
"""
...
...
@@ -40,6 +41,8 @@ def Block_get_config(self):
if
webui_tooltip
:
config
[
"webui_tooltip"
]
=
webui_tooltip
config
.
pop
(
'example_inputs'
,
None
)
return
config
...
...
@@ -51,12 +54,20 @@ def BlockContext_init(self, *args, **kwargs):
return
res
original_IOComponent_init
=
gr
.
components
.
IOComponent
.
__init__
original_Block_get_config
=
gr
.
blocks
.
Block
.
get_config
original_BlockContext_init
=
gr
.
blocks
.
BlockContext
.
__init__
def
Blocks_get_config_file
(
self
,
*
args
,
**
kwargs
):
config
=
original_Blocks_get_config_file
(
self
,
*
args
,
**
kwargs
)
for
comp_config
in
config
[
"components"
]:
if
"example_inputs"
in
comp_config
:
comp_config
[
"example_inputs"
]
=
{
"serialized"
:
[]}
return
config
original_IOComponent_init
=
patches
.
patch
(
__name__
,
obj
=
gr
.
components
.
IOComponent
,
field
=
"__init__"
,
replacement
=
IOComponent_init
)
original_Block_get_config
=
patches
.
patch
(
__name__
,
obj
=
gr
.
blocks
.
Block
,
field
=
"get_config"
,
replacement
=
Block_get_config
)
original_BlockContext_init
=
patches
.
patch
(
__name__
,
obj
=
gr
.
blocks
.
BlockContext
,
field
=
"__init__"
,
replacement
=
BlockContext_init
)
original_Blocks_get_config_file
=
patches
.
patch
(
__name__
,
obj
=
gr
.
blocks
.
Blocks
,
field
=
"get_config_file"
,
replacement
=
Blocks_get_config_file
)
gr
.
components
.
IOComponent
.
__init__
=
IOComponent_init
gr
.
blocks
.
Block
.
get_config
=
Block_get_config
gr
.
blocks
.
BlockContext
.
__init__
=
BlockContext_init
ui_tempdir
.
install_ui_tempdir_override
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment