JP-D/BlenderLLM-7.6B_GGUF
BlenderLLM GGUF files
BlenderLLM convert to GGUF https://huggingface.co/FreedomIntelligence/BlenderLLM 3 files: FP16, Q4KM, and Q8.
Example prompt: "Let’s create a birthday cake with three layers. The bottom layer should be chocolate, the middle layer vanilla, and the top layer red velvet. Each layer should be separated by a thick layer of buttercream frosting. Add a decorative border of frosting around the top edge, and place colorful sprinkles all over the surface. Finally, add a Happy Birthday message on top."
Result (code):
import bpy
#Step 1: Clear the Scene bpy.ops.object.selectall(action='DESELECT') bpy.ops.object.selectby_type(type='MESH') bpy.ops.object.delete()
#Define the colors chocolate = bpy.data.materials.new(name="Chocolate") chocolate.diffusecolor = (0.24, 0.15, 0.10, 1) # Chocolate color vanilla = bpy.data.materials.new(name="Vanilla") vanilla.diffusecolor = (1.0, 0.98, 0.90, 1) # Vanilla color redvelvet = bpy.data.materials.new(name="Red Velvet") redvelvet.diffusecolor = (0.8, 0.1, 0.1, 1) # Red velvet color buttercream = bpy.data.materials.new(name="Buttercream") buttercream.diffusecolor = (1.0, 0.95, 0.87, 1) # Buttercream color
#Step 2: Create the Bottom Layer (Chocolate) bpy.ops.mesh.primitivecylinderadd(radius=1.5, depth=0.5, location=(0, 0, 0)) bottomlayer = bpy.context.object bottomlayer.name = "Bottom Layer" bottom_layer.data.materials.append(chocolate)
#Step 3: Create the Middle Layer (Vanilla) bpy.ops.mesh.primitivecylinderadd(radius=1.2, depth=0.4, location=(0, 0, 0.5)) middlelayer = bpy.context.object middlelayer.name = "Middle Layer" middle_layer.data.materials.append(vanilla)
#Step 4: Create the Top Layer (Red Velvet) by.ops.mesh.primitivecylinderadd(radius=0.9, depth=0.3, location=(0, 0, 0.9)) toplayer = bpy.context.object toplayer.name = "Top Layer" toplayer.data.materials.append(redvelvet)
#Step 5: Create the Buttercream Frosting Layers for i in range(2): bpy.ops.mesh.primitivecylinderadd(radius=1.5 - 0.3 i, depth=0.1, location=(0, 0, 0.3 + 0.4 i)) frostinglayer = bpy.context.object frostinglayer.name = f"Frosting Layer {i + 1}" frosting_layer.data.materials.append(buttercream)
#Step 6: Create the Decorative Border on Top bpy.ops.mesh.primitivetorusadd(majorradius=0.9, minorradius=0.1, location=(0, 0, 1.2)) decorativeborder = bpy.context.object decorativeborder.name = "Decorative Border" decorative_border.data.materials.append(buttercream)
#Step 7: Add Sprinkles (Simplified as small spheres for demonstration) import random colors = [(1, 0, 0, 1), (0, 1, 0, 1), (0, 0, 1, 1), (1, 1, 0, 1)] for in range(50): x = random.uniform(-0.9, 0.9) y = random.uniform(-0.9, 0.9) z = 1.2 bpy.ops.mesh.primitiveuvsphereadd(radius=0.03, location=(x, y, z)) sprinkle = bpy.context.object sprinkle.name = "Sprinkle" color = bpy.data.materials.new(name="Sprinkle Color") color.diffuse_color = random.choice(colors) sprinkle.data.materials.append(color)
#Step 8: Add Text (Happy Birthday) bpy.ops.object.textadd(location=(0, 0, 1.5)) text = bpy.context.object text.name = "Happy Birthday Text" text.data.body = "Happy Birthday" text.data.alignx = 'CENTER' text.data.size = 0.2 text.rotation_euler = (0, 0, math.pi/2) text.location = (0, -1.5, 1.5)
#Convert text to mesh and apply material bpy.ops.object.convert(target='MESH') textmaterial = bpy.data.materials.new(name="Text Material") textmaterial.diffusecolor = (1, 1, 1, 1) # White color for text text.data.materials.append(textmaterial)
Result:
license: apache-2.0 ---
