Spaces:
Runtime error
Runtime error
AYYasaswini
commited on
Commit
•
064cae1
1
Parent(s):
8335dcb
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,8 @@ scheduler = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedu
|
|
39 |
# To the GPU we go!
|
40 |
vae = vae.to(torch_device)
|
41 |
text_encoder = text_encoder.to(torch_device)
|
42 |
-
unet = unet.to(torch_device)
|
|
|
43 |
token_emb_layer = text_encoder.text_model.embeddings.token_embedding
|
44 |
pos_emb_layer = text_encoder.text_model.embeddings.position_embedding
|
45 |
position_ids = text_encoder.text_model.embeddings.position_ids[:, :77]
|
@@ -61,7 +62,7 @@ generator = torch.manual_seed(32) # Seed generator to create the inital latent
|
|
61 |
|
62 |
# Prep latents
|
63 |
latents = torch.randn(
|
64 |
-
(batch_size, unet.in_channels, height // 8, width // 8),
|
65 |
generator=generator,
|
66 |
)
|
67 |
latents = latents.to(torch_device)
|
|
|
39 |
# To the GPU we go!
|
40 |
vae = vae.to(torch_device)
|
41 |
text_encoder = text_encoder.to(torch_device)
|
42 |
+
unet = unet.to(torch_device)
|
43 |
+
|
44 |
token_emb_layer = text_encoder.text_model.embeddings.token_embedding
|
45 |
pos_emb_layer = text_encoder.text_model.embeddings.position_embedding
|
46 |
position_ids = text_encoder.text_model.embeddings.position_ids[:, :77]
|
|
|
62 |
|
63 |
# Prep latents
|
64 |
latents = torch.randn(
|
65 |
+
(batch_size, unet.config.in_channels, height // 8, width // 8),
|
66 |
generator=generator,
|
67 |
)
|
68 |
latents = latents.to(torch_device)
|