File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
tests/pipelines/stable_diffusion Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1246,9 +1246,12 @@ def test_download_from_hub(self):
1246
1246
assert image_out .shape == (512 , 512 , 3 )
1247
1247
1248
1248
def test_download_local (self ):
1249
- filename = hf_hub_download ("runwayml/stable-diffusion-v1-5" , filename = "v1-5-pruned-emaonly.ckpt" )
1249
+ ckpt_filename = hf_hub_download ("runwayml/stable-diffusion-v1-5" , filename = "v1-5-pruned-emaonly.ckpt" )
1250
+ config_filename = hf_hub_download ("runwayml/stable-diffusion-v1-5" , filename = "v1-inference.yaml" )
1250
1251
1251
- pipe = StableDiffusionPipeline .from_single_file (filename , torch_dtype = torch .float16 )
1252
+ pipe = StableDiffusionPipeline .from_single_file (
1253
+ ckpt_filename , config_files = {"v1" : config_filename }, torch_dtype = torch .float16
1254
+ )
1252
1255
pipe .scheduler = DDIMScheduler .from_config (pipe .scheduler .config )
1253
1256
pipe .to ("cuda" )
1254
1257
You can’t perform that action at this time.
0 commit comments