refactor deepfloyd if img2img pipeline tests to the new mixin structure - #14596
Conversation
| # Due to non-determinism in save load of the hf-internal-testing/tiny-random-t5 text encoder | ||
| super().test_save_load_float16(tmp_path, expected_max_diff=1e-1) |
There was a problem hiding this comment.
I think if we load it using eval() it should be fine? Could we check?
There was a problem hiding this comment.
You're right. The old base test ran the fresh components in train mode, so the tiny-random-t5 dropout was the "non-determinism"; the new get_pipeline() puts both sides in eval. Replicated the save/load flow on CPU fp32: eval both sides gives max_diff 1.7e-5, the train-mode first pipe gives 0.94. Dropped the override here and in #14580.
|
Hi @akshan-main, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice. Once the PR links an issue (or gets the |
What does this PR do?
Refactors the DeepFloyd IF img2img pipeline tests to the new mixin structure from #14113, same shape as the text-to-image port: an
IFImg2ImgPipelineTesterConfigplusTestIFImg2ImgPipeline(PipelineTesterMixin)andTestIFImg2ImgPipelineMemory(PipelineOffloadTesterMixin), slow class ported to pytest, dummy components inlined from the shared package mixin, and a fresh CPU slice intest_inference.The same verified choices as #14580 apply:
@skip_mpskept (all-NaN output on mps),latentsdropped fromoptional_input_params, the customtest_save_load_optional_componentsported (prompt pre-encoded), the obsoletesave_load_localoverride dropped, and the float16 1e-1 tolerance kept. The oldtest_float16_inferenceoverride maps to the framework'stest_half_precision_inference_no_nan, which needs no tolerance. Follows #14580.Before submitting
Who can review?
@sayakpaul