Spaces:
Running
on
Zero
Running
on
Zero
envs
Browse files
app.py
CHANGED
@@ -81,9 +81,12 @@ If you have any questions, please feel free to reach me out at <b>ywl@stu.pku.ed
|
|
81 |
# """
|
82 |
|
83 |
os.makedirs("models/personalized")
|
|
|
84 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/flow_controlnet.ckpt -P models/')
|
85 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/image_controlnet.ckpt -P models/')
|
86 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/unet.ckpt -P models/')
|
|
|
|
|
87 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/helloobjects_V12c.safetensors -P models/personalized')
|
88 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/TUSUN.safetensors -P models/personalized')
|
89 |
|
@@ -194,7 +197,7 @@ class ImageConductor:
|
|
194 |
text_encoder = CLIPTextModel.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="text_encoder")
|
195 |
vae = AutoencoderKL.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="vae")
|
196 |
inference_config = OmegaConf.load("configs/inference/inference.yaml")
|
197 |
-
unet = UNet3DConditionFlowModel.from_pretrained_2d("
|
198 |
|
199 |
self.vae = vae
|
200 |
|
|
|
81 |
# """
|
82 |
|
83 |
os.makedirs("models/personalized")
|
84 |
+
os.makedirs("models/sd1-5")
|
85 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/flow_controlnet.ckpt -P models/')
|
86 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/image_controlnet.ckpt -P models/')
|
87 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/unet.ckpt -P models/')
|
88 |
+
os.system(f'wget https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/unet/config.json -P models/sd1-5/')
|
89 |
+
os.system(f'wget https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/unet/diffusion_pytorch_model.bin -P models/sd1-5/')
|
90 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/helloobjects_V12c.safetensors -P models/personalized')
|
91 |
os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/TUSUN.safetensors -P models/personalized')
|
92 |
|
|
|
197 |
text_encoder = CLIPTextModel.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="text_encoder")
|
198 |
vae = AutoencoderKL.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="vae")
|
199 |
inference_config = OmegaConf.load("configs/inference/inference.yaml")
|
200 |
+
unet = UNet3DConditionFlowModel.from_pretrained_2d("models/sd1-5/", subfolder="unet", unet_additional_kwargs=OmegaConf.to_container(inference_config.unet_additional_kwargs))
|
201 |
|
202 |
self.vae = vae
|
203 |
|