Spaces:
Running
on
Zero
Running
on
Zero
Update feifeilib/feifeimodload.py
Browse files
feifeilib/feifeimodload.py
CHANGED
@@ -2,7 +2,8 @@ import torch
|
|
2 |
import spaces
|
3 |
from diffusers import (
|
4 |
DiffusionPipeline,
|
5 |
-
AutoencoderTiny
|
|
|
6 |
)
|
7 |
from huggingface_hub import hf_hub_download
|
8 |
|
@@ -39,5 +40,8 @@ def feifeimodload():
|
|
39 |
pipe.vae.enable_slicing()
|
40 |
pipe.vae.enable_tiling()
|
41 |
# pipe.unload_lora_weights()
|
|
|
|
|
|
|
42 |
torch.cuda.empty_cache()
|
43 |
-
return pipe
|
|
|
2 |
import spaces
|
3 |
from diffusers import (
|
4 |
DiffusionPipeline,
|
5 |
+
AutoencoderTiny,
|
6 |
+
FluxImg2ImgPipeline
|
7 |
)
|
8 |
from huggingface_hub import hf_hub_download
|
9 |
|
|
|
40 |
pipe.vae.enable_slicing()
|
41 |
pipe.vae.enable_tiling()
|
42 |
# pipe.unload_lora_weights()
|
43 |
+
imgpipe = FluxImg2ImgPipeline.from_pretrained(
|
44 |
+
"aifeifei798/DarkIdol-flux-v1", torch_dtype=dtype
|
45 |
+
).to(device)
|
46 |
torch.cuda.empty_cache()
|
47 |
+
return pipe, imgpipe
|