Kyle Pearson
Add zero-gpu support, enhance model export with quantization/gpu acceleration helpers, optimize inference pipeline with vae fixes, modernize pipeline loading with unified decorators, implement gpu decorator infrastructure.
3631a8e Download src/gpu_decorator.py from pearsonkyle/SDXL-Model-Merger: direct link, hf CLI and curl.
- Browser
- Download file 242 Bytes
-
https://huggingface.co/spaces/pearsonkyle/SDXL-Model-Merger/resolve/main/src/gpu_decorator.py
- Command line
-
hf download hf://spaces/pearsonkyle/SDXL-Model-Merger/src/gpu_decorator.py
-
curl -L -o gpu_decorator.py https://huggingface.co/spaces/pearsonkyle/SDXL-Model-Merger/resolve/main/src/gpu_decorator.py
242 Bytes
| """ZeroGPU compatibility decorator for HuggingFace Spaces.""" | |
| try: | |
| import spaces | |
| GPU = spaces.GPU | |
| except ImportError: | |
| def GPU(func=None, duration=None): | |
| if func is None: | |
| return lambda f: f | |
| return func | |