1
0
Fork 0

remove unused schema, lint

This commit is contained in:
Sean Sube 2023-09-15 08:40:56 -05:00
parent db82c6b760
commit a71298ff33
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
8 changed files with 40 additions and 125 deletions

View File

@ -16,7 +16,7 @@ logger = getLogger(__name__)
class BlendImg2ImgStage(BaseStage):
max_tile = SizeChart.unlimited
max_tile = SizeChart.max
def run(
self,

View File

@ -22,7 +22,7 @@ logger = getLogger(__name__)
class SourceTxt2ImgStage(BaseStage):
max_tile = SizeChart.unlimited
max_tile = SizeChart.max
def run(
self,

View File

@ -24,7 +24,7 @@ logger = getLogger(__name__)
class UpscaleOutpaintStage(BaseStage):
max_tile = SizeChart.unlimited
max_tile = SizeChart.max
def run(
self,

View File

@ -543,9 +543,6 @@ def blend_loras(
if len(unmatched_keys) > 0:
logger.warning("could not find nodes for some keys: %s", unmatched_keys)
# if model_type == "unet":
# save_model(base_model, f"/tmp/lora_blend_{model_type}.onnx", save_as_external_data=True, all_tensors_to_one_file=True, location="weights.pb")
return base_model

View File

@ -24,7 +24,7 @@ class SizeChart(IntEnum):
hd16k = 2**14
hd32k = 2**15
hd64k = 2**16
unlimited = 2**32 # sort of
max = 2**32 # should be a reasonable upper limit for now
class TileOrder:

View File

@ -1,117 +0,0 @@
$id: TODO
$schema: https://json-schema.org/draft/2020-12/schema
$defs:
grid:
type: object
additionalProperties: False
required: [width, height]
width:
type: number
height:
type: number
labels:
type: object
additionalProperties: False
properties:
title:
type: string
rows:
type: array
items:
type: string
columns:
type: array
items:
type: string
order:
type: array
items: number
job_base:
type: object
additionalProperties: true
required: [
device,
model,
pipeline,
scheduler,
prompt,
cfg,
steps,
seed,
]
properties:
batch:
type: number
device:
type: string
model:
type: string
control:
type: string
pipeline:
type: string
scheduler:
type: string
prompt:
type: string
negative_prompt:
type: string
cfg:
type: number
eta:
type: number
steps:
type: number
tiled_vae:
type: boolean
tiles:
type: number
overlap:
type: number
seed:
type: number
stride:
type: number
job_txt2img:
allOf:
- $ref: "#/$defs/job_base"
- type: object
additionalProperties: False
required: [
height,
width,
]
properties:
width:
type: number
height:
type: number
job_img2img:
allOf:
- $ref: "#/$defs/job_base"
- type: object
additionalProperties: False
required: []
properties:
loopback:
type: number
type: object
additionalProperties: False
properties:
txt2img:
type: array
items:
$ref: "#/$defs/job_txt2img"
img2img:
type: array
items:
$ref: "#/$defs/job_img2img"
grid:
type: array
items:
$ref: "#/$defs/grid"

View File

@ -0,0 +1,26 @@
import unittest
from onnx_web.chain.base import ChainProgress
class ChainProgressTests(unittest.TestCase):
def test_accumulate_with_reset(self):
def parent(step, timestep, latents):
pass
progress = ChainProgress(parent)
progress(5, 1, None)
progress(0, 1, None)
progress(5, 1, None)
self.assertEqual(progress.get_total(), 10)
def test_start_value(self):
def parent(step, timestep, latents):
pass
progress = ChainProgress(parent, 5)
self.assertEqual(progress.get_total(), 5)
progress(10, 1, None)
self.assertEqual(progress.get_total(), 10)

View File

@ -150,8 +150,17 @@ class KernelSliceTests(unittest.TestCase):
(2, 2),
)
class BlendLoRATests(unittest.TestCase):
pass
def test_blend_unet(self):
pass
def test_blend_text_encoder(self):
pass
def test_blend_text_encoder_index(self):
pass
class InterpToMatchTests(unittest.TestCase):
def test_same_shape(self):