Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
bc8b35c
1
Parent(s):
5635270
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
from diffusers import StableDiffusionXLPipeline, EDMEulerScheduler
|
3 |
from custom_pipeline import CosStableDiffusionXLInstructPix2PixPipeline
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
import numpy as np
|
@@ -40,8 +40,8 @@ def resize_image(image, resolution):
|
|
40 |
|
41 |
EDMEulerScheduler.set_timesteps = set_timesteps_patched
|
42 |
|
43 |
-
pipe_edit =
|
44 |
-
edit_file, num_in_channels=8
|
45 |
)
|
46 |
pipe_edit.scheduler = EDMEulerScheduler(sigma_min=0.002, sigma_max=120.0, sigma_data=1.0, prediction_type="v_prediction")
|
47 |
pipe_edit.to("cuda")
|
|
|
1 |
import gradio as gr
|
2 |
+
from diffusers import StableDiffusionXLPipeline, EDMEulerScheduler, StableDiffusionXLInstructPix2PixPipeline
|
3 |
from custom_pipeline import CosStableDiffusionXLInstructPix2PixPipeline
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
import numpy as np
|
|
|
40 |
|
41 |
EDMEulerScheduler.set_timesteps = set_timesteps_patched
|
42 |
|
43 |
+
pipe_edit = StableDiffusionXLInstructPix2PixPipeline.from_single_file(
|
44 |
+
edit_file, num_in_channels=8, is_cosxl_edit=True, torch_dtype=torch.float16
|
45 |
)
|
46 |
pipe_edit.scheduler = EDMEulerScheduler(sigma_min=0.002, sigma_max=120.0, sigma_data=1.0, prediction_type="v_prediction")
|
47 |
pipe_edit.to("cuda")
|