Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -96,6 +96,7 @@ class main():
|
|
96 |
@torch.no_grad()
|
97 |
@spaces.GPU
|
98 |
def inference(self, prompt, negative_prompt, guidance_scale, ddim_steps, seed):
|
|
|
99 |
generator = torch.Generator(device=device).manual_seed(seed)
|
100 |
latents = torch.randn(
|
101 |
(1, self.unet.in_channels, 512 // 8, 512 // 8),
|
@@ -140,6 +141,7 @@ class main():
|
|
140 |
@torch.no_grad()
|
141 |
@spaces.GPU
|
142 |
def edit_inference(self, prompt, negative_prompt, guidance_scale, ddim_steps, seed, start_noise, a1, a2, a3, a4):
|
|
|
143 |
original_weights = self,network.proj.clone()
|
144 |
|
145 |
#pad to same number of PCs
|
|
|
96 |
@torch.no_grad()
|
97 |
@spaces.GPU
|
98 |
def inference(self, prompt, negative_prompt, guidance_scale, ddim_steps, seed):
|
99 |
+
device = self.device
|
100 |
generator = torch.Generator(device=device).manual_seed(seed)
|
101 |
latents = torch.randn(
|
102 |
(1, self.unet.in_channels, 512 // 8, 512 // 8),
|
|
|
141 |
@torch.no_grad()
|
142 |
@spaces.GPU
|
143 |
def edit_inference(self, prompt, negative_prompt, guidance_scale, ddim_steps, seed, start_noise, a1, a2, a3, a4):
|
144 |
+
device = self.device
|
145 |
original_weights = self,network.proj.clone()
|
146 |
|
147 |
#pad to same number of PCs
|