Instructions to use xfcghj/AR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use xfcghj/AR with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("xfcghj/AR", torch_dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| # 定义你要清理的卡号 | |
| target_gpus="6,7" | |
| # 通过 nvidia-smi 查询,-i 指定卡号,--query 过滤进程 PID | |
| pids=$(nvidia-smi --query-compute-apps=pid --format=csv,noheader -i $target_gpus | sort -u) | |
| if [ -n "$pids" ]; then | |
| echo "正在终止占用 GPU $target_gpus 的进程: $pids" | |
| kill -9 $pids | |
| else | |
| echo "未发现占用 GPU $target_gpus 的进程" | |
| fi |