Text-to-Image
Diffusers
PyTorch
English
Text-to-Image
IP-Adapter
StableDiffusion3Pipeline
image-generation
Stable Diffusion
Instructions to use Runware/SD3.5-ip_adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Runware/SD3.5-ip_adapter with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Runware/SD3.5-ip_adapter", 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
- Local Apps
- Draw Things
- DiffusionBee
| import torch | |
| from safetensors.torch import save_file | |
| # Load the original .bin file | |
| orig = torch.load("pytorch_model.bin", map_location="cpu") | |
| converted = {} | |
| # Convert ip_adapter weights | |
| for key, value in orig["ip_adapter"].items(): | |
| # e.g. '0.to_k_ip.weight' → 'ip_adapter.0.to_k_ip.weight' | |
| parts = key.split(".", 1) | |
| if len(parts) == 2: | |
| new_key = f"ip_adapter.{parts[0]}.{parts[1]}" | |
| else: | |
| new_key = f"ip_adapter.{key}" | |
| converted[new_key] = value | |
| # Convert image_proj weights | |
| for key, value in orig["image_proj"].items(): | |
| # Do not rename! Just prepend with 'image_proj.' | |
| new_key = f"image_proj.{key}" | |
| converted[new_key] = value | |
| # Save to safetensors | |
| save_file(converted, "ip_adapter.safetensors") | |