diff --git a/interrogators/blip_interrogator.py b/interrogators/blip_interrogator.py index d4f81c7..3b0010b 100644 --- a/interrogators/blip_interrogator.py +++ b/interrogators/blip_interrogator.py @@ -48,7 +48,7 @@ class BLIPInterrogator(Interrogator): try: model_path = fetch_model('Salesforce/blip2-opt-6.7b', "blip2") self.processor = AutoProcessor.from_pretrained(model_path) - self.model = Blip2ForConditionalGeneration.from_pretrained(model_path, torch_dtype=torch.float16, load_in_8bit=True) + self.model = Blip2ForConditionalGeneration.from_pretrained(model_path, torch_dtype=torch.float16, load_in_8bit=False) self.device = "cuda" if torch.cuda.is_available() else "cpu" self.model.to(self.device) except: diff --git a/interrogators/llava2_interrogator.py b/interrogators/llava2_interrogator.py index 30644f8..63823c1 100644 --- a/interrogators/llava2_interrogator.py +++ b/interrogators/llava2_interrogator.py @@ -43,7 +43,7 @@ Avoid adding new information not supported by the existing caption or the image. class LLAVA2Interrogator(Interrogator): model = None processor = None - params = {"max_tokens": 75, "load_mplug_8bit": True} + params = {"max_tokens": 75, "load_mplug_8bit": False} def __init__(self, params: ProcessParams): super().__init__(params) diff --git a/process_params.py b/process_params.py index 4625b60..fbab0f4 100644 --- a/process_params.py +++ b/process_params.py @@ -25,7 +25,7 @@ class ProcessParams: dst: str = "" face_model: str = "Codeformers" flip: bool = False - load_mplug_8bit: bool = True + load_mplug_8bit: bool = False max_clip_tokens: float = 1.0 max_size: int = 1024 max_tokens: int = 75 diff --git a/smartprocess.py b/smartprocess.py index 5e92934..c366746 100644 --- a/smartprocess.py +++ b/smartprocess.py @@ -561,7 +561,6 @@ def process_post(files: ImageData, params: ProcessParams) -> List[ImageData]: if params.upscale: total_post += total_files pbar = tqdm(total=total_post, desc="Post-processing images") - params.do_rename = False upscalers = [] if params.upscale: @@ -570,7 +569,7 @@ def process_post(files: ImageData, params: ProcessParams) -> List[ImageData]: upscalers.append(params.upscaler_1) if params.upscaler_2 is not None and params.upscaler_2 != "None": upscalers.append(params.upscaler_2) - + img_index = 0 for file in files: img = file.get_image() if params.restore_faces: @@ -637,10 +636,11 @@ def process_post(files: ImageData, params: ProcessParams) -> List[ImageData]: shared.state.current_image = img if params.save_image: - img_path = save_pic(img, file, 0, params) + img_path = save_pic(img, file, img_index, params) file.image_path = img_path file.update_image(img, False) output.append(file) + img_index += 1 return output