Update model.py
Browse files
model.py
CHANGED
|
@@ -4,6 +4,7 @@ import torch
|
|
| 4 |
# Replace with your model path if it's not from the Hugging Face model hub
|
| 5 |
# model_id = "https://api-inference.huggingface.co/models/awabxnero/imagen" # Your Hugging Face model repo
|
| 6 |
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell")
|
|
|
|
| 7 |
pipe = pipe.to("cuda") # Move model to GPU if available
|
| 8 |
|
| 9 |
# Function to generate image from prompt
|
|
|
|
| 4 |
# Replace with your model path if it's not from the Hugging Face model hub
|
| 5 |
# model_id = "https://api-inference.huggingface.co/models/awabxnero/imagen" # Your Hugging Face model repo
|
| 6 |
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell")
|
| 7 |
+
|
| 8 |
pipe = pipe.to("cuda") # Move model to GPU if available
|
| 9 |
|
| 10 |
# Function to generate image from prompt
|