Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
Β·
1de7080
1
Parent(s):
2a759eb
Update app.py
Browse files
app.py
CHANGED
@@ -311,8 +311,8 @@ def inference(text, seed, step_size, max_iterations, width, height, init_image,
|
|
311 |
|
312 |
result = []
|
313 |
if init_weight:
|
314 |
-
|
315 |
-
result.append(F.mse_loss(z, torch.zeros_like(z_orig)) * ((1/torch.tensor(i*2 + 1))*init_weight) / 2)
|
316 |
for prompt in pMs:
|
317 |
result.append(prompt(iii))
|
318 |
img = np.array(out.mul(255).clamp(0, 255)[0].cpu().detach().numpy().astype(np.uint8))[:,:,:]
|
|
|
311 |
|
312 |
result = []
|
313 |
if init_weight:
|
314 |
+
result.append(F.mse_loss(z, z_orig) * init_weight / 2)
|
315 |
+
#result.append(F.mse_loss(z, torch.zeros_like(z_orig)) * ((1/torch.tensor(i*2 + 1))*init_weight) / 2)
|
316 |
for prompt in pMs:
|
317 |
result.append(prompt(iii))
|
318 |
img = np.array(out.mul(255).clamp(0, 255)[0].cpu().detach().numpy().astype(np.uint8))[:,:,:]
|