Spaces:
Running on Zero
Running on Zero
Download diffsynth/models/sdxl_vae_decoder.py from TencentARC/scope-camera-video-generation: direct link, hf CLI and curl.
- Browser
- Download file 762 Bytes
-
https://huggingface.co/spaces/TencentARC/scope-camera-video-generation/resolve/main/diffsynth/models/sdxl_vae_decoder.py
- Command line
-
hf download hf://spaces/TencentARC/scope-camera-video-generation/diffsynth/models/sdxl_vae_decoder.py
-
curl -L -o sdxl_vae_decoder.py https://huggingface.co/spaces/TencentARC/scope-camera-video-generation/resolve/main/diffsynth/models/sdxl_vae_decoder.py
762 Bytes
| from .sd_vae_decoder import SDVAEDecoder, SDVAEDecoderStateDictConverter | |
| class SDXLVAEDecoder(SDVAEDecoder): | |
| def __init__(self, upcast_to_float32=True): | |
| super().__init__() | |
| self.scaling_factor = 0.13025 | |
| def state_dict_converter(): | |
| return SDXLVAEDecoderStateDictConverter() | |
| class SDXLVAEDecoderStateDictConverter(SDVAEDecoderStateDictConverter): | |
| def __init__(self): | |
| super().__init__() | |
| def from_diffusers(self, state_dict): | |
| state_dict = super().from_diffusers(state_dict) | |
| return state_dict, {"upcast_to_float32": True} | |
| def from_civitai(self, state_dict): | |
| state_dict = super().from_civitai(state_dict) | |
| return state_dict, {"upcast_to_float32": True} | |