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
500de919
Commit
500de919
authored
Nov 26, 2023
by
AUTOMATIC1111
Committed by
GitHub
Nov 26, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14108 from AUTOMATIC1111/json.dump(ensure_ascii=False)
json.dump(ensure_ascii=False)
parents
2a40d3c6
a15dd151
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
modules/cache.py
modules/cache.py
+1
-1
modules/options.py
modules/options.py
+1
-1
modules/ui_extensions.py
modules/ui_extensions.py
+1
-1
modules/ui_extra_networks_user_metadata.py
modules/ui_extra_networks_user_metadata.py
+1
-1
modules/ui_loadsave.py
modules/ui_loadsave.py
+1
-1
No files found.
modules/cache.py
View file @
500de919
...
...
@@ -32,7 +32,7 @@ def dump_cache():
with
cache_lock
:
cache_filename_tmp
=
cache_filename
+
"-"
with
open
(
cache_filename_tmp
,
"w"
,
encoding
=
"utf8"
)
as
file
:
json
.
dump
(
cache_data
,
file
,
indent
=
4
)
json
.
dump
(
cache_data
,
file
,
indent
=
4
,
ensure_ascii
=
False
)
os
.
replace
(
cache_filename_tmp
,
cache_filename
)
...
...
modules/options.py
View file @
500de919
...
...
@@ -158,7 +158,7 @@ class Options:
assert
not
cmd_opts
.
freeze_settings
,
"saving settings is disabled"
with
open
(
filename
,
"w"
,
encoding
=
"utf8"
)
as
file
:
json
.
dump
(
self
.
data
,
file
,
indent
=
4
)
json
.
dump
(
self
.
data
,
file
,
indent
=
4
,
ensure_ascii
=
False
)
def
same_type
(
self
,
x
,
y
):
if
x
is
None
or
y
is
None
:
...
...
modules/ui_extensions.py
View file @
500de919
...
...
@@ -65,7 +65,7 @@ def save_config_state(name):
filename
=
os
.
path
.
join
(
config_states_dir
,
f
"{timestamp}_{name}.json"
)
print
(
f
"Saving backup of webui/extension state to {filename}."
)
with
open
(
filename
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
json
.
dump
(
current_config_state
,
f
,
indent
=
4
)
json
.
dump
(
current_config_state
,
f
,
indent
=
4
,
ensure_ascii
=
False
)
config_states
.
list_config_states
()
new_value
=
next
(
iter
(
config_states
.
all_config_states
.
keys
()),
"Current"
)
new_choices
=
[
"Current"
]
+
list
(
config_states
.
all_config_states
.
keys
())
...
...
modules/ui_extra_networks_user_metadata.py
View file @
500de919
...
...
@@ -134,7 +134,7 @@ class UserMetadataEditor:
basename
,
ext
=
os
.
path
.
splitext
(
filename
)
with
open
(
basename
+
'.json'
,
"w"
,
encoding
=
"utf8"
)
as
file
:
json
.
dump
(
metadata
,
file
,
indent
=
4
)
json
.
dump
(
metadata
,
file
,
indent
=
4
,
ensure_ascii
=
False
)
def
save_user_metadata
(
self
,
name
,
desc
,
notes
):
user_metadata
=
self
.
get_user_metadata
(
name
)
...
...
modules/ui_loadsave.py
View file @
500de919
...
...
@@ -141,7 +141,7 @@ class UiLoadsave:
def
write_to_file
(
self
,
current_ui_settings
):
with
open
(
self
.
filename
,
"w"
,
encoding
=
"utf8"
)
as
file
:
json
.
dump
(
current_ui_settings
,
file
,
indent
=
4
)
json
.
dump
(
current_ui_settings
,
file
,
indent
=
4
,
ensure_ascii
=
False
)
def
dump_defaults
(
self
):
"""saves default values to a file unless tjhe file is present and there was an error loading default values at start"""
...
...
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