Spaces:
mashroo
/
Runtime error

Commit History

Enhance generate3d function to initialize nvdiffrast context for mesh export, improving rendering capabilities. Updated export call to include rendering context and adjusted parameters for UVs and texture image, ensuring better integration with the model.
db2fd1d

YoussefAnso commited on

Update generate3d function to use a data dictionary for mesh export, improving compatibility with CRM model. Adjusted export call to include output directory and device parameters, while maintaining the conversion from .obj to .glb format.
d65fe1c

YoussefAnso commited on

Remove unused parameters from mesh export call in generate3d function, simplifying the method signature and improving code clarity.
1ca648e

YoussefAnso commited on

Fix parameter naming in generate3d function for clarity and consistency. Updated rgb and xyz parameters to rgb_image and xyz_image respectively in the mesh export call.
890b999

YoussefAnso commited on

Refactor 3D mesh generation in inference.py to streamline the process. Introduced ensure_dir function for output directory management, updated generate3d function to accept model and image inputs, and improved mesh export and conversion to GLB format. This enhances code clarity and maintains compatibility with Gradio display.
4ce632b

YoussefAnso commited on

Update requirements.txt to include rembg library for background removal functionality, enhancing the application's capabilities in image processing.
a50db4b

YoussefAnso commited on

Refactor background removal process in app.py to utilize rembg library, enhancing performance and simplifying the code. Update device handling to allow dynamic selection between CPU and CUDA, improving compatibility across different hardware configurations. Modify output format from OBJ to GLB for better integration with Gradio display.
9d0b3b4

YoussefAnso commited on

Refactor texture baking in vertex_color_to_uv_textured_glb function to use a hybrid approach for barycentric calculations. This change enhances accuracy while maintaining performance, replacing vectorized operations with a loop-based method for improved precision in texture generation.
2053232

YoussefAnso commited on

Refactor texture baking in vertex_color_to_uv_textured_glb function to use vectorized operations. This change improves performance by precomputing face data and applying vectorized barycentric tests, enhancing the efficiency of texture generation.
44c19b3

YoussefAnso commited on

Ensure input tensor is on the same device as model weights in FrozenOpenCLIPEmbedder. This change improves compatibility and performance by preventing device mismatch during image encoding.
1dfd90b

YoussefAnso commited on

Enhance token handling in FrozenOpenCLIPEmbedder by adding device checks and conversions. This update ensures that input tokens are correctly processed as torch tensors on the appropriate device, improving compatibility and performance across different hardware configurations.
566832c

YoussefAnso commited on

Refactor device handling across multiple modules to enforce CUDA usage explicitly. This change ensures consistent device allocation for model operations, enhancing performance on systems with GPU support while maintaining compatibility.
fdeb0ad

YoussefAnso commited on

Update device handling across multiple modules to support automatic selection of CUDA or CPU based on availability. This change enhances compatibility and performance on systems with or without GPU support, ensuring consistent behavior in model loading and data processing.
597a667

YoussefAnso commited on

Refactor attention module to improve xformers integration. Renamed availability flag to HAS_XFORMERS and added safe_memory_efficient_attention function for better handling of attention operations across devices. Updated related assertions and calls to ensure compatibility with systems lacking GPU support.
1d3fed2

YoussefAnso commited on

Update default device setting to CPU in encoder modules for improved compatibility across systems without GPU support.
3e7ee7c

YoussefAnso commited on

Update default device setting to CPU in FlexiCubesGeometry and FlexiCubes classes for improved compatibility across systems without GPU support.
b3b8cf5

YoussefAnso commited on

Change device setting for mesh data in generate3d function to CPU for consistency with recent updates, ensuring compatibility across systems without GPU support.
82982c9

YoussefAnso commited on

Change default device setting to CPU in app.py for improved compatibility. Updated model loading to ensure it operates on CPU, enhancing performance on systems without GPU support.
9551df9

YoussefAnso commited on

Refactor remove_background function in app.py to enhance mask handling. Added checks for mask dimensions and data type, ensuring proper conversion to RGBA format for images. This improves the output quality when masks are applied.
fa6cc29

YoussefAnso commited on

Add debug texture saving in vertex_color_to_uv_textured_glb function in inference.py. This enhancement allows for easier troubleshooting by saving the generated texture as "debug_texture.png" after exporting the GLB file.
83a8b53

YoussefAnso commited on

Enhance image processing in remove_background function by adding dtype check and conversion for extracted images. This ensures that non-uint8 images are properly scaled and converted before being transformed into PIL format.
63eeef6

YoussefAnso commited on

Add conversion of extracted image to PIL format in remove_background function in app.py. This ensures compatibility with subsequent image processing steps when the output is a NumPy array.
a3f04cd

YoussefAnso commited on

Refactor remove_background function in app.py to save images to a temporary file before processing. This change improves compatibility with the dis_remove_background method by ensuring the image is correctly handled as a file path.
1e3c695

YoussefAnso commited on

