Spaces:
Runtime error
Runtime error
Update app.py
Browse files47 unmodified lines484950515253545556575859606147 unmodified linesfrom scripts.wavelet_color_fix import wavelet_reconstruction, adaptive_instance_normalizationvisual_encoder_path = "senmaonk/InterLCM/weights/InterLCM/visual_encoder_3step.pth"spatial_encoder_path = "senmaonk/InterLCM/weights/InterLCM/spatial_encoder_3step.pth"visual_encoder_path_1step = "senmaonk/InterLCM/weights/InterLCM/visual_encoder_1step.pth"spatial_encoder_path_1step = "senmaonk/InterLCM/weights/InterLCM/spatial_encoder_1step.pth"sd_path = "stable-diffusion-v1-5/stable-diffusion-v1-5"lcm_path = "SimianLuo/LCM_Dreamshaper_v7"detection_model = "retinaface_resnet50"# CLIPImageEncoderclip_model, clip_preprocess = clip.load('ViT-B/16', device=device)preprocess = transforms.Compose([transforms.Normalize(mean=[-1.0, -1.0, -1.0], std=[2.0, 2.0,47 unmodified lines4849505152535455565758596061626364656667686970717273747576777847 unmodified linesfrom scripts.wavelet_color_fix import wavelet_reconstruction, adaptive_instance_normalizationREPO_ID = "senmaonk/InterLCM"visual_encoder_path = "weights/InterLCM/visual_encoder_3step.pth"spatial_encoder_path = "weights/InterLCM/spatial_encoder_3step.pth"visual_encoder_path_1step = "weights/InterLCM/visual_encoder_1step.pth"spatial_encoder_path_1step = "weights/InterLCM/spatial_encoder_1step.pth"sd_path = "stable-diffusion-v1-5/stable-diffusion-v1-5"lcm_path = "SimianLuo/LCM_Dreamshaper_v7"detection_model = "retinaface_resnet50"def download_weights(FILENAME):print(f"Downloading {path} from {REPO_ID}...")local_path = hf_hub_download(repo_id=REPO_ID,filename=FILENAME,)print(f"downloaded to: {local_path}")return local_pathvisual_encoder_path = download_weights(visual_encoder_path)spatial_encoder_path = download_weights(spatial_encoder_path)visual_encoder_path_1step = download_weights(visual_encoder_path_1step)spatial_encoder_path_1step = download_weights(spatial_encoder_path_1step)# CLIPImageEncoderclip_model, clip_preprocess = clip.load('ViT-B/16', device=device)preprocess = transforms.Compose([transforms.Normalize(mean=[-1.0, -1.0, -1.0], std=[2.0, 2.0,
app.py+21-4