lint, fix numpy error in pix2pix
This commit is contained in:
parent
953e772a50
commit
bd992398ae
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue