Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ model_id = "alaa-lab/InstructCV"
|
|
38 |
|
39 |
def main():
|
40 |
# pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None).to("cpu")
|
41 |
-
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, safety_checker=None).to("cuda")
|
42 |
example_image = Image.open("imgs/example2.jpg").convert("RGB")
|
43 |
|
44 |
|
@@ -49,8 +49,8 @@ def main():
|
|
49 |
example_instruction,
|
50 |
seed,
|
51 |
0,
|
52 |
-
text_cfg_scale,
|
53 |
-
image_cfg_scale,
|
54 |
)
|
55 |
|
56 |
def generate(
|
|
|
38 |
|
39 |
def main():
|
40 |
# pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None).to("cpu")
|
41 |
+
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None).to("cuda")
|
42 |
example_image = Image.open("imgs/example2.jpg").convert("RGB")
|
43 |
|
44 |
|
|
|
49 |
example_instruction,
|
50 |
seed,
|
51 |
0,
|
52 |
+
text_cfg_scale: float,
|
53 |
+
image_cfg_scale: float,
|
54 |
)
|
55 |
|
56 |
def generate(
|