Update app.py
Browse files
app.py
CHANGED
|
@@ -271,9 +271,9 @@ def edit_inference(net, prompt, negative_prompt, guidance_scale, ddim_steps, see
|
|
| 271 |
elif t<=start_noise:
|
| 272 |
network.proj = torch.nn.Parameter(edited_weights)
|
| 273 |
network.reset()
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
|
| 278 |
|
| 279 |
#guidance
|
|
|
|
| 271 |
elif t<=start_noise:
|
| 272 |
network.proj = torch.nn.Parameter(edited_weights)
|
| 273 |
network.reset()
|
| 274 |
+
with torch.no_grad():
|
| 275 |
+
with network:
|
| 276 |
+
noise_pred = unet(latent_model_input, t, encoder_hidden_states=text_embeddings, timestep_cond= None).sample
|
| 277 |
|
| 278 |
|
| 279 |
#guidance
|