Instructions to use ModelsLab/blipdiffusion-controlnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ModelsLab/blipdiffusion-controlnet with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ModelsLab/blipdiffusion-controlnet", 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
| { | |
| "_name_or_path": "ayushtues/blipdiffusion", | |
| "architectures": [ | |
| "Blip2QFormerModel" | |
| ], | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "model_type": "blip-2", | |
| "num_query_tokens": 16, | |
| "qformer_config": { | |
| "cross_attention_frequency": 1, | |
| "encoder_hidden_size": 1024, | |
| "model_type": "blip_2_qformer", | |
| "vocab_size": 30523 | |
| }, | |
| "text_config": { | |
| "model_type": "opt" | |
| }, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.33.0.dev0", | |
| "use_decoder_only_language_model": true, | |
| "vision_config": { | |
| "hidden_act": "quick_gelu", | |
| "hidden_size": 1024, | |
| "intermediate_size": 4096, | |
| "model_type": "blip_2_vision_model", | |
| "num_hidden_layers": 23 | |
| } | |
| } | |