File size: 1,310 Bytes
9dda282
e12a929
9dda282
 
 
 
 
 
 
 
 
 
 
 
 
 
e12a929
cc57c3b
 
 
9dda282
988cd80
e12a929
9dda282
 
cc57c3b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import torch
import gradio as gr
from gradio import processing_utils, utils
from PIL import Image
import random
from diffusers import (
    DiffusionPipeline,
    AutoencoderKL,
    StableDiffusionControlNetPipeline,
    ControlNetModel,
    StableDiffusionLatentUpscalePipeline,
    StableDiffusionImg2ImgPipeline,
    StableDiffusionControlNetImg2ImgPipeline,
    DPMSolverMultistepScheduler,  # <-- Added import
    EulerDiscreteScheduler  # <-- Added import
)

print(f"Is CUDA available: {torch.cuda.is_available()}")
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")

import time
from style import css

BASE_MODEL = "SG161222/Realistic_Vision_V5.1_noVAE"

title = "Flan T5 and Vanilla T5"
description = "This demo compares [T5-large](https://huggingface.co/t5-large) and [Flan-T5-XX-large](https://huggingface.co/google/flan-t5-xxl). Note that T5 expects a very specific format of the prompts, so the examples below are not necessarily the best prompts to compare."

def inference(text):
  output_flan = ""
  output_vanilla = ""
  return [output_flan, output_vanilla]

io = gr.Interface(
  inference,
  gr.Textbox(lines=3),
  outputs=[
    gr.Textbox(lines=3, label="Flan T5"),
    gr.Textbox(lines=3, label="T5")
  ],
  title=title,
  description=description,
)
io.launch()