Spaces:
Running
Running
OmPrakashSingh1704
commited on
Commit
•
095021a
1
Parent(s):
5d37dd0
update
Browse files
options/Banner_Model/Image2Image_2.py
CHANGED
@@ -18,6 +18,8 @@ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
|
18 |
# pipe.enable_model_cpu_offload()
|
19 |
|
20 |
def I2I_2(image, prompt,size,num_inference_steps):
|
|
|
|
|
21 |
image.resize((size,size))
|
22 |
image=processor(image)
|
23 |
generator = torch.Generator(device=device).manual_seed(0)
|
|
|
18 |
# pipe.enable_model_cpu_offload()
|
19 |
|
20 |
def I2I_2(image, prompt,size,num_inference_steps):
|
21 |
+
if not isinstance(image, Image.Image):
|
22 |
+
image = Image.fromarray(image)
|
23 |
image.resize((size,size))
|
24 |
image=processor(image)
|
25 |
generator = torch.Generator(device=device).manual_seed(0)
|
options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc
CHANGED
Binary files a/options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc and b/options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc differ
|
|