Update app.py
Browse files3 unmodified lines4567891011121314153 unmodified lines1920212223242526273 unmodified linesmodel_id = "runwayml/stable-diffusion-v1-5"pipe = StableDiffusionPipeline.from_pretrained(model_id,torch_dtype=torch.float16)pipe = pipe.to("cuda")pipe.load_lora_weights("./")3 unmodified linesdemo = gr.Interface(fn=generate,inputs=gr.Textbox(label="Prompt"),outputs="image",title="Zenma AI Image Generator")demo.launch()3 unmodified lines4567891011121314151617183 unmodified lines222324252627282930313 unmodified linesmodel_id = "runwayml/stable-diffusion-v1-5"device = "cuda" if torch.cuda.is_available() else "cpu"pipe = StableDiffusionPipeline.from_pretrained(model_id,torch_dtype=torch.float16 if device == "cuda" else torch.float32)pipe = pipe.to(device)pipe.load_lora_weights("./")3 unmodified linesdemo = gr.Interface(fn=generate,inputs=gr.Textbox(label="Enter your prompt"),outputs=gr.Image(type="pil"),title="Zenma AI Image Generator",description="Generate images using a fine-tuned Stable Diffusion LoRA model")demo.launch()
app.py+9-5