Text-to-Image
Diffusers
Safetensors
English
CRSDiffPipeline
remote-sensing
diffusion
controlnet
custom-pipeline
Instructions to use BiliSakura/CRS-Diff with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use BiliSakura/CRS-Diff with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("BiliSakura/CRS-Diff") pipe = StableDiffusionControlNetPipeline.from_pretrained( "fill-in-base-model", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
| import importlib | |
| def exists(val): | |
| return val is not None | |
| def get_obj_from_str(string, reload=False): | |
| module, cls = string.rsplit('.', 1) | |
| if reload: | |
| module_imp = importlib.import_module(module) | |
| importlib.reload(module_imp) | |
| return getattr(importlib.import_module(module, package=None), cls) | |
| def instantiate_from_config(config): | |
| if "target" not in config: | |
| raise KeyError("Expected key `target` in config") | |
| return get_obj_from_str(config["target"])(**config.get("params", dict())) | |