Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import gradio as gr
|
|
| 2 |
import torch
|
| 3 |
from transformers import AutoModelForCausalLM
|
| 4 |
import os
|
|
|
|
| 5 |
|
| 6 |
# Load the model
|
| 7 |
model_id = "tencent/HunyuanImage-3.0"
|
|
@@ -11,6 +12,7 @@ print("Note: This is a very large model (80B params) and requires significant GP
|
|
| 11 |
print("For production use, consider using the FAL API or other inference providers.")
|
| 12 |
|
| 13 |
# For demo purposes, we'll use inference API
|
|
|
|
| 14 |
def generate_image(prompt, seed=42, diff_infer_steps=50, image_size="auto"):
|
| 15 |
"""
|
| 16 |
Generate image using HunyuanImage-3.0
|
|
|
|
| 2 |
import torch
|
| 3 |
from transformers import AutoModelForCausalLM
|
| 4 |
import os
|
| 5 |
+
import spaces
|
| 6 |
|
| 7 |
# Load the model
|
| 8 |
model_id = "tencent/HunyuanImage-3.0"
|
|
|
|
| 12 |
print("For production use, consider using the FAL API or other inference providers.")
|
| 13 |
|
| 14 |
# For demo purposes, we'll use inference API
|
| 15 |
+
@spaces.GPU
|
| 16 |
def generate_image(prompt, seed=42, diff_infer_steps=50, image_size="auto"):
|
| 17 |
"""
|
| 18 |
Generate image using HunyuanImage-3.0
|