Omer Karisman commited on
Commit ·
abe6901
1
Parent(s): 127f52e
updates
Browse filesFiles changed (2)
- predict.py+22-19
- requirements.txt+3-1
21 unmodified lines222324252627282930313233343536373839404142434445462 unmodified lines4950515253545556575859606121 unmodified linesguidance_scale: float = Input(description="Guidance scale for the model", default=3.0, ge=0.0, le=14.0),number_of_images: int = Input(description="Number of images to generate", default=1, ge=1, le=4),number_of_steps: int = Input(description="Number of steps for the model", default=10, ge=1, le=50),base_image: Path = Input(description="Base image for the model"),base_image_strength: float = Input(description="Base image strength for the model", default=0.15, ge=0.0, le=1.0),composition_image: Path = Input(description="Composition image for the model"),composition_image_strength: float = Input(description="Composition image strength for the model", default=1.0, ge=0.0, le=1.0),style_image: Path = Input(description="Style image for the model"),style_image_strength: float = Input(description="Style image strength for the model", default=1.0, ge=0.0, le=1.0),identity_image: Path = Input(description="Identity image for the model"),identity_image_strength: float = Input(description="Identity image strength for the model", default=1.0, ge=0.0, le=1.0),depth_image: Path = Input(description="Depth image for the model", default=None),depth_image_strength: float = Input(description="Depth image strength for the model, if not supplied the composition image will be used for depth", default=0.5, ge=0.0, le=1.0),) -> List[Path]:"""Run a single prediction on the model"""base_image = Image.open(base_image)composition_image = Image.open(composition_image)style_image = Image.open(style_image)identity_image = Image.open(identity_image)if depth_image is not None:depth_image = Image.open(depth_image)images = self.omni_zero.generate(seed=seed,prompt=prompt,2 unmodified linesnumber_of_images=number_of_images,number_of_steps=number_of_steps,base_image=base_image,base_image_strength=base_image_strength,composition_image=composition_image,composition_image_strength=composition_image_strength,style_image=style_image,style_image_strength=style_image_strength,identity_image=identity_image,identity_image_strength=identity_image_strength,depth_image=depth_image,depth_image_strength=depth_image_strength,)21 unmodified lines222324252627282930313233343536373839404142434445464748492 unmodified lines5253545556575859606162636421 unmodified linesguidance_scale: float = Input(description="Guidance scale for the model", default=3.0, ge=0.0, le=14.0),number_of_images: int = Input(description="Number of images to generate", default=1, ge=1, le=4),number_of_steps: int = Input(description="Number of steps for the model", default=10, ge=1, le=50),image_url: Path = Input(description="Base image for the model"),image_strength: float = Input(description="Base image strength for the model", default=0.15, ge=0.0, le=1.0),composition_image_url: Path = Input(description="Composition image for the model"),composition_strength: float = Input(description="Composition image strength for the model", default=1.0, ge=0.0, le=1.0),style_image_url: Path = Input(description="Style image for the model"),style_strength: float = Input(description="Style image strength for the model", default=1.0, ge=0.0, le=1.0),identity_image_url: Path = Input(description="Identity image for the model"),identity_strength: float = Input(description="Identity image strength for the model", default=1.0, ge=0.0, le=1.0),depth_image_url: Path = Input(description="Depth image for the model", default=None),depth_image_strength: float = Input(description="Depth image strength for the model, if not supplied the composition image will be used for depth", default=0.5, ge=0.0, le=1.0),) -> List[Path]:"""Run a single prediction on the model"""base_image = Image.open(image_url)composition_image = Image.open(composition_image_url)style_image = Image.open(style_image_url)identity_image = Image.open(identity_image_url)if depth_image_url is not None:depth_image = Image.open(depth_image_url)else:depth_image = Noneimages = self.omni_zero.generate(seed=seed,prompt=prompt,2 unmodified linesnumber_of_images=number_of_images,number_of_steps=number_of_steps,base_image=base_image,base_image_strength=image_strength,composition_image=composition_image,composition_image_strength=composition_strength,style_image=style_image,style_image_strength=style_strength,identity_image=identity_image,identity_image_strength=identity_strength,depth_image=depth_image,depth_image_strength=depth_image_strength,)
2 unmodified lines34567891011122 unmodified lines1516172 unmodified linescontrolnet_aux==0.0.8huggingface_hub==0.23.2insightface==0.7.3numpy==1.26.2opencv_contrib_python==4.9.0.80opencv_python==4.9.0.80opencv_python_headless==4.7.0.72Pillow==10.1.0torch==2.0.0torchsde==0.2.62 unmodified lineshf_transfergradiospaces2 unmodified lines3456789101112132 unmodified lines161718192 unmodified linescontrolnet_aux==0.0.8huggingface_hub==0.23.2insightface==0.7.3albumentations==1.4.3numpy==1.26.2opencv_contrib_python==4.9.0.80opencv_python==4.9.0.80opencv_python_headless==4.9.0.80Pillow==10.1.0torch==2.0.0torchsde==0.2.62 unmodified lineshf_transfergradiospacespydantic<2.0.0
predict.py+22-19
requirements.txt+3-1