Download model_loader.py from ryuhan/RimuruXL: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/spaces/ryuhan/RimuruXL/resolve/main/model_loader.py
- Command line
-
hf download hf://spaces/ryuhan/RimuruXL/model_loader.py
-
curl -L -o model_loader.py https://huggingface.co/spaces/ryuhan/RimuruXL/resolve/main/model_loader.py
339 Bytes
| import torch | |
| from diffusers import AutoPipelineForText2Image | |
| def load_pipeline(): | |
| pipe = AutoPipelineForText2Image.from_pretrained( | |
| "./rimuruXL", | |
| torch_dtype=torch.float16 | |
| ) | |
| pipe.to("cuda" if torch.cuda.is_available() else "cpu") | |
| pipe.safety_checker = None # Disable NSFW filter (opsional) | |
| return pipe |