import torch import gradio as gr from gradio import processing_utils, utils from gradio_depth_pred import create_demo as create_depth_pred_demo 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())}") DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu' import time from style import css BASE_MODEL = "SG161222/Realistic_Vision_V5.1_noVAE" title = "Ultra Heroes" description = "Testing composites and lighting tweaks." 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()