Instructions to use BiliSakura/BitDance-14B-64x-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use BiliSakura/BitDance-14B-64x-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("BiliSakura/BitDance-14B-64x-diffusers", 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 Settings
- Draw Things
- DiffusionBee
Update all files for BitDance-14B-64x-diffusers
Browse files
bitdance_diffusers/modeling_projector.py
CHANGED
|
@@ -22,6 +22,7 @@ class BitDanceProjector(ModelMixin, ConfigMixin):
|
|
| 22 |
self.fc2 = nn.Linear(out_dim, out_dim)
|
| 23 |
|
| 24 |
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
|
|
|
|
| 25 |
hidden_states = self.fc1(hidden_states)
|
| 26 |
hidden_states = self.activation_fn(hidden_states)
|
| 27 |
hidden_states = self.fc2(hidden_states)
|
|
|
|
| 22 |
self.fc2 = nn.Linear(out_dim, out_dim)
|
| 23 |
|
| 24 |
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
|
| 25 |
+
hidden_states = hidden_states.to(self.fc1.weight.dtype)
|
| 26 |
hidden_states = self.fc1(hidden_states)
|
| 27 |
hidden_states = self.activation_fn(hidden_states)
|
| 28 |
hidden_states = self.fc2(hidden_states)
|