Instructions to use phi-lab-rice/GRADE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use phi-lab-rice/GRADE with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("phi-lab-rice/GRADE", 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,331 Bytes
0e150d6 | 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 | # Minimal inference, metric, and quantitative-reproduction environment. # Python 3.11 is required. Install the CUDA-matched PyTorch wheel # for the host before (or together with) this file; see README.md. # Core CUDA / model runtime (stable counterparts of the server environment). torch==2.7.0 torchvision==0.22.0 torchmetrics==1.9.0 accelerate==1.11.0 diffusers==0.39.0 transformers==5.14.1 timm==1.0.28 safetensors==0.8.0 huggingface_hub==1.24.0 # Data loading and model utilities. numpy==1.26.4 scipy==1.12.0 opencv-python>=4.10,<5 Pillow==11.1.0 PyYAML==6.0.2 einops==0.8.1 noise==1.2.2 tqdm==4.67.1 # Metrics and quantitative paper reproduction. # The LPIPS evaluator downloads TorchVision's AlexNet weights on first use. # Warm the TorchVision cache online before running metrics offline; see README.md. pandas==2.2.3 matplotlib==3.10.0 open3d==0.19.0 dash==3.2.0 # Open3D imports its visualization module during 3D metric startup. plotly==6.3.1 # Imported by Open3D's visualization package during 3D metrics. # Pinned Depth Anything 3 source used by the DA3 baseline. addict==2.4.0 # Imported by the pinned DA3 source but absent from its metadata. moviepy==1.0.3 # DA3 imports moviepy.editor; MoviePy 2 removed it. git+https://github.com/ByteDance-Seed/Depth-Anything-3.git@3d835ec1a5802d64a8b8b15f817a1ab54809bfe4 |