1
0
Fork 0

lint, fix numpy error in pix2pix

This commit is contained in:
Sean Sube 2023-04-13 18:41:22 -05:00
parent 953e772a50
commit bd992398ae
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
4 changed files with 5 additions and 4 deletions

View File

@ -35,7 +35,7 @@ def blend_controlnet(
params.model,
params.scheduler,
job.get_device(),
control=None, # TODO: needs to have a ControlNet
control=None, # TODO: needs to have a ControlNet
)
rng = np.random.RandomState(params.seed)

View File

@ -310,7 +310,6 @@ def load_pipeline(
model,
provider=device.ort_provider(),
sess_options=device.sess_options(),
revision="onnx",
safety_checker=None,
torch_dtype=torch_dtype,
**components,

View File

@ -425,7 +425,7 @@ class OnnxStableDiffusionInstructPix2PixPipeline(DiffusionPipeline):
):
progress_bar.update()
if callback is not None and i % callback_steps == 0:
callback(i, t, latents.numpy())
callback(i, t, latents)
# 10. Post-processing
image = self.decode_latents(latents)

View File

@ -38,7 +38,9 @@ def get_and_clamp_int(
return min(max(int(args.get(key, default_value)), min_value), max_value)
def get_from_list(args: Any, key: str, values: Sequence[Any], default_value: Optional[Any] = None) -> Optional[Any]:
def get_from_list(
args: Any, key: str, values: Sequence[Any], default_value: Optional[Any] = None
) -> Optional[Any]:
selected = args.get(key, default_value)
if selected in values:
return selected