(self)
| 146 | |
| 147 | @unittest.skipUnless(test_level() >= 1, 'skip test in current test level') |
| 148 | def test_patch_diffusers(self): |
| 149 | with patch_context(): |
| 150 | from diffusers import StableDiffusionPipeline |
| 151 | pipe = StableDiffusionPipeline.from_pretrained( |
| 152 | 'AI-ModelScope/stable-diffusion-v1-5') |
| 153 | self.assertTrue(pipe is not None) |
| 154 | try: |
| 155 | pipe = StableDiffusionPipeline.from_pretrained( |
| 156 | 'AI-ModelScope/stable-diffusion-v1-5') |
| 157 | except Exception: |
| 158 | pass |
| 159 | else: |
| 160 | self.assertTrue(False) |
| 161 | |
| 162 | from modelscope import StableDiffusionPipeline |
| 163 | pipe = StableDiffusionPipeline.from_pretrained( |
| 164 | 'AI-ModelScope/stable-diffusion-v1-5') |
| 165 | self.assertTrue(pipe is not None) |
| 166 | |
| 167 | @unittest.skipUnless(test_level() >= 1, 'skip test in current test level') |
| 168 | def test_patch_peft(self): |
nothing calls this directly
no test coverage detected