Add functionality to download the DIS ONNX model if not found locally in app.py. Updated remove_background function to call new ensure_dis_onnx_model method for improved error handling. Added requests library to requirements.txt for HTTP requests.
5a9aacb

YoussefAnso commited on

Add configurable ONNX model path in app.py for background removal. Implement error handling for missing model file and ensure valid image processing. Updated remove_background function to utilize environment variable for model path.
135bed3

YoussefAnso commited on

Refactor background removal in app.py to utilize dis_bg_remover for improved image processing. Removed rembg dependency and updated related logic in remove_background function. Updated requirements.txt to reflect the change in background removal library.
0ac4eff

YoussefAnso commited on

Update texture size parameter in vertex_color_to_uv_textured_glb function in inference.py from 768 to 640 for optimized performance.
3112ed0

YoussefAnso commited on

Update texture size parameter in vertex_color_to_uv_textured_glb function in inference.py from 512 to 768 for enhanced texture detail.
1dfe52e

YoussefAnso commited on

Update texture size parameter in vertex_color_to_uv_textured_glb function in inference.py to 512 for improved performance and compatibility.
897682e

YoussefAnso commited on

Add vertex color to UV-textured GLB conversion in inference.py
c6a8a22

YoussefAnso commited on

Refactor app.py and inference.py to streamline image generation and mesh export processes. Removed unnecessary CPU transfers and temporary file handling, directly returning generated GLB paths. Updated mesh export in CRM model to support vertex colors and improved overall efficiency in texture mapping.
1fa688f

YoussefAnso commited on

Refactor texture baking logic in generate3d function of inference.py to utilize per-vertex colors for improved texture quality. Updated the method for filling the texture image to enhance the visual output in mesh exports.
37c1f6f

YoussefAnso commited on

Ensure additional model components are moved to CPU in app.py to maintain consistency and prevent device-related issues during processing.
5f62420

YoussefAnso commited on

Ensure model components are on CPU after loading in app.py to prevent device-related issues during processing.
bfac008

YoussefAnso commited on

Ensure tensors are on CPU in generate3d function of inference.py for consistent processing. Updated points_tensor and triplane_feature2 to prevent device-related issues during inference.
dcb102c

YoussefAnso commited on

Refactor generate3d function in inference.py to implement CPU-only UV unwrapping using xatlas and trimesh for improved texture mapping. Updated texture baking logic to utilize the model's decoder and rgbMlp, enhancing the quality of generated textures in mesh exports.
f6ac519

YoussefAnso commited on

Refactor generate3d function in inference.py to implement CCM-based UV assignment for improved texture mapping. Updated color map preparation and vertex projection to enhance mesh quality in exports, ensuring compatibility with various input formats.
e666402

YoussefAnso commited on

Enhance texture baking logic in generate3d function of inference.py by integrating OpenCV for color map processing. Updated albedo generation to support photorealistic textures and ensure proper format handling, improving overall texture quality in mesh exports.
854cd53

YoussefAnso commited on

Refactor generate3d function in inference.py to integrate xatlas for UV parameterization and improve texture baking logic. Updated mesh export process to create GLB files directly from the generated mesh, enhancing overall functionality and maintainability.
9ee53e8

YoussefAnso commited on

Update imports in inference.py to include zipfile and nvdiffrast for enhanced mesh processing capabilities and improved functionality.
d454202

YoussefAnso commited on

Update imports in inference.py to include numpy, PIL, and mesh utilities for enhanced functionality and improved mesh processing.
d63ad23

YoussefAnso commited on

Add torch import in inference.py to support additional functionality
0981827

YoussefAnso commited on

Add Renderer import in inference.py to support enhanced 3D model generation
5777f44

YoussefAnso commited on

Refactor generate3d function in inference.py to enhance mesh processing and export logic. Streamlined image tensor handling, improved denoising integration, and updated mesh export to include UV mapping. Ensured proper handling of temporary files for OBJ and GLB formats, enhancing overall readability and maintainability.
a14c9ce

YoussefAnso commited on

Refactor generate3d function in inference.py to streamline noise addition and improve mesh processing. Enhanced color generation for vertices and updated GLB export logic, ensuring efficient handling of mesh data and improved readability.
2cf3ed2

YoussefAnso commited on

Refactor generate3d function in inference.py to improve mesh export process. Updated OBJ and texture file checks, streamlined GLB conversion with embedded texture handling, and enhanced error handling for missing files. This change ensures proper export of textured GLB files.
30b6055

YoussefAnso commited on

Refactor generate3d function in inference.py to improve readability and maintainability. Enhanced RGB and coordinate conversion, streamlined noise addition for denoising, and updated mesh export process to utilize trimesh for GLB format, ensuring proper handling of UV textures.
dfab55e

YoussefAnso commited on

Fix variable names in mesh export for CRM model to enhance clarity and maintain consistency with previous changes. Updated vertices and faces variable names for better readability.
b2dc9cc

YoussefAnso commited on