facebookincubator / AITemplate

AITemplate is a Python framework which renders neural network into high performance CUDA/HIP C++ code. Specialized for FP16 TensorCore (NVIDIA GPU) and MatrixCore (AMD GPU) inference.
Apache License 2.0
4.56k stars 370 forks source link

Working directory is hardcoded in StableDiffusionAITPipeline and StableDiffusionImg2ImgAITPipeline in examples #396

Open dhawalkp opened 1 year ago

dhawalkp commented 1 year ago

Issue: StableDiffusionAITPipeline and StableDiffusionImg2ImgAITPipeline in pipeline_stable_diffusion_ait.py and [pipeline_stable_diffusion_img2img_ait.py has workdir hardcoded to "tmp/" which might create problems where the file system locations are either read-only or users have restricted permissions in the current working directory. Examples include managed ML services in Cloud that might have file permission restrictions.

Desired behavior: User should be given flexibility to specify the custom location as workdir where AITemplate .so files are downloaded.

Files that needs a configurable workdir are below : https://github.com/facebookincubator/AITemplate/blob/262815bcf2bf76cc1addfc0fdbd555fccfba1689/examples/05_stable_diffusion/src/pipeline_stable_diffusion_img2img_ait.py#L112 https://github.com/facebookincubator/AITemplate/blob/262815bcf2bf76cc1addfc0fdbd555fccfba1689/examples/05_stable_diffusion/src/pipeline_stable_diffusion_ait.py#L101

khabinov commented 1 year ago

Hi @dhawalkp! Thanks, this is a good suggestion. You can submit a PR if it is blocker for you.

dhawalkp commented 1 year ago

@khabinov - Checked-in the fix using https://github.com/facebookincubator/AITemplate/pull/414

dhawalkp commented 1 year ago

Can anyone from maintainers group review and approve this PR - https://github.com/facebookincubator/AITemplate/pull/414

dhawalkp commented 1 year ago

@khabinov @terrychenism What are the next steps? Appreciate if we can resolve this asap