Image-to-Image
Diffusers
English
driving
autonomous-driving
diffusion
controllable-generation
scene-editing
Instructions to use ZehongZhu/drivinggfm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ZehongZhu/drivinggfm with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ZehongZhu/drivinggfm", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Configuration Parsing Warning:In UNKNOWN_FILENAME: "diffusers._class_name" must be a string
DrivingGFM v1.0
Generalist Foundation Model for Unified Driving Visual Perception โ DrivingGFM Team, Tongji University
Quick start
pip install diffusers transformers accelerate torch
Recommended entry point, using the DrivinggfmPipeline wrapper shipped within this repository. trust_remote_code=True is required to load the custom pipeline code from the repository.
import torch
from PIL import Image
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"ZehongZhu/drivinggfm",
torch_dtype=torch.float16,
trust_remote_code=True
)
pipe.to("cuda")
out = pipe.drive(
Image.open("scene.png"),
"make it a rainy night road scene",
num_inference_steps=20,
image_guidance_scale=1.5,
guidance_scale=7.5,
seed=2026,
)
out.save("result.png")
License
CreativeML Open RAILโM, full text in LICENSE. Commercial use and redistribution are permitted, provided the full license text and attribution are retained, downstream users are bound by the Attachment A use restrictions, and modified files are clearly marked as modified.
- Downloads last month
- 38