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
efa61d31
Commit
efa61d31
authored
Oct 06, 2022
by
DepFA
Committed by
AUTOMATIC1111
Oct 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use csv.reader
parent
5d0e6ab8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
scripts/xy_grid.py
scripts/xy_grid.py
+4
-5
No files found.
scripts/xy_grid.py
View file @
efa61d31
from
collections
import
namedtuple
from
copy
import
copy
from
itertools
import
permutations
from
itertools
import
permutations
,
chain
import
random
import
csv
from
io
import
StringIO
from
PIL
import
Image
import
numpy
as
np
...
...
@@ -168,8 +169,6 @@ re_range_float = re.compile(r"\s*([+-]?\s*\d+(?:.\d*)?)\s*-\s*([+-]?\s*\d+(?:.\d
re_range_count
=
re
.
compile
(
r"\s*([+-]?\s*\d+)\s*-\s*([+-]?\s*\d+)(?:\s*\[(\d+)\s*\])?\s*"
)
re_range_count_float
=
re
.
compile
(
r"\s*([+-]?\s*\d+(?:.\d*)?)\s*-\s*([+-]?\s*\d+(?:.\d*)?)(?:\s*\[(\d+(?:.\d*)?)\s*\])?\s*"
)
re_non_escaped_comma
=
re
.
compile
(
r"(?<!\\),"
)
class
Script
(
scripts
.
Script
):
def
title
(
self
):
return
"X/Y plot"
...
...
@@ -198,7 +197,7 @@ class Script(scripts.Script):
if
opt
.
label
==
'Nothing'
:
return
[
0
]
valslist
=
[
x
.
replace
(
'
\\
,'
,
','
)
.
strip
()
for
x
in
re_non_escaped_comma
.
split
(
vals
)]
valslist
=
list
(
chain
.
from_iterable
(
csv
.
reader
(
StringIO
(
s
))))
if
opt
.
type
==
int
:
valslist_ext
=
[]
...
...
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