Instructions to use kwanY/styleid with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kwanY/styleid with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="kwanY/styleid") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("kwanY/styleid") model = AutoModelForZeroShotImageClassification.from_pretrained("kwanY/styleid", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -42,7 +42,7 @@ inputs = processor(images=img, return_tensors="pt").to(device)
|
|
| 42 |
|
| 43 |
with torch.no_grad():
|
| 44 |
emb = model.get_image_features(**inputs)
|
| 45 |
-
emb = emb / emb.norm(dim=-1, keepdim=True)
|
| 46 |
```
|
| 47 |
|
| 48 |
#### Open for non-commercial research. Do not use FFHQ for biometric human recognition
|
|
|
|
| 42 |
|
| 43 |
with torch.no_grad():
|
| 44 |
emb = model.get_image_features(**inputs)
|
| 45 |
+
emb = emb / emb.norm(dim=-1, keepdim=True)
|
| 46 |
```
|
| 47 |
|
| 48 |
#### Open for non-commercial research. Do not use FFHQ for biometric human recognition
|