blackify and rerun frontend build

This commit is contained in:
Lincoln Stein 2023-08-31 10:35:17 -04:00
parent 35ac8e78bd
commit b567d65032
13 changed files with 65 additions and 68 deletions

View File

@ -215,10 +215,7 @@ class InvokeAIDiffuserComponent:
dim=0, dim=0,
), ),
} }
( (encoder_hidden_states, encoder_attention_mask,) = self._concat_conditionings_for_batch(
encoder_hidden_states,
encoder_attention_mask,
) = self._concat_conditionings_for_batch(
conditioning_data.unconditioned_embeddings.embeds, conditioning_data.unconditioned_embeddings.embeds,
conditioning_data.text_embeddings.embeds, conditioning_data.text_embeddings.embeds,
) )
@ -280,10 +277,7 @@ class InvokeAIDiffuserComponent:
wants_cross_attention_control = len(cross_attention_control_types_to_do) > 0 wants_cross_attention_control = len(cross_attention_control_types_to_do) > 0
if wants_cross_attention_control: if wants_cross_attention_control:
( (unconditioned_next_x, conditioned_next_x,) = self._apply_cross_attention_controlled_conditioning(
unconditioned_next_x,
conditioned_next_x,
) = self._apply_cross_attention_controlled_conditioning(
sample, sample,
timestep, timestep,
conditioning_data, conditioning_data,
@ -291,10 +285,7 @@ class InvokeAIDiffuserComponent:
**kwargs, **kwargs,
) )
elif self.sequential_guidance: elif self.sequential_guidance:
( (unconditioned_next_x, conditioned_next_x,) = self._apply_standard_conditioning_sequentially(
unconditioned_next_x,
conditioned_next_x,
) = self._apply_standard_conditioning_sequentially(
sample, sample,
timestep, timestep,
conditioning_data, conditioning_data,
@ -302,10 +293,7 @@ class InvokeAIDiffuserComponent:
) )
else: else:
( (unconditioned_next_x, conditioned_next_x,) = self._apply_standard_conditioning(
unconditioned_next_x,
conditioned_next_x,
) = self._apply_standard_conditioning(
sample, sample,
timestep, timestep,
conditioning_data, conditioning_data,

View File

@ -562,14 +562,18 @@ def rgb2ycbcr(img, only_y=True):
if only_y: if only_y:
rlt = np.dot(img, [65.481, 128.553, 24.966]) / 255.0 + 16.0 rlt = np.dot(img, [65.481, 128.553, 24.966]) / 255.0 + 16.0
else: else:
rlt = np.matmul( rlt = (
np.matmul(
img, img,
[ [
[65.481, -37.797, 112.0], [65.481, -37.797, 112.0],
[128.553, -74.203, -93.786], [128.553, -74.203, -93.786],
[24.966, 112.0, -18.214], [24.966, 112.0, -18.214],
], ],
) / 255.0 + [16, 128, 128] )
/ 255.0
+ [16, 128, 128]
)
if in_img_type == np.uint8: if in_img_type == np.uint8:
rlt = rlt.round() rlt = rlt.round()
else: else:
@ -588,14 +592,18 @@ def ycbcr2rgb(img):
if in_img_type != np.uint8: if in_img_type != np.uint8:
img *= 255.0 img *= 255.0
# convert # convert
rlt = np.matmul( rlt = (
np.matmul(
img, img,
[ [
[0.00456621, 0.00456621, 0.00456621], [0.00456621, 0.00456621, 0.00456621],
[0, -0.00153632, 0.00791071], [0, -0.00153632, 0.00791071],
[0.00625893, -0.00318811, 0], [0.00625893, -0.00318811, 0],
], ],
) * 255.0 + [-222.921, 135.576, -276.836] )
* 255.0
+ [-222.921, 135.576, -276.836]
)
if in_img_type == np.uint8: if in_img_type == np.uint8:
rlt = rlt.round() rlt = rlt.round()
else: else:
@ -618,14 +626,18 @@ def bgr2ycbcr(img, only_y=True):
if only_y: if only_y:
rlt = np.dot(img, [24.966, 128.553, 65.481]) / 255.0 + 16.0 rlt = np.dot(img, [24.966, 128.553, 65.481]) / 255.0 + 16.0
else: else:
rlt = np.matmul( rlt = (
np.matmul(
img, img,
[ [
[24.966, 112.0, -18.214], [24.966, 112.0, -18.214],
[128.553, -74.203, -93.786], [128.553, -74.203, -93.786],
[65.481, -37.797, 112.0], [65.481, -37.797, 112.0],
], ],
) / 255.0 + [16, 128, 128] )
/ 255.0
+ [16, 128, 128]
)
if in_img_type == np.uint8: if in_img_type == np.uint8:
rlt = rlt.round() rlt = rlt.round()
else: else:

View File

@ -475,10 +475,7 @@ class TextualInversionDataset(Dataset):
if self.center_crop: if self.center_crop:
crop = min(img.shape[0], img.shape[1]) crop = min(img.shape[0], img.shape[1])
( (h, w,) = (
h,
w,
) = (
img.shape[0], img.shape[0],
img.shape[1], img.shape[1],
) )

View File

@ -1,4 +1,4 @@
import{x as m,h1 as Ze,w as y,Z as Ya,h2 as Za,a8 as ua,ac as d,h3 as b,h4 as o,h5 as Ja,h6 as h,h7 as fa,h8 as Qa,h9 as eo,aF as ro,ha as ao,a5 as oo,hb as to}from"./index-3a52d467.js";import{s as ha,n as t,t as io,o as ma,p as no,q as ga,v as ya,w as pa,x as lo,y as Sa,z as xa,A as xr,B as so,D as co,E as bo,F as $a,G as ka,H as _a,J as vo,K as wa,L as uo,M as fo,N as ho,O as mo,Q as za,R as go,S as yo,T as po,U as So,V as xo,W as $o,e as ko,X as _o}from"./menu-0ce947db.js";var Ca=String.raw,Aa=Ca` import{x as m,h1 as Ze,w as y,Z as Ya,h2 as Za,a8 as ua,ac as d,h3 as b,h4 as o,h5 as Ja,h6 as h,h7 as fa,h8 as Qa,h9 as eo,aF as ro,ha as ao,a5 as oo,hb as to}from"./index-08cda350.js";import{s as ha,n as t,t as io,o as ma,p as no,q as ga,v as ya,w as pa,x as lo,y as Sa,z as xa,A as xr,B as so,D as co,E as bo,F as $a,G as ka,H as _a,J as vo,K as wa,L as uo,M as fo,N as ho,O as mo,Q as za,R as go,S as yo,T as po,U as So,V as xo,W as $o,e as ko,X as _o}from"./menu-3d10c968.js";var Ca=String.raw,Aa=Ca`
:root, :root,
:host { :host {
--chakra-vh: 100vh; --chakra-vh: 100vh;

View File

@ -12,7 +12,7 @@
margin: 0; margin: 0;
} }
</style> </style>
<script type="module" crossorigin src="./assets/index-3a52d467.js"></script> <script type="module" crossorigin src="./assets/index-08cda350.js"></script>
</head> </head>
<body dir="ltr"> <body dir="ltr">