Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -62,11 +62,12 @@ def set_timesteps_patched(self, num_inference_steps: int, device = None):
|
|
62 |
# Image Editor
|
63 |
edit_file = hf_hub_download(repo_id="stabilityai/cosxl", filename="cosxl_edit.safetensors")
|
64 |
EDMEulerScheduler.set_timesteps = set_timesteps_patched
|
65 |
-
pipe_edit = StableDiffusionXLInstructPix2PixPipeline.from_single_file(
|
66 |
-
|
67 |
-
|
|
|
68 |
pipe_edit.load_lora_weights("KingNish/Better-Image-XL-Lora", weight_name="example-03.safetensors", adapter_name="lora")
|
69 |
-
pipe_edit.set_adapters(["lora"
|
70 |
pipe_edit.to("cuda")
|
71 |
|
72 |
# Generator
|
|
|
62 |
# Image Editor
|
63 |
edit_file = hf_hub_download(repo_id="stabilityai/cosxl", filename="cosxl_edit.safetensors")
|
64 |
EDMEulerScheduler.set_timesteps = set_timesteps_patched
|
65 |
+
pipe_edit = StableDiffusionXLInstructPix2PixPipeline.from_single_file(
|
66 |
+
edit_file, num_in_channels=8, is_cosxl_edit=True, vae=vae, torch_dtype=torch.float16,
|
67 |
+
)
|
68 |
+
pipe_edit.scheduler = EDMEulerScheduler(sigma_min=0.002, sigma_max=120.0, sigma_data=1.0, prediction_type="v_prediction")
|
69 |
pipe_edit.load_lora_weights("KingNish/Better-Image-XL-Lora", weight_name="example-03.safetensors", adapter_name="lora")
|
70 |
+
pipe_edit.set_adapters(["lora"])
|
71 |
pipe_edit.to("cuda")
|
72 |
|
73 |
# Generator
|