1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

[fix] pipeline_unclip generator (#1751)

* [fix] pipeline_unclip generator

pass generator to all schedulers

* fix fast tests test data
This commit is contained in:
Will Berman
2022-12-19 01:27:18 -08:00
committed by GitHub
parent 2dcf64b72a
commit 830a9d1f01
2 changed files with 10 additions and 10 deletions

View File

@@ -292,7 +292,7 @@ class UnCLIPPipeline(DiffusionPipeline):
# compute the previous noisy sample x_t -> x_t-1
decoder_latents = self.decoder_scheduler.step(
noise_pred, t, decoder_latents, prev_timestep=prev_timestep
noise_pred, t, decoder_latents, prev_timestep=prev_timestep, generator=generator
).prev_sample
decoder_latents = decoder_latents.clamp(-1, 1)
@@ -348,7 +348,7 @@ class UnCLIPPipeline(DiffusionPipeline):
# compute the previous noisy sample x_t -> x_t-1
super_res_latents = self.super_res_scheduler.step(
noise_pred, t, super_res_latents, prev_timestep=prev_timestep
noise_pred, t, super_res_latents, prev_timestep=prev_timestep, generator=generator
).prev_sample
image = super_res_latents

View File

@@ -233,15 +233,15 @@ class UnCLIPPipelineFastTests(unittest.TestCase):
expected_slice = np.array(
[
0.0009,
0.0011,
0.0002,
0.9962,
0.9940,
0.0002,
0.9997,
0.0003,
0.9991,
0.9967,
0.0003,
0.9997,
0.0003,
0.0004,
0.9987,
0.9989,
]
)
@@ -261,7 +261,7 @@ class UnCLIPPipelineIntegrationTests(unittest.TestCase):
def test_unclip_karlo(self):
expected_image = load_numpy(
"https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
"/karlo_v1_alpha/horse.npy"
"/unclip/karlo_v1_alpha_horse.npy"
)
pipeline = UnCLIPPipeline.from_pretrained("kakaobrain/karlo-v1-alpha")