fixup! refactor(diffusers): reduce some code duplication amongst the different tasks

This commit is contained in:
Kevin Turner 2022-12-07 18:26:08 -08:00
parent 821c7df240
commit 9bcb3b1bf7

View File

@ -36,7 +36,7 @@ class Txt2Img2Img(Generator):
def make_image(x_T): def make_image(x_T):
pipeline_output = pipeline.latents_from_embeddings( first_pass_latent_output = pipeline.latents_from_embeddings(
latents=x_T, latents=x_T,
num_inference_steps=steps, num_inference_steps=steps,
text_embeddings=c, text_embeddings=c,
@ -48,8 +48,6 @@ class Txt2Img2Img(Generator):
# TODO: threshold = threshold, # TODO: threshold = threshold,
) )
first_pass_latent_output = pipeline_output.latents
print( print(
f"\n>> Interpolating from {init_width}x{init_height} to {width}x{height} using DDIM sampling" f"\n>> Interpolating from {init_width}x{init_height} to {width}x{height} using DDIM sampling"
) )