Instructions to use ifmain/blip-image2promt-stable-diffusion-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ifmain/blip-image2promt-stable-diffusion-base with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="ifmain/blip-image2promt-stable-diffusion-base")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ifmain/blip-image2promt-stable-diffusion-base") model = AutoModelForMultimodalLM.from_pretrained("ifmain/blip-image2promt-stable-diffusion-base") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -31,7 +31,7 @@ def prepare(text):
|
|
| 31 |
text = re.sub(r'<[^>]*>', '', text)
|
| 32 |
return text
|
| 33 |
|
| 34 |
-
path_to_model = "blip-image2promt-stable-diffusion
|
| 35 |
|
| 36 |
processor = BlipProcessor.from_pretrained(path_to_model)
|
| 37 |
model = BlipForConditionalGeneration.from_pretrained(path_to_model, torch_dtype=torch.float16).to("cuda")
|
|
|
|
| 31 |
text = re.sub(r'<[^>]*>', '', text)
|
| 32 |
return text
|
| 33 |
|
| 34 |
+
path_to_model = "ifmain/blip-image2promt-stable-diffusion"
|
| 35 |
|
| 36 |
processor = BlipProcessor.from_pretrained(path_to_model)
|
| 37 |
model = BlipForConditionalGeneration.from_pretrained(path_to_model, torch_dtype=torch.float16).to("cuda")
|