diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/llm1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/llm1_history.txt new file mode 100644 index 0000000..591d173 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/llm1_history.txt @@ -0,0 +1,18 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: +Think in black and white linestyle, no areas should be filled. Adding to the image will make it magical and special. Imagine a tall mountain landscape with snowy peaks rising high into the sky. In the foreground there are large boulders scattered across the ground, some of them have small trees growing out of them. A thick mist rises from behind the mountains \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/merg1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/merg1_history.txt new file mode 100644 index 0000000..a4e7cfd --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/merg1_history.txt @@ -0,0 +1,17 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/simp0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/simp0_history.txt new file mode 100644 index 0000000..85636ab --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/simp0_history.txt @@ -0,0 +1,15 @@ +Input: + + + + +Output: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/simp1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/simp1_history.txt new file mode 100644 index 0000000..12303f2 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/history/simp1_history.txt @@ -0,0 +1,8 @@ +Input: + + + + +Output: + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/network.py new file mode 100644 index 0000000..230b2e4 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_28_21/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", inp, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 10 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = inp, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/llm1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/llm1_history.txt new file mode 100644 index 0000000..0634f2b --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/llm1_history.txt @@ -0,0 +1,18 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: +You have created an extraordinary black and white linestyle image of a tree in the middle of a vast desert landscape. The tree stands tall with long thin branches that sway gently in the breeze. Surrounding it are rolling sand dunes, some as high as ten feet. The sky above is a brilliant blue with fluffy clouds drifting by. In the distance you can see mountains \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/merg1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/merg1_history.txt new file mode 100644 index 0000000..a4e7cfd --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/merg1_history.txt @@ -0,0 +1,17 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/simp0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/simp0_history.txt new file mode 100644 index 0000000..85636ab --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/simp0_history.txt @@ -0,0 +1,15 @@ +Input: + + + + +Output: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/simp1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/simp1_history.txt new file mode 100644 index 0000000..12303f2 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/history/simp1_history.txt @@ -0,0 +1,8 @@ +Input: + + + + +Output: + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/network.py new file mode 100644 index 0000000..230b2e4 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_39_31/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", inp, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 10 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = inp, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/llm1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/llm1_history.txt new file mode 100644 index 0000000..3aa0ae5 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/llm1_history.txt @@ -0,0 +1,19 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: + +You have created an extraordinary image. In the center, there's a huge castle surrounded by high walls and tall towers. It looks like it has been standing for centuries, guarded by ancient mythical creatures that are depicted on its stone walls. The castle is surrounded by a lush green forest with trees reaching up to the sky, as if trying to touch the clouds \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/merg1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/merg1_history.txt new file mode 100644 index 0000000..a4e7cfd --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/merg1_history.txt @@ -0,0 +1,17 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/simp0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/simp0_history.txt new file mode 100644 index 0000000..85636ab --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/simp0_history.txt @@ -0,0 +1,15 @@ +Input: + + + + +Output: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/simp1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/simp1_history.txt new file mode 100644 index 0000000..12303f2 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/history/simp1_history.txt @@ -0,0 +1,8 @@ +Input: + + + + +Output: + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/network.py new file mode 100644 index 0000000..991d084 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_41_28/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", inp, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 10 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = rand, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/network.py new file mode 100644 index 0000000..991d084 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_44_46/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", inp, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 10 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = rand, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/inter1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/inter1_history.txt new file mode 100644 index 0000000..b657faf --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/inter1_history.txt @@ -0,0 +1,7 @@ +Input: + + + + +Output: +a man with glasses and a beard, standing in front of a white background, portrait of linus torvalds, bill gates full body portrait, portrait of hank hill, 8k high quality detailed art, highly detailed exquisite fanart, rotoscoped, high quality 16k digital art, realistic self portrait, man with glasses, albert wesker full body portrait \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/inter1_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/inter1_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/inter1_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/merg1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/merg1_history.txt new file mode 100644 index 0000000..a4e7cfd --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/merg1_history.txt @@ -0,0 +1,17 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history.txt new file mode 100644 index 0000000..9e41ab5 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history.txt @@ -0,0 +1,6 @@ +Input: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history_output_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history_output_image.jpg new file mode 100644 index 0000000..8b16073 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/rand0_history_output_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/simp0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/simp0_history.txt new file mode 100644 index 0000000..85636ab --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/simp0_history.txt @@ -0,0 +1,15 @@ +Input: + + + + +Output: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/simp1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/simp1_history.txt new file mode 100644 index 0000000..12303f2 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/history/simp1_history.txt @@ -0,0 +1,8 @@ +Input: + + + + +Output: + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/network.py new file mode 100644 index 0000000..991d084 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_45_30/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", inp, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 10 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = rand, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/inter1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/inter1_history.txt new file mode 100644 index 0000000..b657faf --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/inter1_history.txt @@ -0,0 +1,7 @@ +Input: + + + + +Output: +a man with glasses and a beard, standing in front of a white background, portrait of linus torvalds, bill gates full body portrait, portrait of hank hill, 8k high quality detailed art, highly detailed exquisite fanart, rotoscoped, high quality 16k digital art, realistic self portrait, man with glasses, albert wesker full body portrait \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/inter1_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/inter1_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/inter1_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/merg1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/merg1_history.txt new file mode 100644 index 0000000..a4e7cfd --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/merg1_history.txt @@ -0,0 +1,17 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history.txt new file mode 100644 index 0000000..9e41ab5 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history.txt @@ -0,0 +1,6 @@ +Input: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history_output_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history_output_image.jpg new file mode 100644 index 0000000..d961b1e Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/rand0_history_output_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/simp0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/simp0_history.txt new file mode 100644 index 0000000..85636ab --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/simp0_history.txt @@ -0,0 +1,15 @@ +Input: + + + + +Output: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/simp1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/simp1_history.txt new file mode 100644 index 0000000..12303f2 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/history/simp1_history.txt @@ -0,0 +1,8 @@ +Input: + + + + +Output: + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/network.py new file mode 100644 index 0000000..ebad016 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_47_37/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", inp, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 20 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = rand, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/network.py new file mode 100644 index 0000000..8b07d3c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_50_40/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", None, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 20 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = inp, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/inter1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/inter1_history.txt new file mode 100644 index 0000000..b657faf --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/inter1_history.txt @@ -0,0 +1,7 @@ +Input: + + + + +Output: +a man with glasses and a beard, standing in front of a white background, portrait of linus torvalds, bill gates full body portrait, portrait of hank hill, 8k high quality detailed art, highly detailed exquisite fanart, rotoscoped, high quality 16k digital art, realistic self portrait, man with glasses, albert wesker full body portrait \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/inter1_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/inter1_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/inter1_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/merg1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/merg1_history.txt new file mode 100644 index 0000000..a4e7cfd --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/merg1_history.txt @@ -0,0 +1,17 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history.txt new file mode 100644 index 0000000..9e41ab5 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history.txt @@ -0,0 +1,6 @@ +Input: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history_output_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history_output_image.jpg new file mode 100644 index 0000000..ff8ee43 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/rand0_history_output_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/simp0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/simp0_history.txt new file mode 100644 index 0000000..85636ab --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/simp0_history.txt @@ -0,0 +1,15 @@ +Input: + + + + +Output: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/simp1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/simp1_history.txt new file mode 100644 index 0000000..12303f2 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/history/simp1_history.txt @@ -0,0 +1,8 @@ +Input: + + + + +Output: + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/network.py new file mode 100644 index 0000000..8b07d3c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_51_38/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", None, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 20 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = inp, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/inter1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/inter1_history.txt new file mode 100644 index 0000000..b657faf --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/inter1_history.txt @@ -0,0 +1,7 @@ +Input: + + + + +Output: +a man with glasses and a beard, standing in front of a white background, portrait of linus torvalds, bill gates full body portrait, portrait of hank hill, 8k high quality detailed art, highly detailed exquisite fanart, rotoscoped, high quality 16k digital art, realistic self portrait, man with glasses, albert wesker full body portrait \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/inter1_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/inter1_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/inter1_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/merg1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/merg1_history.txt new file mode 100644 index 0000000..a4e7cfd --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/merg1_history.txt @@ -0,0 +1,17 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history.txt new file mode 100644 index 0000000..9e41ab5 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history.txt @@ -0,0 +1,6 @@ +Input: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history_output_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history_output_image.jpg new file mode 100644 index 0000000..17ed6b5 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/rand0_history_output_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/simp0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/simp0_history.txt new file mode 100644 index 0000000..85636ab --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/simp0_history.txt @@ -0,0 +1,15 @@ +Input: + + + + +Output: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/simp1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/simp1_history.txt new file mode 100644 index 0000000..12303f2 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/history/simp1_history.txt @@ -0,0 +1,8 @@ +Input: + + + + +Output: + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/network.py new file mode 100644 index 0000000..8b07d3c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_54_33/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", None, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 20 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = inp, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history.txt new file mode 100644 index 0000000..c872ec9 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history.txt @@ -0,0 +1,8 @@ +Input: + +Create an extraordinary image by adding a magical element to the existing image. Think outside of the box and inspire people through creativity. No areas should be filled, style is black and white linestyle. Use only thick lines to draw your creation. For example, you could add a garden to a house or a truck out of a car as outlined previously to any of these images. + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history_input_image.jpg new file mode 100644 index 0000000..057d40a Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history_output_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history_output_image.jpg new file mode 100644 index 0000000..7e8a526 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/diff1_history_output_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/inter1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/inter1_history.txt new file mode 100644 index 0000000..b657faf --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/inter1_history.txt @@ -0,0 +1,7 @@ +Input: + + + + +Output: +a man with glasses and a beard, standing in front of a white background, portrait of linus torvalds, bill gates full body portrait, portrait of hank hill, 8k high quality detailed art, highly detailed exquisite fanart, rotoscoped, high quality 16k digital art, realistic self portrait, man with glasses, albert wesker full body portrait \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/inter1_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/inter1_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/inter1_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/llm1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/llm1_history.txt new file mode 100644 index 0000000..486c7ae --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/llm1_history.txt @@ -0,0 +1,19 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + a man with glasses and a beard, standing in front of a white background, portrait of linus torvalds, bill gates full body portrait, portrait of hank hill, 8k high quality detailed art, highly detailed exquisite fanart, rotoscoped, high quality 16k digital art, realistic self portrait, man with glasses, albert wesker full body portrait +New image description: + + + + +Output: + +Create an extraordinary image by adding a magical element to the existing image. Think outside of the box and inspire people through creativity. No areas should be filled, style is black and white linestyle. Use only thick lines to draw your creation. For example, you could add a garden to a house or a truck out of a car as outlined previously to any of these images. diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/merg1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/merg1_history.txt new file mode 100644 index 0000000..a4e7cfd --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/merg1_history.txt @@ -0,0 +1,17 @@ +Input: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is + +New image description: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/over0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/over0_history.txt new file mode 100644 index 0000000..9e41ab5 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/over0_history.txt @@ -0,0 +1,6 @@ +Input: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/over0_history_output_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/over0_history_output_image.jpg new file mode 100644 index 0000000..bbffa26 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/over0_history_output_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history.txt new file mode 100644 index 0000000..9e41ab5 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history.txt @@ -0,0 +1,6 @@ +Input: + + + + +Output: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history_input_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history_input_image.jpg new file mode 100644 index 0000000..9ec1432 Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history_input_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history_output_image.jpg b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history_output_image.jpg new file mode 100644 index 0000000..057d40a Binary files /dev/null and b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/rand0_history_output_image.jpg differ diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/simp0_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/simp0_history.txt new file mode 100644 index 0000000..85636ab --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/simp0_history.txt @@ -0,0 +1,15 @@ +Input: + + + + +Output: +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/simp1_history.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/simp1_history.txt new file mode 100644 index 0000000..12303f2 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/history/simp1_history.txt @@ -0,0 +1,8 @@ +Input: + + + + +Output: + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/config.json b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/config.json new file mode 100644 index 0000000..ab4737c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/config.json @@ -0,0 +1,24 @@ +{ + "llm-path": "./weights/llm/llama-2-7b-chat.ggmlv3.q8_0.bin", + "llm-model": "mistral", + "llm-layers": 15, + + "stable-config-path": "./model/layers/stable.json", + "stable-path": "runwayml/stable-diffusion-v1-5", + "docu-path": "./documentation/", + "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", + + "output-image-name": "output.png", + + "merge-output-folder": "./images/output/", + + "string0": "./model/layers/string0.txt", + "string1": "./model/layers/string1.txt", + + "network-file": "./model/network.py" +} + + + + diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/stable.json b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/stable.json new file mode 100644 index 0000000..c5bde84 --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/stable.json @@ -0,0 +1,6 @@ +{ + "imagePath": "./images/rand.jpg", + "cache": "./images/testCache.jpg", + "guidance_scale": 7, + "strength": 0.65 +} \ No newline at end of file diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/string0.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/string0.txt new file mode 100644 index 0000000..95be46a --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/string0.txt @@ -0,0 +1,9 @@ +You are a very creative artist. +Thing of something extraordinary. +thing of something what you can add to this image to make it magic and special +think in a way that inspires people and which makes them happy +do not describe the style of the new image mention that no areas should be filled and style is black and white linestyle +be very creative for example to a house you could add a garden or to a car a trailer you can even draw a truck out of a car +the description should be something which makes sense +the description should include that only thick lines should be drawn +The image description is diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/string1.txt b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/string1.txt new file mode 100644 index 0000000..d55d2df --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/layers/string1.txt @@ -0,0 +1,2 @@ + +New image description: diff --git a/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/network.py b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/network.py new file mode 100644 index 0000000..8b07d3c --- /dev/null +++ b/code/ai_pipeline/documentation/2024_04_24_10_55_38/model/network.py @@ -0,0 +1,29 @@ +from utils.layers import * +import json + + +settings = json.load( open( "./model/config.json", "r") ) + +input_image = settings[ "original-image-path" ] + + +inp = Interrogator( "inter1", input_image ) +rand = RandomLineDrawer( "rand0", None, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 20 ) + +simp0 = SimpleString( "simp0", settings[ "string0" ] ) +simp1 = SimpleString( "simp1", settings[ "string1" ] ) + +merg = Merger( "merg1", [ simp0, simp1 ] ) + +llm = LLM( "llm1", prompt = merg, prevElement = inp, prevElementKey = "" ) + +diff = StableDiffusion( "diff1", settings[ "stable-config-path" ], llm, rand ) + +over = Overlapper( "over0", + diff, + input_image, + "./images/testCache.jpg", + mergedOutputFolder = settings[ "merge-output-folder" ], + outputImageName = settings[ "output-image-name" ] ) + +model = Model( over ) \ No newline at end of file diff --git a/code/ai_pipeline/images/output/output.png b/code/ai_pipeline/images/output/output.png index 26b97b5..50d5820 100644 Binary files a/code/ai_pipeline/images/output/output.png and b/code/ai_pipeline/images/output/output.png differ diff --git a/code/ai_pipeline/images/rand.jpg b/code/ai_pipeline/images/rand.jpg new file mode 100644 index 0000000..9388a16 Binary files /dev/null and b/code/ai_pipeline/images/rand.jpg differ diff --git a/code/ai_pipeline/images/test.jpg b/code/ai_pipeline/images/test.jpg index 1b8b471..da89d75 100644 Binary files a/code/ai_pipeline/images/test.jpg and b/code/ai_pipeline/images/test.jpg differ diff --git a/code/ai_pipeline/images/testCache.jpg b/code/ai_pipeline/images/testCache.jpg index 4388563..7e8a526 100644 Binary files a/code/ai_pipeline/images/testCache.jpg and b/code/ai_pipeline/images/testCache.jpg differ diff --git a/code/ai_pipeline/model/config.json b/code/ai_pipeline/model/config.json index 0e9869e..ab4737c 100644 --- a/code/ai_pipeline/model/config.json +++ b/code/ai_pipeline/model/config.json @@ -7,6 +7,7 @@ "stable-path": "runwayml/stable-diffusion-v1-5", "docu-path": "./documentation/", "original-image-path": "./images/test.jpg", + "random-line-cache": "./images/rand.jpg", "output-image-name": "output.png", diff --git a/code/ai_pipeline/model/layers/stable.json b/code/ai_pipeline/model/layers/stable.json index a03724b..c5bde84 100644 --- a/code/ai_pipeline/model/layers/stable.json +++ b/code/ai_pipeline/model/layers/stable.json @@ -1,5 +1,5 @@ { - "imagePath": "./images/test.jpg", + "imagePath": "./images/rand.jpg", "cache": "./images/testCache.jpg", "guidance_scale": 7, "strength": 0.65 diff --git a/code/ai_pipeline/model/network.py b/code/ai_pipeline/model/network.py index b32d334..8b07d3c 100644 --- a/code/ai_pipeline/model/network.py +++ b/code/ai_pipeline/model/network.py @@ -8,7 +8,7 @@ inp = Interrogator( "inter1", input_image ) -rand = RandomLineDrawer( "rand0", inp, input_image, settings[ "original-image-path" ], pen_size = 4, num_random_lines = 10 ) +rand = RandomLineDrawer( "rand0", None, input_image, settings[ "random-line-cache" ], pen_size = 4, num_random_lines = 20 ) simp0 = SimpleString( "simp0", settings[ "string0" ] ) simp1 = SimpleString( "simp1", settings[ "string1" ] ) diff --git a/code/ai_pipeline/simulation.py b/code/ai_pipeline/simulation.py new file mode 100644 index 0000000..dfad109 --- /dev/null +++ b/code/ai_pipeline/simulation.py @@ -0,0 +1,6 @@ +import utils.les as les + + +points = les.GetPointsFromImage( "./images/test.jpg", "./images/output/output.png", penSize = 5 ) + +print( points ) \ No newline at end of file diff --git a/code/ai_pipeline/utils/layers.py b/code/ai_pipeline/utils/layers.py index b280e7e..bfc884e 100644 --- a/code/ai_pipeline/utils/layers.py +++ b/code/ai_pipeline/utils/layers.py @@ -8,7 +8,7 @@ import cv2 -from clip_interrogator import Config, Interrogator +import clip_interrogator from langchain.llms import LlamaCpp from diffusers import StableDiffusionImg2ImgPipeline @@ -32,9 +32,9 @@ # Load the clip interrogator try: - config = Config(clip_model_name="ViT-L-14/openai" ) + config = clip_interrogator.Config(clip_model_name="ViT-L-14/openai" ) config.apply_low_vram_defaults() - Interrogator = Interrogator( config ) + INTER = clip_interrogator.Interrogator( config ) except: print( "<<< ERROR >>> [Interrogator]: Error when setting up the interrogator" ) @@ -129,7 +129,7 @@ def __init__( self, name, imagePath : str, prevElement = None ): self.name = name def forward( self, id : str, verbose : bool = True, document : bool = True ) -> str: - global Interrogator + global INTER if self.prevElement != None: self.prevElement.forward( id, verbose ) @@ -140,7 +140,7 @@ def forward( self, id : str, verbose : bool = True, document : bool = True ) -> raise Exception( f"Error with Interrogator\nCouldnt find image with the path{self.__imgPath}" ) print( ">>>[CHAIN][Interrogator]: Generating prompt..." ) - prompt = Interrogator.interrogate_fast( img ) + prompt = INTER.interrogate_fast( img ) if document: self.addToHistory( id, self.name, output = prompt, inputImage = img ) @@ -192,12 +192,10 @@ def forward( self, id : str, verbose : bool = True, document : bool = True ): prompt = self.__promptElement.forward( id, verbose, document ) print( f">>>[CHAIN][LLM] prompt = {prompt}") - try: - insertment = self.__prevElement.forward( id, verbose, document ) - print( f">>>[CHAIN][LLM]: Insertment {insertment} " ) - prompt = prompt.replace( self.__prevElementKey, insertment ) - except: - pass + + insertment = self.__prevElement.forward( id, verbose, document ) + print( f">>>[CHAIN][LLM]: Insertment {insertment} " ) + prompt = prompt.replace( self.__prevElementKey, insertment ) if verbose: print( f">>>[CHAIN][LLM]: Generating prompt..." ) @@ -288,10 +286,7 @@ def forward( self, id : str, verbose : bool = True, document : bool = True ): if verbose: print( ">>>[CHAIN][DIFFUSION]: Getting Prompt..." ) - try: - self.__prevImageElement.forward( id, verbose, document ) - except: - pass + self.__prevImageElement.forward( id, verbose, document ) try: prompt = self.__prevElement.forward( id, verbose, document ) @@ -335,7 +330,8 @@ def __init__( self, name, prevElement, input_image : str, output_image : str, nu def forward( self, id : str, verbose : bool = True, document : bool = True ): - self.__prevElement.forward( id, verbose, document ) + if self.__prevElement != None: + self.__prevElement.forward( id, verbose, document ) img = cv2.imread( self.__inputPath ) img = cv2.resize( img, ( 768, 512 ) ) @@ -344,10 +340,12 @@ def forward( self, id : str, verbose : bool = True, document : bool = True ): image = np.copy( img ) for i in range( self.__num_random_lines ): line = self.getRandomLine( image.shape, np.random.randint( 10, 40 ), dDegree = 30 ) - image = cv2.polylines( image, line, True, ( 0, 0, 0 ), self.__penSize, lineType = cv2.LINE_AA ) + image = cv2.polylines( image, [ line ], False, ( 0, 0, 0 ), self.__penSize ) inputImage = Image.open( self.__inputPath ).convert('RGB') + print( f">>> [CHAIN][OVERLAPPER] Saving Image to {self.__outputPath}") + cv2.imwrite( self.__outputPath, image ) outputImage = Image.open( self.__outputPath ).convert('RGB') @@ -446,3 +444,5 @@ def __init__( self, output : ChainElement ): def forward( self, id : str = "", verbose : bool = True, document : bool = True ): self.output.forward( id, verbose, document ) + +