nielsr HF Staff commited on
Commit
07b8e53
·
verified ·
1 Parent(s): 6665c4d

Improve model card: add pipeline tag, library name, and sample usage

Browse files

This PR enhances the model card by:
- Adding `pipeline_tag: text-to-image` to improve discoverability on the Hugging Face Hub, allowing users to find the model via relevant filters.
- Adding `library_name: diffusers`, indicating compatibility and guiding users on which library to use for inference.
- Introducing a "Sample Usage" section to provide a clear path for users to get started with the model, referencing the official GitHub repository for detailed code and instructions.

Files changed (1) hide show
  1. README.md +34 -1
README.md CHANGED
@@ -1,8 +1,11 @@
1
  ---
2
- license: apache-2.0
3
  base_model:
4
  - stable-diffusion-v1-5/stable-diffusion-v1-5
 
 
 
5
  ---
 
6
  <meta name="google-site-verification" content="-XQC-POJtlDPD3i2KSOxbFkSBde_Uq9obAIh_4mxTkM" />
7
 
8
 
@@ -60,6 +63,36 @@ The proposed framework is architected around two core components: SAA and IMR. (
60
 
61
  2. Download our SAA-related and IMR-related checkpoints from [DynamicID Checkpoints on Hugging Face](https://huggingface.co/meteorite2023/DynamicID).
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
  ## 🌈 Gallery
65
 
 
1
  ---
 
2
  base_model:
3
  - stable-diffusion-v1-5/stable-diffusion-v1-5
4
+ license: apache-2.0
5
+ pipeline_tag: text-to-image
6
+ library_name: diffusers
7
  ---
8
+
9
  <meta name="google-site-verification" content="-XQC-POJtlDPD3i2KSOxbFkSBde_Uq9obAIh_4mxTkM" />
10
 
11
 
 
63
 
64
  2. Download our SAA-related and IMR-related checkpoints from [DynamicID Checkpoints on Hugging Face](https://huggingface.co/meteorite2023/DynamicID).
65
 
66
+ ## ⚡ Sample Usage (Diffusers)
67
+
68
+ The official inference code is available in the [GitHub repository](https://github.com/ByteCat-bot/DynamicID), which provides detailed instructions for running the model. A typical usage with the `diffusers` library would involve loading the base Stable Diffusion pipeline and then integrating the DynamicID specific weights.
69
+
70
+ ```python
71
+ import torch
72
+ from diffusers import StableDiffusionPipeline
73
+
74
+ # Load the base Stable Diffusion pipeline
75
+ # Ensure you have downloaded the base model locally or from Hugging Face Hub
76
+ pipeline = StableDiffusionPipeline.from_pretrained(
77
+ "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16
78
+ ).to("cuda")
79
+
80
+ # Load DynamicID specific weights (e.g., LoRAs or custom UNet modifications)
81
+ # The precise method for loading these weights will be detailed in the official repository.
82
+ # For conceptual understanding, it might involve:
83
+ # pipeline.load_lora_weights("path/to/DynamicID/weights")
84
+ # Or integrating custom UNet/attention layers as per the DynamicID implementation.
85
+
86
+ # Refer to the official GitHub repository for the exact loading and inference pipeline.
87
+ # You would then pass your text prompt and identity reference images to the pipeline.
88
+ # Example (conceptual):
89
+ # prompt = "a photo of [person1] with a big smile and [person2] looking thoughtful"
90
+ # generated_image = pipeline(
91
+ # prompt=prompt,
92
+ # identity_references=[id_image_1, id_image_2], # Placeholder for identity images
93
+ # # Add other parameters as specified in the DynamicID code
94
+ # ).images[0]
95
+ ```
96
 
97
  ## 🌈 Gallery
98