-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
Description
I think we should add a IPAdapterTexterMIxin and run fast tests on every pipeline that supports IP-Adapter, so that we will be able to catch breaking changes like this #6828
some thoughts:
- we can add a
IPAdapterTexterMIxinclass totest_pipelines_common.pyhttps://github.com/huggingface/diffusers/blob/9cc59ba0891c3ccbebfcbb6784f4dde2d5bd8556/tests/pipelines/test_pipelines_common.py#L62C7-L62C32 - we can then add
IPAdapterTexterMIxinas a base class to the fast tests of all the pipelines support ip-adapter, for example,add here forStableDiffusionXLPipelineFastTests()PipelineLatentTesterMixin, PipelineTesterMixin, SDXLOptionalComponentsTesterMixin, unittest.TestCase - we can either make a dummy repo for ip-adapter ( i.e.
hf-internal-testing/tiny_random_ip_adapter) or use this method https://github.com/huggingface/diffusers/blob/9cc59ba0891c3ccbebfcbb6784f4dde2d5bd8556/tests/models/unets/test_models_unet_2d_condition.py#L59C34-L59C39 to createdummy_ip_adapter_state_dictbased onself.get_dummy_components()['unet'] - add a simple test:
- the output of the pipeline without ip-adapter should be the same as pipeline with ip-adapter but with ip_adapter_scale = 0
- the output of pipeline without ip-adapter should NOT be same as pipeline with ip-adapter with ip_adapter_scale = 1
- the tests should only run if the pipeline's
__call__method has theip_adapter_imageargument
cc @DN6 @sayakpaul let me know what you guys think!