Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -45,11 +45,11 @@ def genie (prompt, negative_prompt, height, width, scale, steps, seed, upscaling
|
|
45 |
if upscaling == 'Yes':
|
46 |
image = refiner(prompt=prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, image=int_image).images[0]
|
47 |
upscaled = upscaler(prompt=prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=5, guidance_scale=0).images[0]
|
48 |
-
|
49 |
return (image, upscaled)
|
50 |
else:
|
51 |
image = refiner(prompt=prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, image=int_image).images[0]
|
52 |
-
|
53 |
return (image, image)
|
54 |
|
55 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit. A Token is Any Word, Number, Symbol, or Punctuation. Everything Over 77 Will Be Truncated!'),
|
|
|
45 |
if upscaling == 'Yes':
|
46 |
image = refiner(prompt=prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, image=int_image).images[0]
|
47 |
upscaled = upscaler(prompt=prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=5, guidance_scale=0).images[0]
|
48 |
+
torch.cuda.empty_cache()
|
49 |
return (image, upscaled)
|
50 |
else:
|
51 |
image = refiner(prompt=prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, image=int_image).images[0]
|
52 |
+
torch.cuda.empty_cache()
|
53 |
return (image, image)
|
54 |
|
55 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit. A Token is Any Word, Number, Symbol, or Punctuation. Everything Over 77 Will Be Truncated!'),
|