Instructions to use cszhilu1998/LiveWorld with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use cszhilu1998/LiveWorld with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("cszhilu1998/LiveWorld", 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
File size: 1,101 Bytes
5024339 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/bin/bash
# LiveWorld Training
export TORCH_HOME=./ckpts
export HF_HUB_DISABLE_IMPORTS_VERIFICATION=1
export NCCL_TIMEOUT=7200
# === Define nodes and per-node GPU assignments ===
NODES=("$(hostname)")
CUDA_VISIBLE_DEVICES_LIST=("1")
# === Auto-detect current node ===
HOSTNAME=$(hostname)
for i in "${!NODES[@]}"; do
if [[ "$HOSTNAME" == "${NODES[$i]}" ]]; then
NODE_RANK=$i
export CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES_LIST[$i]}
break
fi
done
if [[ -z "$NODE_RANK" ]]; then
echo "Error: hostname ($HOSTNAME) not in NODES list."
exit 1
fi
MASTER_ADDR=${NODES[0]}
NNODES=${#NODES[@]}
GPUS_PER_NODE=$(echo $CUDA_VISIBLE_DEVICES | awk -F',' '{print NF}')
echo "Node: $HOSTNAME | rank=$NODE_RANK | GPUs=$CUDA_VISIBLE_DEVICES | master=$MASTER_ADDR | nnodes=$NNODES"
torchrun \
--nproc_per_node=$GPUS_PER_NODE \
--nnodes=$NNODES \
--node_rank=$NODE_RANK \
--rdzv_id=5235 \
--rdzv_backend=c10d \
--rdzv_endpoint=$MASTER_ADDR:29511 \
scripts/train.py \
--config_path configs/train_liveworld_1-3B.yaml \
--disable_wandb
|