Add suport for width and height
This commit is contained in:
@@ -0,0 +1 @@
|
||||
__pycache__
|
||||
+10
-2
@@ -38,6 +38,8 @@ class PhotoMaker_Zho:
|
||||
"steps": ("INT", {"default": 50, "min": 1, "max": 100, "step": 1, "display": "slider"}),
|
||||
"guidance_scale": ("FLOAT", {"default": 5, "min": 0.1, "max": 10.0, "step": 0.1, "display": "slider"}),
|
||||
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
|
||||
"width": ("INT", {"default": 1024, "min": 512, "max": 2048, "step": 32}),
|
||||
"height": ("INT", {"default": 1024, "min": 512, "max": 2048, "step": 32}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +48,7 @@ class PhotoMaker_Zho:
|
||||
FUNCTION = "process_images"
|
||||
CATEGORY = "📷PhotoMaker"
|
||||
|
||||
def process_images(self, base_model_path, ref_image, prompt, negative_prompt, style_name, style_strength_ratio, steps, guidance_scale, seed):
|
||||
def process_images(self, base_model_path, ref_image, prompt, negative_prompt, style_name, style_strength_ratio, steps, guidance_scale, seed, width, height):
|
||||
|
||||
# Load base model
|
||||
pipe = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
|
||||
@@ -90,6 +92,8 @@ class PhotoMaker_Zho:
|
||||
start_merge_step=start_merge_step,
|
||||
generator=generator,
|
||||
guidance_scale=guidance_scale,
|
||||
width=width,
|
||||
height=height,
|
||||
return_dict=False
|
||||
)
|
||||
|
||||
@@ -136,6 +140,8 @@ class PhotoMaker_Batch_Zho:
|
||||
"steps": ("INT", {"default": 50, "min": 1, "max": 100, "step": 1, "display": "slider"}),
|
||||
"guidance_scale": ("FLOAT", {"default": 5, "min": 0.1, "max": 10.0, "step": 0.1, "display": "slider"}),
|
||||
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
|
||||
"width": ("INT", {"default": 1024, "min": 512, "max": 2048, "step": 32}),
|
||||
"height": ("INT", {"default": 1024, "min": 512, "max": 2048, "step": 32}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +150,7 @@ class PhotoMaker_Batch_Zho:
|
||||
FUNCTION = "process_images"
|
||||
CATEGORY = "📷PhotoMaker"
|
||||
|
||||
def process_images(self, base_model_path, ref_images_path, prompt, negative_prompt, style_name, style_strength_ratio, steps, guidance_scale, seed):
|
||||
def process_images(self, base_model_path, ref_images_path, prompt, negative_prompt, style_name, style_strength_ratio, steps, guidance_scale, seed, width, height):
|
||||
|
||||
# Load base model
|
||||
pipe = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
|
||||
@@ -193,6 +199,8 @@ class PhotoMaker_Batch_Zho:
|
||||
start_merge_step=start_merge_step,
|
||||
generator=generator,
|
||||
guidance_scale=guidance_scale,
|
||||
width=width,
|
||||
height=height,
|
||||
return_dict=False
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user