Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,6 +93,7 @@ import diffusers
|
|
| 93 |
from diffusers import StableDiffusionXLPipeline
|
| 94 |
from diffusers import DDIMScheduler
|
| 95 |
import torch.nn.functional as F
|
|
|
|
| 96 |
|
| 97 |
def cal_attn_mask(total_length,id_length,sa16,sa32,sa64,device="cuda",dtype= torch.float16):
|
| 98 |
bool_matrix256 = torch.rand((1, total_length * 256),device = device,dtype = dtype) < sa16
|
|
|
|
| 93 |
from diffusers import StableDiffusionXLPipeline
|
| 94 |
from diffusers import DDIMScheduler
|
| 95 |
import torch.nn.functional as F
|
| 96 |
+
from transformers.models.clip.configuration_clip import CLIPVisionConfig
|
| 97 |
|
| 98 |
def cal_attn_mask(total_length,id_length,sa16,sa32,sa64,device="cuda",dtype= torch.float16):
|
| 99 |
bool_matrix256 = torch.rand((1, total_length * 256),device = device,dtype = dtype) < sa16
|