Spaces:
Running
on
Zero
Running
on
Zero
oyly
commited on
Commit
·
091540f
1
Parent(s):
9e76f01
fix: ae
Browse files
app.py
CHANGED
@@ -118,8 +118,6 @@ class FluxEditor_lore_demo:
|
|
118 |
self.info['feature'] = {}
|
119 |
self.info['inject_step'] = injection_num_steps
|
120 |
self.info['wh'] = (width, height)
|
121 |
-
|
122 |
-
torch.cuda.empty_cache()
|
123 |
|
124 |
inp = prepare(self.t5, self.clip, self.init_image, prompt=src_prompt)
|
125 |
timesteps = get_schedule(inversion_num_steps, inp["img"].shape[1], shift=True)
|
@@ -196,7 +194,6 @@ class FluxEditor_lore_demo:
|
|
196 |
self.model.to(self.device)
|
197 |
self.t5.to('cpu')
|
198 |
self.clip.to('cpu')
|
199 |
-
torch.cuda.empty_cache()
|
200 |
if training_epochs != 0:
|
201 |
torch.set_grad_enabled(True)
|
202 |
inp_optim["img"] = self.z0
|
|
|
118 |
self.info['feature'] = {}
|
119 |
self.info['inject_step'] = injection_num_steps
|
120 |
self.info['wh'] = (width, height)
|
|
|
|
|
121 |
|
122 |
inp = prepare(self.t5, self.clip, self.init_image, prompt=src_prompt)
|
123 |
timesteps = get_schedule(inversion_num_steps, inp["img"].shape[1], shift=True)
|
|
|
194 |
self.model.to(self.device)
|
195 |
self.t5.to('cpu')
|
196 |
self.clip.to('cpu')
|
|
|
197 |
if training_epochs != 0:
|
198 |
torch.set_grad_enabled(True)
|
199 |
inp_optim["img"] = self.z0
|