Spaces:
Running
on
Zero
Running
on
Zero
Ruining Li
commited on
Commit
•
96bacab
1
Parent(s):
d04cea4
Adapt to HF ZeroGPU
Browse files
app.py
CHANGED
@@ -189,12 +189,12 @@ def single_image_sample(
|
|
189 |
z = torch.randn(2, 4, 32, 32).to("cuda")
|
190 |
|
191 |
# Prepare input for classifer-free guidance
|
192 |
-
rel = torch.cat([rel, rel], dim=0)
|
193 |
-
x_cond = torch.cat([x_cond, x_cond], dim=0)
|
194 |
-
x_cond_clip = torch.cat([x_cond_clip, x_cond_clip], dim=0)
|
195 |
-
x_cond_extra = torch.cat([x_cond_extra, x_cond_extra], dim=0)
|
196 |
-
drags = torch.cat([drags, drags], dim=0)
|
197 |
-
hidden_cls = torch.cat([hidden_cls, hidden_cls], dim=0)
|
198 |
|
199 |
model_kwargs = dict(
|
200 |
x_cond=x_cond,
|
|
|
189 |
z = torch.randn(2, 4, 32, 32).to("cuda")
|
190 |
|
191 |
# Prepare input for classifer-free guidance
|
192 |
+
rel = torch.cat([rel, rel], dim=0).to("cuda")
|
193 |
+
x_cond = torch.cat([x_cond, x_cond], dim=0).to("cuda")
|
194 |
+
x_cond_clip = torch.cat([x_cond_clip, x_cond_clip], dim=0).to("cuda")
|
195 |
+
x_cond_extra = torch.cat([x_cond_extra, x_cond_extra], dim=0).to("cuda")
|
196 |
+
drags = torch.cat([drags, drags], dim=0).to("cuda")
|
197 |
+
hidden_cls = torch.cat([hidden_cls, hidden_cls], dim=0).to("cuda")
|
198 |
|
199 |
model_kwargs = dict(
|
200 |
x_cond=x_cond,
|