Update app.py
Browse files26 unmodified lines2728293031323331 unmodified lines65666726 unmodified lineslora_path = "lora_trained_model.safetensors" # Ensure this file is uploaded in the Spaceif os.path.exists(lora_path):try:SD3LoraLoaderMixin.load_lora_into_model(pipeline, lora_path)print("✅ LoRA weights loaded successfully!")except Exception as e:print(f"❌ Error loading LoRA: {e}")31 unmodified linesoutput_image = gr.Image(label="Generated Image")generate_btn.click(generate_image, inputs=[prompt_input, seed_input], outputs=output_image)26 unmodified lines2728293031323331 unmodified lines65666768697026 unmodified lineslora_path = "lora_trained_model.safetensors" # Ensure this file is uploaded in the Spaceif os.path.exists(lora_path):try:pipeline.load_lora_weights(lora_path) # Use the correct method for loading LoRA weightsprint("✅ LoRA weights loaded successfully!")except Exception as e:print(f"❌ Error loading LoRA: {e}")31 unmodified linesoutput_image = gr.Image(label="Generated Image")generate_btn.click(generate_image, inputs=[prompt_input, seed_input], outputs=output_image)# Launch the Gradio appdemo.launch()
app.py+4-1