diff --git a/docs/_toc.yml b/docs/_toc.yml index 584b13853..b97e7d131 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -394,6 +394,7 @@ parts: title: YOLO <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD - file: source/reference/ai/stablediffusion title: Stable Diffusion @@ -410,10 +411,16 @@ parts: <<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) ======= +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) - file: source/reference/ai/custom title: Custom Model <<<<<<< HEAD ======= +======= + - file: source/reference/ai/stablediffusion + title: Stable Diffusion +>>>>>>> bf022329 (Add stable diffusion integration (#1240)) - file: source/reference/ai/custom-ai-function title: Bring Your Own AI Function diff --git a/evadb/evadb.yml b/evadb/evadb.yml index 11a2380ba..f60fb2eb9 100644 --- a/evadb/evadb.yml +++ b/evadb/evadb.yml @@ -27,7 +27,11 @@ third_party: OPENAI_KEY: "" PINECONE_API_KEY: "" PINECONE_ENV: "" +<<<<<<< HEAD <<<<<<< HEAD REPLICATE_API_TOKEN: "" ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +======= + REPLICATE_API_TOKEN: "" +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) diff --git a/evadb/functions/dalle.py b/evadb/functions/dalle.py index d373fda38..b9000bcf1 100644 --- a/evadb/functions/dalle.py +++ b/evadb/functions/dalle.py @@ -62,7 +62,11 @@ def forward(self, text_df): # Register API key, try configuration manager first openai.api_key = ConfigurationManager().get_value("third_party", "OPENAI_KEY") # If not found, try OS Environment Variable +<<<<<<< HEAD if openai.api_key is None or len(openai.api_key) == 0: +======= + if len(openai.api_key) == 0: +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) openai.api_key = os.environ.get("OPENAI_KEY", "") assert ( len(openai.api_key) != 0 diff --git a/evadb/functions/function_bootstrap_queries.py b/evadb/functions/function_bootstrap_queries.py index cbb736e68..b88dffdb7 100644 --- a/evadb/functions/function_bootstrap_queries.py +++ b/evadb/functions/function_bootstrap_queries.py @@ -237,6 +237,9 @@ ) <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) dalle_function_query = """CREATE FUNCTION IF NOT EXISTS DallE IMPL '{}/functions/dalle.py'; """.format( @@ -316,11 +319,16 @@ def init_builtin_functions(db: EvaDBDatabase, mode: str = "debug") -> None: # Mvit_function_query, Sift_function_query, Yolo_function_query, +<<<<<<< HEAD <<<<<<< HEAD stablediffusion_function_query, dalle_function_query, ======= >>>>>>> 2dacff69 (feat: sync master staging (#1050)) +======= + stablediffusion_function_query, + dalle_function_query, +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) ] # if mode is 'debug', add debug functions diff --git a/evadb/functions/stable_diffusion.py b/evadb/functions/stable_diffusion.py index 044195547..e628c506b 100644 --- a/evadb/functions/stable_diffusion.py +++ b/evadb/functions/stable_diffusion.py @@ -69,7 +69,11 @@ def forward(self, text_df): "third_party", "REPLICATE_API_TOKEN" ) # If not found, try OS Environment Variable +<<<<<<< HEAD if replicate_api_key is None: +======= + if len(replicate_api_key) == 0: +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) replicate_api_key = os.environ.get("REPLICATE_API_TOKEN", "") assert ( len(replicate_api_key) != 0 diff --git a/evadb/utils/generic_utils.py b/evadb/utils/generic_utils.py index 1617e8168..d7b08c42d 100644 --- a/evadb/utils/generic_utils.py +++ b/evadb/utils/generic_utils.py @@ -713,6 +713,9 @@ def string_comparison_case_insensitive(string_1, string_2) -> bool: return string_1.lower() == string_2.lower() <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) def try_to_import_replicate(): @@ -731,5 +734,8 @@ def is_replicate_available(): return True except ValueError: return False +<<<<<<< HEAD ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) diff --git a/script/test/test.sh b/script/test/test.sh index feb0ce24f..bd44772cb 100644 --- a/script/test/test.sh +++ b/script/test/test.sh @@ -96,6 +96,12 @@ long_integration_test() { notebook_test() { <<<<<<< HEAD <<<<<<< HEAD +======= +<<<<<<< HEAD + PYTHONPATH=./ python -m pytest --durations=5 --nbmake --overwrite "./tutorials" --capture=sys --tb=short -v --log-level=WARNING --nbmake-timeout=3000 --ignore="tutorials/08-chatgpt.ipynb" --ignore="tutorials/14-food-review-tone-analysis-and-response.ipynb" --ignore="tutorials/15-AI-powered-join.ipynb" --ignore="tutorials/16-homesale-forecasting.ipynb" --ignore="tutorials/17-home-rental-prediction.ipynb" +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD PYTHONPATH=./ python -m pytest --durations=5 --nbmake --overwrite "./tutorials" --capture=sys --tb=short -v --log-level=WARNING --nbmake-timeout=3000 --ignore="tutorials/08-chatgpt.ipynb" --ignore="tutorials/14-food-review-tone-analysis-and-response.ipynb" --ignore="tutorials/15-AI-powered-join.ipynb" --ignore="tutorials/16-homesale-forecasting.ipynb" --ignore="tutorials/17-home-rental-prediction.ipynb" --ignore="tutorials/18-stable-diffusion.ipynb" @@ -105,6 +111,7 @@ notebook_test() { ======= PYTHONPATH=./ python -m pytest --durations=5 --nbmake --overwrite "./tutorials" --capture=sys --tb=short -v --log-level=WARNING --nbmake-timeout=3000 --ignore="tutorials/08-chatgpt.ipynb" --ignore="tutorials/14-food-review-tone-analysis-and-response.ipynb" --ignore="tutorials/15-AI-powered-join.ipynb" --ignore="tutorials/16-homesale-forecasting.ipynb" --ignore="tutorials/17-home-rental-prediction.ipynb" >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +<<<<<<< HEAD ======= ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) @@ -119,6 +126,12 @@ notebook_test() { PYTHONPATH=./ python -m pytest --durations=5 --nbmake --overwrite "./tutorials" --capture=sys --tb=short -v --log-level=WARNING --nbmake-timeout=3000 --ignore="tutorials/08-chatgpt.ipynb" --ignore="tutorials/14-food-review-tone-analysis-and-response.ipynb" --ignore="tutorials/15-AI-powered-join.ipynb" --ignore="tutorials/16-homesale-forecasting.ipynb" --ignore="tutorials/17-home-rental-prediction.ipynb" >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +======= +>>>>>>> eva-master +======= + PYTHONPATH=./ python -m pytest --durations=5 --nbmake --overwrite "./tutorials" --capture=sys --tb=short -v --log-level=WARNING --nbmake-timeout=3000 --ignore="tutorials/08-chatgpt.ipynb" --ignore="tutorials/14-food-review-tone-analysis-and-response.ipynb" --ignore="tutorials/15-AI-powered-join.ipynb" --ignore="tutorials/16-homesale-forecasting.ipynb" --ignore="tutorials/17-home-rental-prediction.ipynb" --ignore="tutorials/18-stable-diffusion.ipynb" +>>>>>>> bf022329 (Add stable diffusion integration (#1240)) +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) code=$? print_error_code $code "NOTEBOOK TEST" } diff --git a/setup.py b/setup.py index 7637a4a79..72c8cdbc2 100644 --- a/setup.py +++ b/setup.py @@ -172,6 +172,10 @@ def read(path, encoding="utf-8"): "neuralforecast" # MODEL TRAIN AND FINE TUNING ] +imagegen_libs = [ + "replicate" +] + ### NEEDED FOR DEVELOPER TESTING ONLY dev_libs = [ @@ -221,7 +225,14 @@ def read(path, encoding="utf-8"): "xgboost": xgboost_libs, "forecasting": forecasting_libs, # everything except ray, qdrant, ludwig and postgres. The first three fail on pyhton 3.11. +<<<<<<< HEAD "dev": dev_libs + vision_libs + document_libs + function_libs + notebook_libs + forecasting_libs + sklearn_libs + imagegen_libs + xgboost_libs +======= +<<<<<<< HEAD + "dev": dev_libs + vision_libs + document_libs + function_libs + notebook_libs + forecasting_libs + sklearn_libs, +<<<<<<< HEAD +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) ======= "forecasting": forecasting_libs, # everything except ray, qdrant, ludwig and postgres. The first three fail on pyhton 3.11. @@ -240,6 +251,7 @@ def read(path, encoding="utf-8"): <<<<<<< HEAD <<<<<<< HEAD >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +<<<<<<< HEAD ======= ======= "forecasting": forecasting_libs, @@ -250,6 +262,12 @@ def read(path, encoding="utf-8"): ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +======= +>>>>>>> eva-master +======= + "dev": dev_libs + vision_libs + document_libs + function_libs + notebook_libs + forecasting_libs + sklearn_libs + imagegen_libs, +>>>>>>> bf022329 (Add stable diffusion integration (#1240)) +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) } setup( diff --git a/test/markers.py b/test/markers.py index b3f8a4019..f3e4fc138 100644 --- a/test/markers.py +++ b/test/markers.py @@ -45,6 +45,9 @@ is_pinecone_available, is_qdrant_available, <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) is_replicate_available, is_sklearn_available, is_xgboost_available, @@ -129,9 +132,15 @@ reason="Run only if forecasting packages available", ) <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240)) stable_diffusion_skip_marker = pytest.mark.skipif( is_replicate_available() is False, reason="requires replicate" ) +<<<<<<< HEAD ======= >>>>>>> 2dacff69 (feat: sync master staging (#1050)) +======= +>>>>>>> 2b924b76 (Add stable diffusion integration (#1240))