Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
from diffusers import StableDiffusionImg2ImgPipeline
|
|
|
4 |
import torch
|
5 |
from PIL import Image
|
6 |
from diffusers import StableDiffusionPipeline
|
@@ -24,7 +25,7 @@ from diffusers import StableDiffusionPipeline
|
|
24 |
# lora_model_id = "openfree/flux-chatgpt-ghibli-lora"
|
25 |
# pipe.load_lora_weights(lora_model_id)
|
26 |
|
27 |
-
pipe =
|
28 |
pipe.load_lora_weights('openfree/flux-chatgpt-ghibli-lora', weight_name='flux-chatgpt-ghibli-lora.safetensors')
|
29 |
|
30 |
# Move pipeline to GPU if available
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
from diffusers import StableDiffusionImg2ImgPipeline
|
4 |
+
from diffusers import AutoPipelineForImage2Image
|
5 |
import torch
|
6 |
from PIL import Image
|
7 |
from diffusers import StableDiffusionPipeline
|
|
|
25 |
# lora_model_id = "openfree/flux-chatgpt-ghibli-lora"
|
26 |
# pipe.load_lora_weights(lora_model_id)
|
27 |
|
28 |
+
pipe = AutoPipelineForImage2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.bfloat16)
|
29 |
pipe.load_lora_weights('openfree/flux-chatgpt-ghibli-lora', weight_name='flux-chatgpt-ghibli-lora.safetensors')
|
30 |
|
31 |
# Move pipeline to GPU if available
|